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 3001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3012 builder()->SetExpressionPosition(expr); | 3012 builder()->SetExpressionPosition(expr); |
3013 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); | 3013 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); |
3014 } | 3014 } |
3015 | 3015 |
3016 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); } | 3016 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); } |
3017 | 3017 |
3018 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { | 3018 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { |
3019 UNREACHABLE(); | 3019 UNREACHABLE(); |
3020 } | 3020 } |
3021 | 3021 |
| 3022 void BytecodeGenerator::VisitImportCallExpression(ImportCallExpression* expr) { |
| 3023 RegisterList args = register_allocator()->NewRegisterList(2); |
| 3024 VisitForRegisterValue(expr->argument(), args[1]); |
| 3025 builder() |
| 3026 ->MoveRegister(Register::function_closure(), args[0]) |
| 3027 .CallRuntime(Runtime::kDynamicImportCall, args); |
| 3028 } |
| 3029 |
3022 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) { | 3030 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) { |
3023 FeedbackSlot load_slot = expr->IteratorPropertyFeedbackSlot(); | 3031 FeedbackSlot load_slot = expr->IteratorPropertyFeedbackSlot(); |
3024 FeedbackSlot call_slot = expr->IteratorCallFeedbackSlot(); | 3032 FeedbackSlot call_slot = expr->IteratorCallFeedbackSlot(); |
3025 | 3033 |
3026 RegisterList args = register_allocator()->NewRegisterList(1); | 3034 RegisterList args = register_allocator()->NewRegisterList(1); |
3027 Register method = register_allocator()->NewRegister(); | 3035 Register method = register_allocator()->NewRegister(); |
3028 Register obj = args[0]; | 3036 Register obj = args[0]; |
3029 | 3037 |
3030 VisitForAccumulatorValue(expr->iterable()); | 3038 VisitForAccumulatorValue(expr->iterable()); |
3031 | 3039 |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3503 } | 3511 } |
3504 | 3512 |
3505 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { | 3513 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { |
3506 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict | 3514 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
3507 : Runtime::kStoreKeyedToSuper_Sloppy; | 3515 : Runtime::kStoreKeyedToSuper_Sloppy; |
3508 } | 3516 } |
3509 | 3517 |
3510 } // namespace interpreter | 3518 } // namespace interpreter |
3511 } // namespace internal | 3519 } // namespace internal |
3512 } // namespace v8 | 3520 } // namespace v8 |
OLD | NEW |