| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 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 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 VisitForStackValue(declaration->fun()); | 931 VisitForStackValue(declaration->fun()); |
| 932 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); | 932 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); |
| 933 break; | 933 break; |
| 934 } | 934 } |
| 935 } | 935 } |
| 936 } | 936 } |
| 937 | 937 |
| 938 | 938 |
| 939 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { | 939 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { |
| 940 Variable* variable = declaration->proxy()->var(); | 940 Variable* variable = declaration->proxy()->var(); |
| 941 Interface* interface = declaration->module()->interface(); |
| 941 DCHECK(variable->location() == Variable::CONTEXT); | 942 DCHECK(variable->location() == Variable::CONTEXT); |
| 942 DCHECK(variable->interface()->IsFrozen()); | 943 DCHECK(interface->IsFrozen()); |
| 943 | 944 |
| 944 Comment cmnt(masm_, "[ ModuleDeclaration"); | 945 Comment cmnt(masm_, "[ ModuleDeclaration"); |
| 945 EmitDebugCheckDeclarationContext(variable); | 946 EmitDebugCheckDeclarationContext(variable); |
| 946 | 947 |
| 947 // Load instance object. | 948 // Load instance object. |
| 948 __ LoadContext(r1, scope_->ContextChainLength(scope_->ScriptScope())); | 949 __ LoadContext(r1, scope_->ContextChainLength(scope_->ScriptScope())); |
| 949 __ ldr(r1, ContextOperand(r1, variable->interface()->Index())); | 950 __ ldr(r1, ContextOperand(r1, interface->Index())); |
| 950 __ ldr(r1, ContextOperand(r1, Context::EXTENSION_INDEX)); | 951 __ ldr(r1, ContextOperand(r1, Context::EXTENSION_INDEX)); |
| 951 | 952 |
| 952 // Assign it. | 953 // Assign it. |
| 953 __ str(r1, ContextOperand(cp, variable->index())); | 954 __ str(r1, ContextOperand(cp, variable->index())); |
| 954 // We know that we have written a module, which is not a smi. | 955 // We know that we have written a module, which is not a smi. |
| 955 __ RecordWriteContextSlot(cp, | 956 __ RecordWriteContextSlot(cp, |
| 956 Context::SlotOffset(variable->index()), | 957 Context::SlotOffset(variable->index()), |
| 957 r1, | 958 r1, |
| 958 r3, | 959 r3, |
| 959 kLRHasBeenSaved, | 960 kLRHasBeenSaved, |
| (...skipping 4521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5481 | 5482 |
| 5482 DCHECK(interrupt_address == | 5483 DCHECK(interrupt_address == |
| 5483 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5484 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5484 return OSR_AFTER_STACK_CHECK; | 5485 return OSR_AFTER_STACK_CHECK; |
| 5485 } | 5486 } |
| 5486 | 5487 |
| 5487 | 5488 |
| 5488 } } // namespace v8::internal | 5489 } } // namespace v8::internal |
| 5489 | 5490 |
| 5490 #endif // V8_TARGET_ARCH_ARM | 5491 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |