| Index: src/interpreter/bytecode-generator.cc
|
| diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
|
| index 052f29367dadd6a4fa1b5fca9948f9ffe4c66a41..84a1868e16bca504031fd7b3904515959fe9f666 100644
|
| --- a/src/interpreter/bytecode-generator.cc
|
| +++ b/src/interpreter/bytecode-generator.cc
|
| @@ -635,7 +635,9 @@ BytecodeGenerator::BytecodeGenerator(CompilationInfo* info)
|
| execution_result_(nullptr),
|
| generator_resume_points_(info->literal()->yield_count(), info->zone()),
|
| generator_state_(),
|
| - loop_depth_(0) {
|
| + loop_depth_(0),
|
| + source_url_entry_(0),
|
| + has_source_url_entry_(false) {
|
| DCHECK_EQ(closure_scope(), closure_scope()->GetClosureScope());
|
| }
|
|
|
| @@ -696,6 +698,11 @@ void BytecodeGenerator::AllocateDeferredConstants(Isolate* isolate) {
|
| array_literal->GetOrBuildConstantElements(isolate);
|
| builder()->SetDeferredConstantPoolEntry(literal.second, constant_elements);
|
| }
|
| +
|
| + if (has_source_url_entry()) {
|
| + Handle<String> url(String::cast(info()->script()->name()));
|
| + builder()->SetDeferredConstantPoolEntry(source_url_entry(), url);
|
| + }
|
| }
|
|
|
| void BytecodeGenerator::GenerateBytecode(uintptr_t stack_limit) {
|
| @@ -3003,6 +3010,17 @@ void BytecodeGenerator::VisitEmptyParentheses(EmptyParentheses* expr) {
|
| UNREACHABLE();
|
| }
|
|
|
| +void BytecodeGenerator::VisitImportCallExpression(ImportCallExpression* expr) {
|
| + size_t entry = builder()->AllocateDeferredConstantPoolEntry();
|
| + set_source_url_entry(entry);
|
| + RegisterList args = register_allocator()->NewRegisterList(2);
|
| + VisitForRegisterValue(expr->arg(), args[1]);
|
| + builder()
|
| + ->LoadConstantPoolEntry(entry)
|
| + .StoreAccumulatorInRegister(args[0])
|
| + .CallRuntime(Runtime::kDynamicImportCall, args);
|
| +}
|
| +
|
| void BytecodeGenerator::VisitGetIterator(GetIterator* expr) {
|
| FeedbackSlot load_slot = expr->IteratorPropertyFeedbackSlot();
|
| FeedbackSlot call_slot = expr->IteratorCallFeedbackSlot();
|
|
|