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

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

Issue 1584813002: [Interpreter] Make ForInPrepare take a kRegTriple8 and ForInNext take kRegPair8 for cache state (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_forin
Patch Set: Fix release Created 4 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/unittests/compiler/interpreter-assembler-unittest.cc ('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-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "test/unittests/test-utils.h" 10 #include "test/unittests/test-utils.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) 202 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK)
203 .JumpIfFalse(&start); 203 .JumpIfFalse(&start);
204 204
205 // Emit throw in it's own basic block so that the rest of the code isn't 205 // Emit throw in it's own basic block so that the rest of the code isn't
206 // omitted due to being dead. 206 // omitted due to being dead.
207 BytecodeLabel after_throw; 207 BytecodeLabel after_throw;
208 builder.Jump(&after_throw) 208 builder.Jump(&after_throw)
209 .Throw() 209 .Throw()
210 .Bind(&after_throw); 210 .Bind(&after_throw);
211 211
212 builder.ForInPrepare(reg, reg, reg) 212 builder.ForInPrepare(reg)
213 .ForInDone(reg, reg) 213 .ForInDone(reg, reg)
214 .ForInNext(reg, reg, reg, reg) 214 .ForInNext(reg, reg, reg)
215 .ForInStep(reg); 215 .ForInStep(reg);
216 216
217 // Wide constant pool loads 217 // Wide constant pool loads
218 for (int i = 0; i < 256; i++) { 218 for (int i = 0; i < 256; i++) {
219 // Emit junk in constant pool to force wide constant pool index. 219 // Emit junk in constant pool to force wide constant pool index.
220 builder.LoadLiteral(factory->NewNumber(2.5321 + i)); 220 builder.LoadLiteral(factory->NewNumber(2.5321 + i));
221 } 221 }
222 builder.LoadLiteral(Smi::FromInt(20000000)); 222 builder.LoadLiteral(Smi::FromInt(20000000));
223 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name"); 223 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name");
224 224
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 } 683 }
684 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 684 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
685 iterator.Advance(); 685 iterator.Advance();
686 CHECK(iterator.done()); 686 CHECK(iterator.done());
687 } 687 }
688 688
689 689
690 } // namespace interpreter 690 } // namespace interpreter
691 } // namespace internal 691 } // namespace internal
692 } // namespace v8 692 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/interpreter-assembler-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698