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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 VisitForStackValue(declaration->fun()); | 943 VisitForStackValue(declaration->fun()); |
944 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); | 944 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); |
945 break; | 945 break; |
946 } | 946 } |
947 } | 947 } |
948 } | 948 } |
949 | 949 |
950 | 950 |
951 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { | 951 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { |
952 Variable* variable = declaration->proxy()->var(); | 952 Variable* variable = declaration->proxy()->var(); |
| 953 Interface* interface = declaration->module()->interface(); |
953 DCHECK(variable->location() == Variable::CONTEXT); | 954 DCHECK(variable->location() == Variable::CONTEXT); |
954 DCHECK(variable->interface()->IsFrozen()); | 955 DCHECK(interface->IsFrozen()); |
955 | 956 |
956 Comment cmnt(masm_, "[ ModuleDeclaration"); | 957 Comment cmnt(masm_, "[ ModuleDeclaration"); |
957 EmitDebugCheckDeclarationContext(variable); | 958 EmitDebugCheckDeclarationContext(variable); |
958 | 959 |
959 // Load instance object. | 960 // Load instance object. |
960 __ LoadContext(a1, scope_->ContextChainLength(scope_->ScriptScope())); | 961 __ LoadContext(a1, scope_->ContextChainLength(scope_->ScriptScope())); |
961 __ lw(a1, ContextOperand(a1, variable->interface()->Index())); | 962 __ lw(a1, ContextOperand(a1, interface->Index())); |
962 __ lw(a1, ContextOperand(a1, Context::EXTENSION_INDEX)); | 963 __ lw(a1, ContextOperand(a1, Context::EXTENSION_INDEX)); |
963 | 964 |
964 // Assign it. | 965 // Assign it. |
965 __ sw(a1, ContextOperand(cp, variable->index())); | 966 __ sw(a1, ContextOperand(cp, variable->index())); |
966 // We know that we have written a module, which is not a smi. | 967 // We know that we have written a module, which is not a smi. |
967 __ RecordWriteContextSlot(cp, | 968 __ RecordWriteContextSlot(cp, |
968 Context::SlotOffset(variable->index()), | 969 Context::SlotOffset(variable->index()), |
969 a1, | 970 a1, |
970 a3, | 971 a3, |
971 kRAHasBeenSaved, | 972 kRAHasBeenSaved, |
(...skipping 4470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5442 Assembler::target_address_at(pc_immediate_load_address)) == | 5443 Assembler::target_address_at(pc_immediate_load_address)) == |
5443 reinterpret_cast<uint32_t>( | 5444 reinterpret_cast<uint32_t>( |
5444 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5445 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5445 return OSR_AFTER_STACK_CHECK; | 5446 return OSR_AFTER_STACK_CHECK; |
5446 } | 5447 } |
5447 | 5448 |
5448 | 5449 |
5449 } } // namespace v8::internal | 5450 } } // namespace v8::internal |
5450 | 5451 |
5451 #endif // V8_TARGET_ARCH_MIPS | 5452 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |