| 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 "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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 // Emit throw and re-throw in it's own basic block so that the rest of the | 199 // Emit throw and re-throw in it's own basic block so that the rest of the |
| 200 // code isn't omitted due to being dead. | 200 // code isn't omitted due to being dead. |
| 201 BytecodeLabel after_throw; | 201 BytecodeLabel after_throw; |
| 202 builder.Jump(&after_throw).Throw().Bind(&after_throw); | 202 builder.Jump(&after_throw).Throw().Bind(&after_throw); |
| 203 BytecodeLabel after_rethrow; | 203 BytecodeLabel after_rethrow; |
| 204 builder.Jump(&after_rethrow).ReThrow().Bind(&after_rethrow); | 204 builder.Jump(&after_rethrow).ReThrow().Bind(&after_rethrow); |
| 205 | 205 |
| 206 builder.ForInPrepare(reg) | 206 builder.ForInPrepare(reg) |
| 207 .ForInDone(reg, reg) | 207 .ForInDone(reg, reg) |
| 208 .ForInNext(reg, reg, reg) | 208 .ForInNext(reg, reg, reg, 1) |
| 209 .ForInStep(reg); | 209 .ForInStep(reg); |
| 210 builder.ForInPrepare(wide) | 210 builder.ForInPrepare(wide) |
| 211 .ForInDone(reg, other) | 211 .ForInDone(reg, other) |
| 212 .ForInNext(wide, wide, wide) | 212 .ForInNext(wide, wide, wide, 1024) |
| 213 .ForInStep(reg); | 213 .ForInStep(reg); |
| 214 | 214 |
| 215 // Wide constant pool loads | 215 // Wide constant pool loads |
| 216 for (int i = 0; i < 256; i++) { | 216 for (int i = 0; i < 256; i++) { |
| 217 // Emit junk in constant pool to force wide constant pool index. | 217 // Emit junk in constant pool to force wide constant pool index. |
| 218 builder.LoadLiteral(factory->NewNumber(2.5321 + i)); | 218 builder.LoadLiteral(factory->NewNumber(2.5321 + i)); |
| 219 } | 219 } |
| 220 builder.LoadLiteral(Smi::FromInt(20000000)); | 220 builder.LoadLiteral(Smi::FromInt(20000000)); |
| 221 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name"); | 221 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name"); |
| 222 | 222 |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 iterator.Advance(); | 648 iterator.Advance(); |
| 649 } | 649 } |
| 650 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 650 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 651 iterator.Advance(); | 651 iterator.Advance(); |
| 652 CHECK(iterator.done()); | 652 CHECK(iterator.done()); |
| 653 } | 653 } |
| 654 | 654 |
| 655 } // namespace interpreter | 655 } // namespace interpreter |
| 656 } // namespace internal | 656 } // namespace internal |
| 657 } // namespace v8 | 657 } // namespace v8 |
| OLD | NEW |