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

Side by Side Diff: src/x87/full-codegen-x87.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_X87 7 #if V8_TARGET_ARCH_X87
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 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 VisitForStackValue(declaration->fun()); 859 VisitForStackValue(declaration->fun());
860 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 860 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
861 break; 861 break;
862 } 862 }
863 } 863 }
864 } 864 }
865 865
866 866
867 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { 867 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
868 Variable* variable = declaration->proxy()->var(); 868 Variable* variable = declaration->proxy()->var();
869 Interface* interface = declaration->module()->interface();
869 DCHECK(variable->location() == Variable::CONTEXT); 870 DCHECK(variable->location() == Variable::CONTEXT);
870 DCHECK(variable->interface()->IsFrozen()); 871 DCHECK(interface->IsFrozen());
871 872
872 Comment cmnt(masm_, "[ ModuleDeclaration"); 873 Comment cmnt(masm_, "[ ModuleDeclaration");
873 EmitDebugCheckDeclarationContext(variable); 874 EmitDebugCheckDeclarationContext(variable);
874 875
875 // Load instance object. 876 // Load instance object.
876 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope())); 877 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope()));
877 __ mov(eax, ContextOperand(eax, variable->interface()->Index())); 878 __ mov(eax, ContextOperand(eax, interface->Index()));
878 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX)); 879 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX));
879 880
880 // Assign it. 881 // Assign it.
881 __ mov(ContextOperand(esi, variable->index()), eax); 882 __ mov(ContextOperand(esi, variable->index()), eax);
882 // We know that we have written a module, which is not a smi. 883 // We know that we have written a module, which is not a smi.
883 __ RecordWriteContextSlot(esi, Context::SlotOffset(variable->index()), eax, 884 __ RecordWriteContextSlot(esi, Context::SlotOffset(variable->index()), eax,
884 ecx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, 885 ecx, kDontSaveFPRegs, EMIT_REMEMBERED_SET,
885 OMIT_SMI_CHECK); 886 OMIT_SMI_CHECK);
886 PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS); 887 PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS);
887 888
(...skipping 4440 matching lines...) Expand 10 before | Expand all | Expand 10 after
5328 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5329 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5329 Assembler::target_address_at(call_target_address, 5330 Assembler::target_address_at(call_target_address,
5330 unoptimized_code)); 5331 unoptimized_code));
5331 return OSR_AFTER_STACK_CHECK; 5332 return OSR_AFTER_STACK_CHECK;
5332 } 5333 }
5333 5334
5334 5335
5335 } } // namespace v8::internal 5336 } } // namespace v8::internal
5336 5337
5337 #endif // V8_TARGET_ARCH_X87 5338 #endif // V8_TARGET_ARCH_X87
OLDNEW
« src/interface.cc ('K') | « src/x64/full-codegen-x64.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698