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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 325 |
326 // CreateClosureWide | 326 // CreateClosureWide |
327 builder.CreateClosure(1000, NOT_TENURED); | 327 builder.CreateClosure(1000, NOT_TENURED); |
328 | 328 |
329 // Emit wide variant of literal creation operations. | 329 // Emit wide variant of literal creation operations. |
330 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("wide_literal"), | 330 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("wide_literal"), |
331 0, 0) | 331 0, 0) |
332 .CreateArrayLiteral(factory->NewFixedArray(2), 0, 0) | 332 .CreateArrayLiteral(factory->NewFixedArray(2), 0, 0) |
333 .CreateObjectLiteral(factory->NewFixedArray(2), 0, 0, reg); | 333 .CreateObjectLiteral(factory->NewFixedArray(2), 0, 0, reg); |
334 | 334 |
335 // Emit generator operations | 335 // Emit load and store operations for module variables. |
| 336 builder.LoadModuleVariable(-1, 42) |
| 337 .LoadModuleVariable(0, 42) |
| 338 .LoadModuleVariable(1, 42) |
| 339 .StoreModuleVariable(-1, 42) |
| 340 .StoreModuleVariable(0, 42) |
| 341 .StoreModuleVariable(1, 42); |
| 342 |
| 343 // Emit generator operations. |
336 builder.SuspendGenerator(reg) | 344 builder.SuspendGenerator(reg) |
337 .ResumeGenerator(reg); | 345 .ResumeGenerator(reg); |
338 | 346 |
339 // Intrinsics handled by the interpreter. | 347 // Intrinsics handled by the interpreter. |
340 builder.CallRuntime(Runtime::kInlineIsArray, reg_list); | 348 builder.CallRuntime(Runtime::kInlineIsArray, reg_list); |
341 | 349 |
342 // Emit debugger bytecode. | 350 // Emit debugger bytecode. |
343 builder.Debugger(); | 351 builder.Debugger(); |
344 | 352 |
345 // Insert dummy ops to force longer jumps. | 353 // Insert dummy ops to force longer jumps. |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 iterator.Advance(); | 746 iterator.Advance(); |
739 } | 747 } |
740 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 748 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
741 iterator.Advance(); | 749 iterator.Advance(); |
742 CHECK(iterator.done()); | 750 CHECK(iterator.done()); |
743 } | 751 } |
744 | 752 |
745 } // namespace interpreter | 753 } // namespace interpreter |
746 } // namespace internal | 754 } // namespace internal |
747 } // namespace v8 | 755 } // namespace v8 |
OLD | NEW |