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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/interpreter/bytecode-array-builder.h" | 8 #include "src/interpreter/bytecode-array-builder.h" |
9 #include "src/interpreter/bytecode-array-iterator.h" | 9 #include "src/interpreter/bytecode-array-iterator.h" |
10 #include "src/interpreter/bytecode-jump-table.h" | 10 #include "src/interpreter/bytecode-jump-table.h" |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 351 |
352 // Emit load and store operations for module variables. | 352 // Emit load and store operations for module variables. |
353 builder.LoadModuleVariable(-1, 42) | 353 builder.LoadModuleVariable(-1, 42) |
354 .LoadModuleVariable(0, 42) | 354 .LoadModuleVariable(0, 42) |
355 .LoadModuleVariable(1, 42) | 355 .LoadModuleVariable(1, 42) |
356 .StoreModuleVariable(-1, 42) | 356 .StoreModuleVariable(-1, 42) |
357 .StoreModuleVariable(0, 42) | 357 .StoreModuleVariable(0, 42) |
358 .StoreModuleVariable(1, 42); | 358 .StoreModuleVariable(1, 42); |
359 | 359 |
360 // Emit generator operations. | 360 // Emit generator operations. |
361 builder.SuspendGenerator(reg, SuspendFlags::kYield).ResumeGenerator(reg); | 361 builder.SuspendGenerator(reg, reg_list, SuspendFlags::kYield) |
| 362 .RestoreGeneratorState(reg) |
| 363 .RestoreGeneratorRegisters(reg, reg_list); |
362 | 364 |
363 // Intrinsics handled by the interpreter. | 365 // Intrinsics handled by the interpreter. |
364 builder.CallRuntime(Runtime::kInlineIsArray, reg_list); | 366 builder.CallRuntime(Runtime::kInlineIsArray, reg_list); |
365 | 367 |
366 // Emit debugger bytecode. | 368 // Emit debugger bytecode. |
367 builder.Debugger(); | 369 builder.Debugger(); |
368 | 370 |
369 // Insert dummy ops to force longer jumps. | 371 // Insert dummy ops to force longer jumps. |
370 for (int i = 0; i < 256; i++) { | 372 for (int i = 0; i < 256; i++) { |
371 builder.Debugger(); | 373 builder.Debugger(); |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 iterator.Advance(); | 830 iterator.Advance(); |
829 } | 831 } |
830 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 832 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
831 iterator.Advance(); | 833 iterator.Advance(); |
832 CHECK(iterator.done()); | 834 CHECK(iterator.done()); |
833 } | 835 } |
834 | 836 |
835 } // namespace interpreter | 837 } // namespace interpreter |
836 } // namespace internal | 838 } // namespace internal |
837 } // namespace v8 | 839 } // namespace v8 |
OLD | NEW |