Bug 200562
| Summary: | [JSC] Refactor our [[Put]] to match to the latest spec | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> |
| Component: | JavaScriptCore | Assignee: | Yusuke Suzuki <ysuzuki> |
| Status: | NEW | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | 199864 | ||
| Bug Blocks: | |||
Yusuke Suzuki
...
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Yusuke Suzuki
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.