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

Side by Side Diff: src/x64/full-codegen-x64.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_X64 7 #if V8_TARGET_ARCH_X64
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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 VisitForStackValue(declaration->fun()); 890 VisitForStackValue(declaration->fun());
891 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 891 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
892 break; 892 break;
893 } 893 }
894 } 894 }
895 } 895 }
896 896
897 897
898 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { 898 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
899 Variable* variable = declaration->proxy()->var(); 899 Variable* variable = declaration->proxy()->var();
900 Interface* interface = declaration->module()->interface();
900 DCHECK(variable->location() == Variable::CONTEXT); 901 DCHECK(variable->location() == Variable::CONTEXT);
901 DCHECK(variable->interface()->IsFrozen()); 902 DCHECK(interface->IsFrozen());
902 903
903 Comment cmnt(masm_, "[ ModuleDeclaration"); 904 Comment cmnt(masm_, "[ ModuleDeclaration");
904 EmitDebugCheckDeclarationContext(variable); 905 EmitDebugCheckDeclarationContext(variable);
905 906
906 // Load instance object. 907 // Load instance object.
907 __ LoadContext(rax, scope_->ContextChainLength(scope_->ScriptScope())); 908 __ LoadContext(rax, scope_->ContextChainLength(scope_->ScriptScope()));
908 __ movp(rax, ContextOperand(rax, variable->interface()->Index())); 909 __ movp(rax, ContextOperand(rax, interface->Index()));
909 __ movp(rax, ContextOperand(rax, Context::EXTENSION_INDEX)); 910 __ movp(rax, ContextOperand(rax, Context::EXTENSION_INDEX));
910 911
911 // Assign it. 912 // Assign it.
912 __ movp(ContextOperand(rsi, variable->index()), rax); 913 __ movp(ContextOperand(rsi, variable->index()), rax);
913 // We know that we have written a module, which is not a smi. 914 // We know that we have written a module, which is not a smi.
914 __ RecordWriteContextSlot(rsi, 915 __ RecordWriteContextSlot(rsi,
915 Context::SlotOffset(variable->index()), 916 Context::SlotOffset(variable->index()),
916 rax, 917 rax,
917 rcx, 918 rcx,
918 kDontSaveFPRegs, 919 kDontSaveFPRegs,
(...skipping 4447 matching lines...) Expand 10 before | Expand all | Expand 10 after
5366 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5367 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5367 Assembler::target_address_at(call_target_address, 5368 Assembler::target_address_at(call_target_address,
5368 unoptimized_code)); 5369 unoptimized_code));
5369 return OSR_AFTER_STACK_CHECK; 5370 return OSR_AFTER_STACK_CHECK;
5370 } 5371 }
5371 5372
5372 5373
5373 } } // namespace v8::internal 5374 } } // namespace v8::internal
5374 5375
5375 #endif // V8_TARGET_ARCH_X64 5376 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/interface.cc ('K') | « src/variables.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698