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 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3027 builder()->SetExpressionPosition(expr); | 3027 builder()->SetExpressionPosition(expr); |
3028 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); | 3028 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); |
3029 } | 3029 } |
3030 | 3030 |
3031 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); } | 3031 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); } |
3032 | 3032 |
3033 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { | 3033 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { |
3034 UNREACHABLE(); | 3034 UNREACHABLE(); |
3035 } | 3035 } |
3036 | 3036 |
| 3037 void BytecodeGenerator::VisitImportCallExpression(ImportCallExpression* expr) { |
| 3038 RegisterList args = register_allocator()->NewRegisterList(2); |
| 3039 VisitForRegisterValue(expr->argument(), args[1]); |
| 3040 builder() |
| 3041 ->MoveRegister(Register::function_closure(), args[0]) |
| 3042 .CallRuntime(Runtime::kDynamicImportCall, args); |
| 3043 } |
| 3044 |
3037 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) { | 3045 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) { |
3038 FeedbackSlot load_slot = expr->IteratorPropertyFeedbackSlot(); | 3046 FeedbackSlot load_slot = expr->IteratorPropertyFeedbackSlot(); |
3039 FeedbackSlot call_slot = expr->IteratorCallFeedbackSlot(); | 3047 FeedbackSlot call_slot = expr->IteratorCallFeedbackSlot(); |
3040 | 3048 |
3041 RegisterList args = register_allocator()->NewRegisterList(1); | 3049 RegisterList args = register_allocator()->NewRegisterList(1); |
3042 Register method = register_allocator()->NewRegister(); | 3050 Register method = register_allocator()->NewRegister(); |
3043 Register obj = args[0]; | 3051 Register obj = args[0]; |
3044 | 3052 |
3045 VisitForAccumulatorValue(expr->iterable()); | 3053 VisitForAccumulatorValue(expr->iterable()); |
3046 | 3054 |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3519 } | 3527 } |
3520 | 3528 |
3521 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { | 3529 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { |
3522 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict | 3530 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
3523 : Runtime::kStoreKeyedToSuper_Sloppy; | 3531 : Runtime::kStoreKeyedToSuper_Sloppy; |
3524 } | 3532 } |
3525 | 3533 |
3526 } // namespace interpreter | 3534 } // namespace interpreter |
3527 } // namespace internal | 3535 } // namespace internal |
3528 } // namespace v8 | 3536 } // namespace v8 |
OLD | NEW |