| 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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
| 10 // | 10 // |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 VisitForStackValue(declaration->fun()); | 919 VisitForStackValue(declaration->fun()); |
| 920 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); | 920 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); |
| 921 break; | 921 break; |
| 922 } | 922 } |
| 923 } | 923 } |
| 924 } | 924 } |
| 925 | 925 |
| 926 | 926 |
| 927 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { | 927 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { |
| 928 Variable* variable = declaration->proxy()->var(); | 928 Variable* variable = declaration->proxy()->var(); |
| 929 Interface* interface = declaration->module()->interface(); |
| 929 DCHECK(variable->location() == Variable::CONTEXT); | 930 DCHECK(variable->location() == Variable::CONTEXT); |
| 930 DCHECK(variable->interface()->IsFrozen()); | 931 DCHECK(interface->IsFrozen()); |
| 931 Comment cmnt(masm_, "[ ModuleDeclaration"); | 932 Comment cmnt(masm_, "[ ModuleDeclaration"); |
| 932 EmitDebugCheckDeclarationContext(variable); | 933 EmitDebugCheckDeclarationContext(variable); |
| 933 | 934 |
| 934 // Load instance object. | 935 // Load instance object. |
| 935 __ LoadContext(a1, scope_->ContextChainLength(scope_->ScriptScope())); | 936 __ LoadContext(a1, scope_->ContextChainLength(scope_->ScriptScope())); |
| 936 __ ld(a1, ContextOperand(a1, variable->interface()->Index())); | 937 __ ld(a1, ContextOperand(a1, interface->Index())); |
| 937 __ ld(a1, ContextOperand(a1, Context::EXTENSION_INDEX)); | 938 __ ld(a1, ContextOperand(a1, Context::EXTENSION_INDEX)); |
| 938 | 939 |
| 939 // Assign it. | 940 // Assign it. |
| 940 __ sd(a1, ContextOperand(cp, variable->index())); | 941 __ sd(a1, ContextOperand(cp, variable->index())); |
| 941 // We know that we have written a module, which is not a smi. | 942 // We know that we have written a module, which is not a smi. |
| 942 __ RecordWriteContextSlot(cp, | 943 __ RecordWriteContextSlot(cp, |
| 943 Context::SlotOffset(variable->index()), | 944 Context::SlotOffset(variable->index()), |
| 944 a1, | 945 a1, |
| 945 a3, | 946 a3, |
| 946 kRAHasBeenSaved, | 947 kRAHasBeenSaved, |
| (...skipping 4481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5428 Assembler::target_address_at(pc_immediate_load_address)) == | 5429 Assembler::target_address_at(pc_immediate_load_address)) == |
| 5429 reinterpret_cast<uint64_t>( | 5430 reinterpret_cast<uint64_t>( |
| 5430 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5431 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5431 return OSR_AFTER_STACK_CHECK; | 5432 return OSR_AFTER_STACK_CHECK; |
| 5432 } | 5433 } |
| 5433 | 5434 |
| 5434 | 5435 |
| 5435 } } // namespace v8::internal | 5436 } } // namespace v8::internal |
| 5436 | 5437 |
| 5437 #endif // V8_TARGET_ARCH_MIPS64 | 5438 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |