Bug 200562 - [JSC] Refactor our [[Put]] to match to the latest spec
Summary: [JSC] Refactor our [[Put]] to match to the latest spec
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
Depends on: 199864
  Show dependency treegraph
Reported: 2019-08-08 21:38 PDT by Yusuke Suzuki
Modified: 2019-08-09 01:56 PDT (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-08-08 21:38:29 PDT
Comment 1 Yusuke Suzuki 2019-08-09 01:56:25 PDT
The refactoring design is the following,

1. Remove JSObject::put hook
2. Add JSObject::attemptToSetOwnProperty, which only does [[Put]]’s own setter part. It does not involve any [[Prototype]] traversing etc.
3. Define non-virtual JSObject::put method, which does traversing and static-property initialization too.
4. (2) is only called when the structure has some flags. This flag must be correctly maintained by structure transition.
5. (2) correctly set PutPropertySlot’s status
6. Even (2) is invoked, we still see cacheable status through PutPropertySlot. Each attemptToSetOwnProperty implementation should take care of maintaining it.