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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 VisitForStackValue(declaration->fun()); | 886 VisitForStackValue(declaration->fun()); |
887 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); | 887 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); |
888 break; | 888 break; |
889 } | 889 } |
890 } | 890 } |
891 } | 891 } |
892 | 892 |
893 | 893 |
894 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { | 894 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { |
895 Variable* variable = declaration->proxy()->var(); | 895 Variable* variable = declaration->proxy()->var(); |
896 Interface* interface = declaration->module()->interface(); | 896 ModuleDescriptor* descriptor = declaration->module()->descriptor(); |
897 DCHECK(variable->location() == Variable::CONTEXT); | 897 DCHECK(variable->location() == Variable::CONTEXT); |
898 DCHECK(interface->IsFrozen()); | 898 DCHECK(descriptor->IsFrozen()); |
899 | 899 |
900 Comment cmnt(masm_, "[ ModuleDeclaration"); | 900 Comment cmnt(masm_, "[ ModuleDeclaration"); |
901 EmitDebugCheckDeclarationContext(variable); | 901 EmitDebugCheckDeclarationContext(variable); |
902 | 902 |
903 // Load instance object. | 903 // Load instance object. |
904 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope())); | 904 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope())); |
905 __ mov(eax, ContextOperand(eax, interface->Index())); | 905 __ mov(eax, ContextOperand(eax, descriptor->Index())); |
906 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX)); | 906 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX)); |
907 | 907 |
908 // Assign it. | 908 // Assign it. |
909 __ mov(ContextOperand(esi, variable->index()), eax); | 909 __ mov(ContextOperand(esi, variable->index()), eax); |
910 // We know that we have written a module, which is not a smi. | 910 // We know that we have written a module, which is not a smi. |
911 __ RecordWriteContextSlot(esi, | 911 __ RecordWriteContextSlot(esi, |
912 Context::SlotOffset(variable->index()), | 912 Context::SlotOffset(variable->index()), |
913 eax, | 913 eax, |
914 ecx, | 914 ecx, |
915 kDontSaveFPRegs, | 915 kDontSaveFPRegs, |
(...skipping 4450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5366 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5366 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5367 Assembler::target_address_at(call_target_address, | 5367 Assembler::target_address_at(call_target_address, |
5368 unoptimized_code)); | 5368 unoptimized_code)); |
5369 return OSR_AFTER_STACK_CHECK; | 5369 return OSR_AFTER_STACK_CHECK; |
5370 } | 5370 } |
5371 | 5371 |
5372 | 5372 |
5373 } } // namespace v8::internal | 5373 } } // namespace v8::internal |
5374 | 5374 |
5375 #endif // V8_TARGET_ARCH_IA32 | 5375 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |