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

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: Merged to trunk 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
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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 VisitForStackValue(declaration->fun()); 866 VisitForStackValue(declaration->fun());
867 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 867 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
868 break; 868 break;
869 } 869 }
870 } 870 }
871 } 871 }
872 872
873 873
874 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { 874 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
875 Variable* variable = declaration->proxy()->var(); 875 Variable* variable = declaration->proxy()->var();
876 Interface* interface = declaration->module()->interface();
876 DCHECK(variable->location() == Variable::CONTEXT); 877 DCHECK(variable->location() == Variable::CONTEXT);
877 DCHECK(variable->interface()->IsFrozen()); 878 DCHECK(interface->IsFrozen());
878 879
879 Comment cmnt(masm_, "[ ModuleDeclaration"); 880 Comment cmnt(masm_, "[ ModuleDeclaration");
880 EmitDebugCheckDeclarationContext(variable); 881 EmitDebugCheckDeclarationContext(variable);
881 882
882 // Load instance object. 883 // Load instance object.
883 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope())); 884 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope()));
884 __ mov(eax, ContextOperand(eax, variable->interface()->Index())); 885 __ mov(eax, ContextOperand(eax, interface->Index()));
885 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX)); 886 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX));
886 887
887 // Assign it. 888 // Assign it.
888 __ mov(ContextOperand(esi, variable->index()), eax); 889 __ mov(ContextOperand(esi, variable->index()), eax);
889 // We know that we have written a module, which is not a smi. 890 // We know that we have written a module, which is not a smi.
890 __ RecordWriteContextSlot(esi, 891 __ RecordWriteContextSlot(esi,
891 Context::SlotOffset(variable->index()), 892 Context::SlotOffset(variable->index()),
892 eax, 893 eax,
893 ecx, 894 ecx,
894 kDontSaveFPRegs, 895 kDontSaveFPRegs,
(...skipping 4450 matching lines...) Expand 10 before | Expand all | Expand 10 after
5345 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5346 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5346 Assembler::target_address_at(call_target_address, 5347 Assembler::target_address_at(call_target_address,
5347 unoptimized_code)); 5348 unoptimized_code));
5348 return OSR_AFTER_STACK_CHECK; 5349 return OSR_AFTER_STACK_CHECK;
5349 } 5350 }
5350 5351
5351 5352
5352 } } // namespace v8::internal 5353 } } // namespace v8::internal
5353 5354
5354 #endif // V8_TARGET_ARCH_IA32 5355 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698