| 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 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 VisitForStackValue(declaration->fun()); | 950 VisitForStackValue(declaration->fun()); |
| 951 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); | 951 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); |
| 952 break; | 952 break; |
| 953 } | 953 } |
| 954 } | 954 } |
| 955 } | 955 } |
| 956 | 956 |
| 957 | 957 |
| 958 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { | 958 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { |
| 959 Variable* variable = declaration->proxy()->var(); | 959 Variable* variable = declaration->proxy()->var(); |
| 960 Interface* interface = declaration->module()->interface(); | 960 ModuleDescriptor* descriptor = declaration->module()->descriptor(); |
| 961 DCHECK(variable->location() == Variable::CONTEXT); | 961 DCHECK(variable->location() == Variable::CONTEXT); |
| 962 DCHECK(interface->IsFrozen()); | 962 DCHECK(descriptor->IsFrozen()); |
| 963 | 963 |
| 964 Comment cmnt(masm_, "[ ModuleDeclaration"); | 964 Comment cmnt(masm_, "[ ModuleDeclaration"); |
| 965 EmitDebugCheckDeclarationContext(variable); | 965 EmitDebugCheckDeclarationContext(variable); |
| 966 | 966 |
| 967 // Load instance object. | 967 // Load instance object. |
| 968 __ LoadContext(r1, scope_->ContextChainLength(scope_->ScriptScope())); | 968 __ LoadContext(r1, scope_->ContextChainLength(scope_->ScriptScope())); |
| 969 __ ldr(r1, ContextOperand(r1, interface->Index())); | 969 __ ldr(r1, ContextOperand(r1, descriptor->Index())); |
| 970 __ ldr(r1, ContextOperand(r1, Context::EXTENSION_INDEX)); | 970 __ ldr(r1, ContextOperand(r1, Context::EXTENSION_INDEX)); |
| 971 | 971 |
| 972 // Assign it. | 972 // Assign it. |
| 973 __ str(r1, ContextOperand(cp, variable->index())); | 973 __ str(r1, ContextOperand(cp, variable->index())); |
| 974 // We know that we have written a module, which is not a smi. | 974 // We know that we have written a module, which is not a smi. |
| 975 __ RecordWriteContextSlot(cp, | 975 __ RecordWriteContextSlot(cp, |
| 976 Context::SlotOffset(variable->index()), | 976 Context::SlotOffset(variable->index()), |
| 977 r1, | 977 r1, |
| 978 r3, | 978 r3, |
| 979 kLRHasBeenSaved, | 979 kLRHasBeenSaved, |
| (...skipping 4521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5501 | 5501 |
| 5502 DCHECK(interrupt_address == | 5502 DCHECK(interrupt_address == |
| 5503 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5503 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5504 return OSR_AFTER_STACK_CHECK; | 5504 return OSR_AFTER_STACK_CHECK; |
| 5505 } | 5505 } |
| 5506 | 5506 |
| 5507 | 5507 |
| 5508 } } // namespace v8::internal | 5508 } } // namespace v8::internal |
| 5509 | 5509 |
| 5510 #endif // V8_TARGET_ARCH_ARM | 5510 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |