Repository navigation
Commit dd24421
committed
[JSC] DFG should not compile
https://bugs.webkit.org/show_bug.cgi?id=328284
Reviewed by Yusuke Suzuki.
`#x in o` only looks at `o` itself. However, the DFG bytecode parser passes
`op_has_private_name` to `handleInById`, which emits `InById` when it cannot emit
`MatchStructure`. `InById` walks the prototype chain, so `#x in o` returns true
when only the prototype of `o` has `#x`.
This always happens with `--useAccessInlining=false`. With the default options,
this is hidden because the inline cache gives up once the prototype has `#x`.
This patch calls `handleInByAsMatchStructure` directly and falls back to
`HasPrivateName`, as `op_has_private_brand` already does.
Test: JSTests/stress/has-private-name-without-access-inlining.js
* JSTests/stress/has-private-name-without-access-inlining.js: Added.
(shouldBe):
(Base):
(Stamper.has):
(Stamper):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
Canonical link: https://commits.webkit.org/324397@mainop_has_private_name as InById
1 parent c22ca36 commit dd24421
2 files changed
Lines changed: 34 additions & 4 deletions
File tree
- JSTests/stress
- Source/JavaScriptCore/dfg
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11189 | 11189 | | |
11190 | 11190 | | |
11191 | 11191 | | |
11192 | | - | |
| 11192 | + | |
11193 | 11193 | | |
11194 | 11194 | | |
11195 | 11195 | | |
| |||
11204 | 11204 | | |
11205 | 11205 | | |
11206 | 11206 | | |
11207 | | - | |
11208 | | - | |
| 11207 | + | |
11209 | 11208 | | |
11210 | 11209 | | |
11211 | 11210 | | |
11212 | | - | |
| 11211 | + | |
11213 | 11212 | | |
11214 | 11213 | | |
11215 | 11214 | | |
| |||
0 commit comments