| 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-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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 builder.OsrPoll(1); | 266 builder.OsrPoll(1); |
| 267 | 267 |
| 268 // Emit throw and re-throw in it's own basic block so that the rest of the | 268 // Emit throw and re-throw in it's own basic block so that the rest of the |
| 269 // code isn't omitted due to being dead. | 269 // code isn't omitted due to being dead. |
| 270 BytecodeLabel after_throw; | 270 BytecodeLabel after_throw; |
| 271 builder.Throw().Bind(&after_throw); | 271 builder.Throw().Bind(&after_throw); |
| 272 BytecodeLabel after_rethrow; | 272 BytecodeLabel after_rethrow; |
| 273 builder.ReThrow().Bind(&after_rethrow); | 273 builder.ReThrow().Bind(&after_rethrow); |
| 274 | 274 |
| 275 builder.ForInPrepare(reg, reg) | 275 builder.ForInPrepare(reg, reg) |
| 276 .ForInDone(reg, reg) | 276 .ForInContinue(reg, reg) |
| 277 .ForInNext(reg, reg, reg, 1) | 277 .ForInNext(reg, reg, reg, 1) |
| 278 .ForInStep(reg); | 278 .ForInStep(reg); |
| 279 builder.ForInPrepare(reg, wide) | 279 builder.ForInPrepare(reg, wide) |
| 280 .ForInDone(reg, other) | 280 .ForInContinue(reg, other) |
| 281 .ForInNext(wide, wide, wide, 1024) | 281 .ForInNext(wide, wide, wide, 1024) |
| 282 .ForInStep(reg); | 282 .ForInStep(reg); |
| 283 | 283 |
| 284 // Wide constant pool loads | 284 // Wide constant pool loads |
| 285 for (int i = 0; i < 256; i++) { | 285 for (int i = 0; i < 256; i++) { |
| 286 // Emit junk in constant pool to force wide constant pool index. | 286 // Emit junk in constant pool to force wide constant pool index. |
| 287 builder.LoadLiteral(factory->NewNumber(2.5321 + i)); | 287 builder.LoadLiteral(factory->NewNumber(2.5321 + i)); |
| 288 } | 288 } |
| 289 builder.LoadLiteral(Smi::FromInt(20000000)); | 289 builder.LoadLiteral(Smi::FromInt(20000000)); |
| 290 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name"); | 290 Handle<String> wide_name = factory->NewStringFromStaticChars("var_wide_name"); |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 iterator.Advance(); | 854 iterator.Advance(); |
| 855 } | 855 } |
| 856 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 856 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 857 iterator.Advance(); | 857 iterator.Advance(); |
| 858 CHECK(iterator.done()); | 858 CHECK(iterator.done()); |
| 859 } | 859 } |
| 860 | 860 |
| 861 } // namespace interpreter | 861 } // namespace interpreter |
| 862 } // namespace internal | 862 } // namespace internal |
| 863 } // namespace v8 | 863 } // namespace v8 |
| OLD | NEW |