| 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 2985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2996 builder()->SetExpressionPosition(expr); | 2996 builder()->SetExpressionPosition(expr); |
| 2997 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); | 2997 builder()->BinaryOperation(expr->op(), lhs, feedback_index(slot)); |
| 2998 } | 2998 } |
| 2999 | 2999 |
| 3000 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); } | 3000 void BytecodeGenerator::VisitSpread(Spread* expr) { Visit(expr->expression()); } |
| 3001 | 3001 |
| 3002 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { | 3002 void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) { |
| 3003 UNREACHABLE(); | 3003 UNREACHABLE(); |
| 3004 } | 3004 } |
| 3005 | 3005 |
| 3006 void BytecodeGenerator::VisitImportCallExpression(ImportCallExpression* expr) { |
| 3007 RegisterList args = register_allocator()->NewRegisterList(2); |
| 3008 VisitForRegisterValue(expr->argument(), args[1]); |
| 3009 builder() |
| 3010 ->LoadAccumulatorWithRegister(Register::function_closure()) |
| 3011 .StoreAccumulatorInRegister(args[0]) |
| 3012 .CallRuntime(Runtime::kDynamicImportCall, args); |
| 3013 } |
| 3014 |
| 3006 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) { | 3015 void BytecodeGenerator::VisitGetIterator(GetIterator* expr) { |
| 3007 FeedbackSlot load_slot = expr->IteratorPropertyFeedbackSlot(); | 3016 FeedbackSlot load_slot = expr->IteratorPropertyFeedbackSlot(); |
| 3008 FeedbackSlot call_slot = expr->IteratorCallFeedbackSlot(); | 3017 FeedbackSlot call_slot = expr->IteratorCallFeedbackSlot(); |
| 3009 | 3018 |
| 3010 RegisterList args = register_allocator()->NewRegisterList(1); | 3019 RegisterList args = register_allocator()->NewRegisterList(1); |
| 3011 Register method = register_allocator()->NewRegister(); | 3020 Register method = register_allocator()->NewRegister(); |
| 3012 Register obj = args[0]; | 3021 Register obj = args[0]; |
| 3013 | 3022 |
| 3014 VisitForAccumulatorValue(expr->iterable()); | 3023 VisitForAccumulatorValue(expr->iterable()); |
| 3015 | 3024 |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3488 } | 3497 } |
| 3489 | 3498 |
| 3490 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { | 3499 Runtime::FunctionId BytecodeGenerator::StoreKeyedToSuperRuntimeId() { |
| 3491 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict | 3500 return is_strict(language_mode()) ? Runtime::kStoreKeyedToSuper_Strict |
| 3492 : Runtime::kStoreKeyedToSuper_Sloppy; | 3501 : Runtime::kStoreKeyedToSuper_Sloppy; |
| 3493 } | 3502 } |
| 3494 | 3503 |
| 3495 } // namespace interpreter | 3504 } // namespace interpreter |
| 3496 } // namespace internal | 3505 } // namespace internal |
| 3497 } // namespace v8 | 3506 } // namespace v8 |
| OLD | NEW |