| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/bytecode-generator.h" | 5 #include "src/interpreter/bytecode-generator.h" |
| 6 | 6 |
| 7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3122 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); | 3122 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); |
| 3123 } | 3123 } |
| 3124 } | 3124 } |
| 3125 | 3125 |
| 3126 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); } | 3126 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); } |
| 3127 | 3127 |
| 3128 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { | 3128 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { |
| 3129 UNREACHABLE(); | 3129 UNREACHABLE(); |
| 3130 } | 3130 } |
| 3131 | 3131 |
| 3132 void BytecodeGenerator::VisitImportCallExpression(ImportCallExpression* expr) { |
| 3133 RegisterList args = register_allocator()->NewRegisterList(2); |
| 3134 VisitForRegisterValue(expr->argument(), args[1]); |
| 3135 builder() |
| 3136 ->MoveRegister(Register::function_closure(), args[0]) |
| 3137 .CallRuntime(Runtime::kDynamicImportCall, args); |
| 3138 } |
| 3139 |
| 3132 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) { | 3140 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) { |
| 3133 FeedbackSlot load_slot = expr->IteratorPropertyFeedbackSlot(); | 3141 FeedbackSlot load_slot = expr->IteratorPropertyFeedbackSlot(); |
| 3134 FeedbackSlot call_slot = expr->IteratorCallFeedbackSlot(); | 3142 FeedbackSlot call_slot = expr->IteratorCallFeedbackSlot(); |
| 3135 | 3143 |
| 3136 RegisterList args = register_allocator()->NewRegisterList(1); | 3144 RegisterList args = register_allocator()->NewRegisterList(1); |
| 3137 Register method = register_allocator()->NewRegister(); | 3145 Register method = register_allocator()->NewRegister(); |
| 3138 Register obj = args[0]; | 3146 Register obj = args[0]; |
| 3139 | 3147 |
| 3140 VisitForAccumulatorValue(expr->iterable()); | 3148 VisitForAccumulatorValue(expr->iterable()); |
| 3141 | 3149 |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3632 } | 3640 } |
| 3633 | 3641 |
| 3634 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { | 3642 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { |
| 3635 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict | 3643 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
| 3636 : Runtime::kStoreKeyedToSuper_Sloppy; | 3644 : Runtime::kStoreKeyedToSuper_Sloppy; |
| 3637 } | 3645 } |
| 3638 | 3646 |
| 3639 } // namespace interpreter | 3647 } // namespace interpreter |
| 3640 } // namespace internal | 3648 } // namespace internal |
| 3641 } // namespace v8 | 3649 } // namespace v8 |
| OLD | NEW |