Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: test/cctest/interpreter/bytecode_expectations/SuperCallAndSpread.golden

Issue 2614053002: Improve error message for calling super() twice in a derived constructor (Closed)
Patch Set: Merged Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # Autogenerated by generate-bytecode-expectations. 2 # Autogenerated by generate-bytecode-expectations.
3 # 3 #
4 4
5 --- 5 ---
6 wrap: no 6 wrap: no
7 test function name: test 7 test function name: test
8 8
9 --- 9 ---
10 snippet: " 10 snippet: "
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 constructor(...args) { this.baseArgs = args; } 48 constructor(...args) { this.baseArgs = args; }
49 } 49 }
50 class B extends A { 50 class B extends A {
51 constructor(...args) { super(1, ...args); } 51 constructor(...args) { super(1, ...args); }
52 } 52 }
53 test = new B(1, 2, 3).constructor; 53 test = new B(1, 2, 3).constructor;
54 })(); 54 })();
55 " 55 "
56 frame size: 8 56 frame size: 8
57 parameter count: 1 57 parameter count: 1
58 bytecode array length: 66 58 bytecode array length: 62
59 bytecodes: [ 59 bytecodes: [
60 B(CreateRestParameter), 60 B(CreateRestParameter),
61 B(Star), R(2), 61 B(Star), R(2),
62 B(Mov), R(closure), R(1), 62 B(Mov), R(closure), R(1),
63 B(Mov), R(new_target), R(0), 63 B(Mov), R(new_target), R(0),
64 B(Ldar), R(new_target), 64 B(Ldar), R(new_target),
65 /* 128 E> */ B(StackCheck), 65 /* 128 E> */ B(StackCheck),
66 /* 140 S> */ B(Ldar), R(1), 66 /* 140 S> */ B(Ldar), R(1),
67 B(GetSuperConstructor), R(3), 67 B(GetSuperConstructor), R(3),
68 B(LdaSmi), U8(1), 68 B(LdaSmi), U8(1),
69 B(Star), R(6), 69 B(Star), R(6),
70 B(Mov), R(3), R(4), 70 B(Mov), R(3), R(4),
71 B(Mov), R(0), R(5), 71 B(Mov), R(0), R(5),
72 B(Mov), R(2), R(7), 72 B(Mov), R(2), R(7),
73 /* 140 E> */ B(NewWithSpread), R(4), U8(4), 73 /* 140 E> */ B(NewWithSpread), R(4), U8(4),
74 B(Star), R(3), 74 B(Star), R(3),
75 B(Ldar), R(this), 75 B(Ldar), R(this),
76 B(JumpIfNotHole), U8(4), 76 B(JumpIfNotHole), U8(4),
77 B(Jump), U8(11), 77 B(Jump), U8(7),
78 B(LdaConstant), U8(0), 78 /* 140 E> */ B(CallRuntime), U16(Runtime::kThrowSuperAlreadyCalledError), R(0 ), U8(0),
79 B(Star), R(4),
80 /* 140 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
81 B(Mov), R(3), R(this), 79 B(Mov), R(3), R(this),
82 B(Ldar), R(this), 80 B(Ldar), R(this),
83 B(JumpIfNotHole), U8(11), 81 B(JumpIfNotHole), U8(11),
84 B(LdaConstant), U8(0), 82 B(LdaConstant), U8(0),
85 B(Star), R(3), 83 B(Star), R(3),
86 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), 84 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
87 /* 159 S> */ B(Return), 85 /* 159 S> */ B(Return),
88 ] 86 ]
89 constant pool: [ 87 constant pool: [
90 ONE_BYTE_INTERNALIZED_STRING_TYPE ["this"], 88 ONE_BYTE_INTERNALIZED_STRING_TYPE ["this"],
91 ] 89 ]
92 handlers: [ 90 handlers: [
93 ] 91 ]
94 92
95 --- 93 ---
96 snippet: " 94 snippet: "
97 var test; 95 var test;
98 (function() { 96 (function() {
99 class A { 97 class A {
100 constructor(...args) { this.baseArgs = args; } 98 constructor(...args) { this.baseArgs = args; }
101 } 99 }
102 class B extends A { 100 class B extends A {
103 constructor(...args) { super(1, ...args, 1); } 101 constructor(...args) { super(1, ...args, 1); }
104 } 102 }
105 test = new B(1, 2, 3).constructor; 103 test = new B(1, 2, 3).constructor;
106 })(); 104 })();
107 " 105 "
108 frame size: 9 106 frame size: 9
109 parameter count: 1 107 parameter count: 1
110 bytecode array length: 96 108 bytecode array length: 92
111 bytecodes: [ 109 bytecodes: [
112 B(CreateRestParameter), 110 B(CreateRestParameter),
113 B(Star), R(2), 111 B(Star), R(2),
114 B(Mov), R(closure), R(1), 112 B(Mov), R(closure), R(1),
115 B(Mov), R(new_target), R(0), 113 B(Mov), R(new_target), R(0),
116 B(Ldar), R(new_target), 114 B(Ldar), R(new_target),
117 /* 128 E> */ B(StackCheck), 115 /* 128 E> */ B(StackCheck),
118 /* 140 S> */ B(LdaUndefined), 116 /* 140 S> */ B(LdaUndefined),
119 B(Star), R(3), 117 B(Star), R(3),
120 /* 140 E> */ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(1), U8(1) , 118 /* 140 E> */ B(CallRuntime), U16(Runtime::k_GetSuperConstructor), R(1), U8(1) ,
121 B(Star), R(4), 119 B(Star), R(4),
122 B(LdaUndefined), 120 B(LdaUndefined),
123 B(Star), R(5), 121 B(Star), R(5),
124 B(CreateArrayLiteral), U8(0), U8(0), U8(9), 122 B(CreateArrayLiteral), U8(0), U8(0), U8(9),
125 B(Star), R(6), 123 B(Star), R(6),
126 B(LdaUndefined), 124 B(LdaUndefined),
127 B(Star), R(7), 125 B(Star), R(7),
128 B(Mov), R(2), R(8), 126 B(Mov), R(2), R(8),
129 /* 152 E> */ B(CallJSRuntime), U8(%spread_iterable), R(7), U8(2), 127 /* 152 E> */ B(CallJSRuntime), U8(%spread_iterable), R(7), U8(2),
130 B(Star), R(7), 128 B(Star), R(7),
131 B(CreateArrayLiteral), U8(1), U8(1), U8(9), 129 B(CreateArrayLiteral), U8(1), U8(1), U8(9),
132 B(Star), R(8), 130 B(Star), R(8),
133 B(CallJSRuntime), U8(%spread_arguments), R(5), U8(4), 131 B(CallJSRuntime), U8(%spread_arguments), R(5), U8(4),
134 B(Star), R(5), 132 B(Star), R(5),
135 B(Mov), R(0), R(6), 133 B(Mov), R(0), R(6),
136 /* 140 E> */ B(CallJSRuntime), U8(%reflect_construct), R(3), U8(4), 134 /* 140 E> */ B(CallJSRuntime), U8(%reflect_construct), R(3), U8(4),
137 B(Star), R(3), 135 B(Star), R(3),
138 B(Ldar), R(this), 136 B(Ldar), R(this),
139 B(JumpIfNotHole), U8(4), 137 B(JumpIfNotHole), U8(4),
140 B(Jump), U8(11), 138 B(Jump), U8(7),
141 B(LdaConstant), U8(2), 139 /* 140 E> */ B(CallRuntime), U16(Runtime::kThrowSuperAlreadyCalledError), R(0 ), U8(0),
142 B(Star), R(4),
143 /* 140 E> */ B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
144 B(Mov), R(3), R(this), 140 B(Mov), R(3), R(this),
145 B(Ldar), R(this), 141 B(Ldar), R(this),
146 B(JumpIfNotHole), U8(11), 142 B(JumpIfNotHole), U8(11),
147 B(LdaConstant), U8(2), 143 B(LdaConstant), U8(2),
148 B(Star), R(3), 144 B(Star), R(3),
149 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1), 145 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
150 /* 162 S> */ B(Return), 146 /* 162 S> */ B(Return),
151 ] 147 ]
152 constant pool: [ 148 constant pool: [
153 CONSTANT_ELEMENTS_PAIR_TYPE, 149 CONSTANT_ELEMENTS_PAIR_TYPE,
154 CONSTANT_ELEMENTS_PAIR_TYPE, 150 CONSTANT_ELEMENTS_PAIR_TYPE,
155 ONE_BYTE_INTERNALIZED_STRING_TYPE ["this"], 151 ONE_BYTE_INTERNALIZED_STRING_TYPE ["this"],
156 ] 152 ]
157 handlers: [ 153 handlers: [
158 ] 154 ]
159 155
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698