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

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

Issue 2169813002: [interpreter] Add output register to ToName (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@addregouts
Patch Set: comments Created 4 years, 4 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
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 .CompareOperation(Token::Value::LT, reg) 175 .CompareOperation(Token::Value::LT, reg)
176 .CompareOperation(Token::Value::GT, reg) 176 .CompareOperation(Token::Value::GT, reg)
177 .CompareOperation(Token::Value::LTE, reg) 177 .CompareOperation(Token::Value::LTE, reg)
178 .CompareOperation(Token::Value::GTE, reg) 178 .CompareOperation(Token::Value::GTE, reg)
179 .CompareOperation(Token::Value::INSTANCEOF, reg) 179 .CompareOperation(Token::Value::INSTANCEOF, reg)
180 .CompareOperation(Token::Value::IN, reg); 180 .CompareOperation(Token::Value::IN, reg);
181 181
182 // Emit cast operator invocations. 182 // Emit cast operator invocations.
183 builder.CastAccumulatorToNumber(reg) 183 builder.CastAccumulatorToNumber(reg)
184 .CastAccumulatorToJSObject() 184 .CastAccumulatorToJSObject()
185 .CastAccumulatorToName(); 185 .CastAccumulatorToName(reg);
186 186
187 // Emit control flow. Return must be the last instruction. 187 // Emit control flow. Return must be the last instruction.
188 BytecodeLabel start; 188 BytecodeLabel start;
189 builder.Bind(&start); 189 builder.Bind(&start);
190 { 190 {
191 // Short jumps with Imm8 operands 191 // Short jumps with Imm8 operands
192 BytecodeLabel after_jump; 192 BytecodeLabel after_jump;
193 builder.Jump(&start) 193 builder.Jump(&start)
194 .Bind(&after_jump) 194 .Bind(&after_jump)
195 .JumpIfNull(&start) 195 .JumpIfNull(&start)
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 iterator.Advance(); 839 iterator.Advance();
840 } 840 }
841 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 841 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
842 iterator.Advance(); 842 iterator.Advance();
843 CHECK(iterator.done()); 843 CHECK(iterator.done());
844 } 844 }
845 845
846 } // namespace interpreter 846 } // namespace interpreter
847 } // namespace internal 847 } // namespace internal
848 } // namespace v8 848 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698