OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 VisitForStackValue(declaration->fun()); | 928 VisitForStackValue(declaration->fun()); |
929 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); | 929 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); |
930 break; | 930 break; |
931 } | 931 } |
932 } | 932 } |
933 } | 933 } |
934 | 934 |
935 | 935 |
936 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { | 936 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { |
937 Variable* variable = declaration->proxy()->var(); | 937 Variable* variable = declaration->proxy()->var(); |
| 938 Interface* interface = declaration->module()->interface(); |
938 DCHECK(variable->location() == Variable::CONTEXT); | 939 DCHECK(variable->location() == Variable::CONTEXT); |
939 DCHECK(variable->interface()->IsFrozen()); | 940 DCHECK(interface->IsFrozen()); |
940 | 941 |
941 Comment cmnt(masm_, "[ ModuleDeclaration"); | 942 Comment cmnt(masm_, "[ ModuleDeclaration"); |
942 EmitDebugCheckDeclarationContext(variable); | 943 EmitDebugCheckDeclarationContext(variable); |
943 | 944 |
944 // Load instance object. | 945 // Load instance object. |
945 __ LoadContext(x1, scope_->ContextChainLength(scope_->ScriptScope())); | 946 __ LoadContext(x1, scope_->ContextChainLength(scope_->ScriptScope())); |
946 __ Ldr(x1, ContextMemOperand(x1, variable->interface()->Index())); | 947 __ Ldr(x1, ContextMemOperand(x1, interface->Index())); |
947 __ Ldr(x1, ContextMemOperand(x1, Context::EXTENSION_INDEX)); | 948 __ Ldr(x1, ContextMemOperand(x1, Context::EXTENSION_INDEX)); |
948 | 949 |
949 // Assign it. | 950 // Assign it. |
950 __ Str(x1, ContextMemOperand(cp, variable->index())); | 951 __ Str(x1, ContextMemOperand(cp, variable->index())); |
951 // We know that we have written a module, which is not a smi. | 952 // We know that we have written a module, which is not a smi. |
952 __ RecordWriteContextSlot(cp, | 953 __ RecordWriteContextSlot(cp, |
953 Context::SlotOffset(variable->index()), | 954 Context::SlotOffset(variable->index()), |
954 x1, | 955 x1, |
955 x3, | 956 x3, |
956 kLRHasBeenSaved, | 957 kLRHasBeenSaved, |
(...skipping 4504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5461 return previous_; | 5462 return previous_; |
5462 } | 5463 } |
5463 | 5464 |
5464 | 5465 |
5465 #undef __ | 5466 #undef __ |
5466 | 5467 |
5467 | 5468 |
5468 } } // namespace v8::internal | 5469 } } // namespace v8::internal |
5469 | 5470 |
5470 #endif // V8_TARGET_ARCH_ARM64 | 5471 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |