Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 918373002: Strip Interface class of most of its logic, make it all about Module exports (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Properly freeze interface at the end of ParseModule Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/interface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 DCHECK(variable->location() == Variable::CONTEXT); 897 DCHECK(variable->location() == Variable::CONTEXT);
897 DCHECK(variable->interface()->IsFrozen()); 898 DCHECK(interface->IsFrozen());
898 899
899 Comment cmnt(masm_, "[ ModuleDeclaration"); 900 Comment cmnt(masm_, "[ ModuleDeclaration");
900 EmitDebugCheckDeclarationContext(variable); 901 EmitDebugCheckDeclarationContext(variable);
901 902
902 // Load instance object. 903 // Load instance object.
903 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope())); 904 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope()));
904 __ mov(eax, ContextOperand(eax, variable->interface()->Index())); 905 __ mov(eax, ContextOperand(eax, interface->Index()));
905 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX)); 906 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX));
906 907
907 // Assign it. 908 // Assign it.
908 __ mov(ContextOperand(esi, variable->index()), eax); 909 __ mov(ContextOperand(esi, variable->index()), eax);
909 // 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.
910 __ RecordWriteContextSlot(esi, 911 __ RecordWriteContextSlot(esi,
911 Context::SlotOffset(variable->index()), 912 Context::SlotOffset(variable->index()),
912 eax, 913 eax,
913 ecx, 914 ecx,
914 kDontSaveFPRegs, 915 kDontSaveFPRegs,
(...skipping 4450 matching lines...) Expand 10 before | Expand all | Expand 10 after
5365 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5366 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5366 Assembler::target_address_at(call_target_address, 5367 Assembler::target_address_at(call_target_address,
5367 unoptimized_code)); 5368 unoptimized_code));
5368 return OSR_AFTER_STACK_CHECK; 5369 return OSR_AFTER_STACK_CHECK;
5369 } 5370 }
5370 5371
5371 5372
5372 } } // namespace v8::internal 5373 } } // namespace v8::internal
5373 5374
5374 #endif // V8_TARGET_ARCH_IA32 5375 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698