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

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: 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
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 "test/unittests/test-utils.h" 9 #include "test/unittests/test-utils.h"
10 10
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) 201 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK)
202 .JumpIfFalse(&start); 202 .JumpIfFalse(&start);
203 203
204 // Emit throw in it's own basic block so that the rest of the code isn't 204 // Emit throw in it's own basic block so that the rest of the code isn't
205 // omitted due to being dead. 205 // omitted due to being dead.
206 BytecodeLabel after_throw; 206 BytecodeLabel after_throw;
207 builder.Jump(&after_throw) 207 builder.Jump(&after_throw)
208 .Throw() 208 .Throw()
209 .Bind(&after_throw); 209 .Bind(&after_throw);
210 210
211 builder.ForInPrepare(reg, reg, reg) 211 builder.ForInPrepare(reg)
212 .ForInDone(reg, reg) 212 .ForInDone(reg, reg)
213 .ForInNext(reg, reg, reg, reg) 213 .ForInNext(reg, reg, reg)
214 .ForInStep(reg); 214 .ForInStep(reg);
215 215
216 // Wide constant pool loads 216 // Wide constant pool loads
217 for (int i = 0; i < 256; i++) { 217 for (int i = 0; i < 256; i++) {
218 // Emit junk in constant pool to force wide constant pool index. 218 // Emit junk in constant pool to force wide constant pool index.
219 builder.LoadLiteral(factory->NewNumber(2.5321 + i)); 219 builder.LoadLiteral(factory->NewNumber(2.5321 + i));
220 } 220 }
221 builder.LoadLiteral(Smi::FromInt(20000000)); 221 builder.LoadLiteral(Smi::FromInt(20000000));
222 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name"); 222 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name");
223 223
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 } 704 }
705 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 705 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
706 iterator.Advance(); 706 iterator.Advance();
707 CHECK(iterator.done()); 707 CHECK(iterator.done());
708 } 708 }
709 709
710 710
711 } // namespace interpreter 711 } // namespace interpreter
712 } // namespace internal 712 } // namespace internal
713 } // namespace v8 713 } // namespace v8
OLDNEW
« src/interpreter/interpreter.cc ('K') | « 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