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

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 2504553003: [es6] Perform the IsConstructor test in GetSuperConstructor. (Closed)
Patch Set: Fix IsNull call Created 4 years 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
« src/messages.h ('K') | « test/test262/test262.status ('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 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/interpreter/bytecode-array-builder.h" 7 #include "src/interpreter/bytecode-array-builder.h"
8 #include "src/interpreter/bytecode-array-iterator.h" 8 #include "src/interpreter/bytecode-array-iterator.h"
9 #include "src/interpreter/bytecode-label.h" 9 #include "src/interpreter/bytecode-label.h"
10 #include "src/interpreter/bytecode-register-allocator.h" 10 #include "src/interpreter/bytecode-register-allocator.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 builder.LoadUndefined() 200 builder.LoadUndefined()
201 .CompareOperation(Token::Value::EQ, reg, 1) 201 .CompareOperation(Token::Value::EQ, reg, 1)
202 .LoadNull() 202 .LoadNull()
203 .CompareOperation(Token::Value::EQ, reg, 1); 203 .CompareOperation(Token::Value::EQ, reg, 1);
204 204
205 // Emit conversion operator invocations. 205 // Emit conversion operator invocations.
206 builder.ConvertAccumulatorToNumber(reg) 206 builder.ConvertAccumulatorToNumber(reg)
207 .ConvertAccumulatorToObject(reg) 207 .ConvertAccumulatorToObject(reg)
208 .ConvertAccumulatorToName(reg); 208 .ConvertAccumulatorToName(reg);
209 209
210 // Emit GetSuperConstructor.
211 builder.GetSuperConstructor(reg);
212
210 // Short jumps with Imm8 operands 213 // Short jumps with Imm8 operands
211 { 214 {
212 BytecodeLabel start, after_jump1, after_jump2, after_jump3, after_jump4, 215 BytecodeLabel start, after_jump1, after_jump2, after_jump3, after_jump4,
213 after_jump5; 216 after_jump5;
214 builder.Bind(&start) 217 builder.Bind(&start)
215 .Jump(&after_jump1) 218 .Jump(&after_jump1)
216 .Bind(&after_jump1) 219 .Bind(&after_jump1)
217 .JumpIfNull(&after_jump2) 220 .JumpIfNull(&after_jump2)
218 .Bind(&after_jump2) 221 .Bind(&after_jump2)
219 .JumpIfUndefined(&after_jump3) 222 .JumpIfUndefined(&after_jump3)
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 iterator.Advance(); 746 iterator.Advance();
744 } 747 }
745 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 748 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
746 iterator.Advance(); 749 iterator.Advance();
747 CHECK(iterator.done()); 750 CHECK(iterator.done());
748 } 751 }
749 752
750 } // namespace interpreter 753 } // namespace interpreter
751 } // namespace internal 754 } // namespace internal
752 } // namespace v8 755 } // namespace v8
OLDNEW
« src/messages.h ('K') | « test/test262/test262.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698