Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 2703563002: [ESNext] Implement DynamicImportCall (Closed)
Patch Set: add test + comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« include/v8.h ('K') | « src/full-codegen/full-codegen.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698