OLD | NEW |
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) | 209 .BinaryOperation(Token::Value::ADD, reg, Strength::WEAK) |
210 .JumpIfFalse(&start); | 210 .JumpIfFalse(&start); |
211 | 211 |
212 // Emit throw in it's own basic block so that the rest of the code isn't | 212 // Emit throw in it's own basic block so that the rest of the code isn't |
213 // omitted due to being dead. | 213 // omitted due to being dead. |
214 BytecodeLabel after_throw; | 214 BytecodeLabel after_throw; |
215 builder.Jump(&after_throw) | 215 builder.Jump(&after_throw) |
216 .Throw() | 216 .Throw() |
217 .Bind(&after_throw); | 217 .Bind(&after_throw); |
218 | 218 |
219 builder.ForInPrepare(reg).ForInDone(reg).ForInNext(reg, reg); | 219 builder.ForInPrepare(reg, reg, reg, reg) |
| 220 .ForInDone(reg, reg) |
| 221 .ForInNext(reg, reg, reg, reg) |
| 222 .ForInStep(reg); |
220 | 223 |
221 // Wide constant pool loads | 224 // Wide constant pool loads |
222 for (int i = 0; i < 256; i++) { | 225 for (int i = 0; i < 256; i++) { |
223 // Emit junk in constant pool to force wide constant pool index. | 226 // Emit junk in constant pool to force wide constant pool index. |
224 builder.GetConstantPoolEntry(handle(Smi::FromInt(i), isolate())); | 227 builder.GetConstantPoolEntry(handle(Smi::FromInt(i), isolate())); |
225 } | 228 } |
226 builder.LoadLiteral(Smi::FromInt(20000000)); | 229 builder.LoadLiteral(Smi::FromInt(20000000)); |
227 | 230 |
228 // CreateClosureWide | 231 // CreateClosureWide |
229 Handle<SharedFunctionInfo> shared_info2 = factory->NewSharedFunctionInfo( | 232 Handle<SharedFunctionInfo> shared_info2 = factory->NewSharedFunctionInfo( |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 iterator.Advance(); | 669 iterator.Advance(); |
667 } | 670 } |
668 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 671 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
669 iterator.Advance(); | 672 iterator.Advance(); |
670 CHECK(iterator.done()); | 673 CHECK(iterator.done()); |
671 } | 674 } |
672 | 675 |
673 } // namespace interpreter | 676 } // namespace interpreter |
674 } // namespace internal | 677 } // namespace internal |
675 } // namespace v8 | 678 } // namespace v8 |
OLD | NEW |