| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 builder.LoadLookupGlobalSlot(name, TypeofMode::NOT_INSIDE_TYPEOF, 1, 0) | 114 builder.LoadLookupGlobalSlot(name, TypeofMode::NOT_INSIDE_TYPEOF, 1, 0) |
| 115 .LoadLookupGlobalSlot(name, TypeofMode::INSIDE_TYPEOF, 1, 0); | 115 .LoadLookupGlobalSlot(name, TypeofMode::INSIDE_TYPEOF, 1, 0); |
| 116 | 116 |
| 117 // Emit closure operations. | 117 // Emit closure operations. |
| 118 builder.CreateClosure(0, NOT_TENURED); | 118 builder.CreateClosure(0, NOT_TENURED); |
| 119 | 119 |
| 120 // Emit create context operation. | 120 // Emit create context operation. |
| 121 builder.CreateBlockContext(factory->NewScopeInfo(1)); | 121 builder.CreateBlockContext(factory->NewScopeInfo(1)); |
| 122 builder.CreateCatchContext(reg, name, factory->NewScopeInfo(1)); | 122 builder.CreateCatchContext(reg, name, factory->NewScopeInfo(1)); |
| 123 builder.CreateFunctionContext(1); | 123 builder.CreateFunctionContext(1); |
| 124 builder.CreateEvalContext(1); |
| 124 builder.CreateWithContext(reg, factory->NewScopeInfo(1)); | 125 builder.CreateWithContext(reg, factory->NewScopeInfo(1)); |
| 125 | 126 |
| 126 // Emit literal creation operations. | 127 // Emit literal creation operations. |
| 127 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) | 128 builder.CreateRegExpLiteral(factory->NewStringFromStaticChars("a"), 0, 0) |
| 128 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) | 129 .CreateArrayLiteral(factory->NewFixedArray(1), 0, 0) |
| 129 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg); | 130 .CreateObjectLiteral(factory->NewFixedArray(1), 0, 0, reg); |
| 130 | 131 |
| 131 // Call operations. | 132 // Call operations. |
| 132 builder.Call(reg, reg_list, 1, Call::GLOBAL_CALL) | 133 builder.Call(reg, reg_list, 1, Call::GLOBAL_CALL) |
| 133 .Call(reg, reg_list, 1, Call::NAMED_PROPERTY_CALL, | 134 .Call(reg, reg_list, 1, Call::NAMED_PROPERTY_CALL, |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 iterator.Advance(); | 744 iterator.Advance(); |
| 744 } | 745 } |
| 745 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); | 746 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); |
| 746 iterator.Advance(); | 747 iterator.Advance(); |
| 747 CHECK(iterator.done()); | 748 CHECK(iterator.done()); |
| 748 } | 749 } |
| 749 | 750 |
| 750 } // namespace interpreter | 751 } // namespace interpreter |
| 751 } // namespace internal | 752 } // namespace internal |
| 752 } // namespace v8 | 753 } // namespace v8 |
| OLD | NEW |