Bug 157136
Summary: | Byte codes for dot call and bracket call of super are different | ||
---|---|---|---|
Product: | WebKit | Reporter: | GSkachkov <gskachkov> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | darin, gskachkov, keith_miller, rniwa, saam |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 140491 |
GSkachkov
(new class D extends class { m() {}} { constructor() { super(); super['m']() } }())
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] mov loc5, this
[ 9] mov this, <JSValue()>(const1)
[ 12] get_by_id loc6, head3, __proto__(@id0) predicting None
[ 21] mov loc8, loc5
[ 24] construct loc6, loc6, 1, 14 status(Could Take Slow Path) predicting None
[ 33] is_empty loc9, this
[ 36] jtrue loc9, 6(->42)
[ 39] throw_static_error String (atomic) (identifier): 'super()' can't be called more than once in a constructor., ID: 4(const2), true
[ 42] mov this, loc6
[ 45] get_by_id loc6, head3, PrivateSymbol.homeObject(@id1) predicting None
[ 54] get_by_id loc7, loc6, __proto__(@id0) predicting None
[ 63] get_by_id loc8, loc7, m(@id2) predicting None
[ 72] op_check_tdz this
[ 74] mov loc10, this
[ 77] call loc8, loc8, 1, 16 status(Could Take Slow Path) Original; predicting None
[ 86] op_check_tdz this
[ 88] is_object loc6, this
[ 91] jtrue loc6, 16(->107)
[ 94] is_undefined loc6, this
[ 97] jtrue loc6, 6(->103)
[ 100] throw_static_error String (atomic) (identifier): Cannot return a non-object type in the constructor of a derived class., ID: 4(const3), false
[ 103] op_check_tdz this
[ 105] ret this
[ 107] ret this
(new class D extends class { m() {}} { constructor() { super(); super.m() } }())
[ 0] enter
[ 1] get_scope loc3
[ 3] mov loc4, loc3
[ 6] mov loc5, this
[ 9] mov this, <JSValue()>(const1)
[ 12] get_by_id loc6, head3, __proto__(@id0) predicting None
[ 21] mov loc8, loc5
[ 24] construct loc6, loc6, 1, 14 status(Could Take Slow Path) predicting None
[ 33] is_empty loc9, this
[ 36] jtrue loc9, 6(->42)
[ 39] throw_static_error String (atomic) (identifier): 'super()' can't be called more than once in a constructor., ID: 4(const2), true
[ 42] mov this, loc6
[ 45] op_check_tdz this
[ 47] mov loc8, this
[ 50] get_by_id loc9, head3, PrivateSymbol.homeObject(@id1) predicting None
[ 59] get_by_id loc10, loc9, __proto__(@id0) predicting None
[ 68] get_by_id loc6, loc10, m(@id2) predicting None
[ 77] call loc6, loc6, 1, 14 status(Could Take Slow Path) Original; predicting None
[ 86] op_check_tdz this
[ 88] is_object loc6, this
[ 91] jtrue loc6, 16(->107)
[ 94] is_undefined loc6, this
[ 97] jtrue loc6, 6(->103)
[ 100] throw_static_error String (atomic) (identifier): Cannot return a non-object type in the constructor of a derived class., ID: 4(const3), false
[ 103] op_check_tdz this
[ 105] ret this
[ 107] ret this
For my prospective it should be the same byte code. lines 45 are diffrent
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Saam Barati
I'm fixing this in:
https://bugs.webkit.org/show_bug.cgi?id=147064
*** This bug has been marked as a duplicate of bug 147064 ***