Bug 157136 - Byte codes for dot call and bracket call of super are different
Summary: Byte codes for dot call and bracket call of super are different
Status: RESOLVED DUPLICATE of bug 147064
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 140491
  Show dependency treegraph
 
Reported: 2016-04-28 07:03 PDT by GSkachkov
Modified: 2016-04-28 08:31 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description GSkachkov 2016-04-28 07:03:47 PDT
(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
Comment 1 Saam Barati 2016-04-28 08:31:17 PDT
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 ***