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

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: 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/x64/full-codegen-x64.cc ('k') | test/cctest/test-parsing.cc » ('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_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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 VisitForStackValue(declaration->fun()); 879 VisitForStackValue(declaration->fun());
880 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 880 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
881 break; 881 break;
882 } 882 }
883 } 883 }
884 } 884 }
885 885
886 886
887 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) { 887 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
888 Variable* variable = declaration->proxy()->var(); 888 Variable* variable = declaration->proxy()->var();
889 Interface* interface = declaration->module()->interface();
889 DCHECK(variable->location() == Variable::CONTEXT); 890 DCHECK(variable->location() == Variable::CONTEXT);
890 DCHECK(variable->interface()->IsFrozen()); 891 DCHECK(interface->IsFrozen());
891 892
892 Comment cmnt(masm_, "[ ModuleDeclaration"); 893 Comment cmnt(masm_, "[ ModuleDeclaration");
893 EmitDebugCheckDeclarationContext(variable); 894 EmitDebugCheckDeclarationContext(variable);
894 895
895 // Load instance object. 896 // Load instance object.
896 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope())); 897 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope()));
897 __ mov(eax, ContextOperand(eax, variable->interface()->Index())); 898 __ mov(eax, ContextOperand(eax, interface->Index()));
898 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX)); 899 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX));
899 900
900 // Assign it. 901 // Assign it.
901 __ mov(ContextOperand(esi, variable->index()), eax); 902 __ mov(ContextOperand(esi, variable->index()), eax);
902 // We know that we have written a module, which is not a smi. 903 // We know that we have written a module, which is not a smi.
903 __ RecordWriteContextSlot(esi, Context::SlotOffset(variable->index()), eax, 904 __ RecordWriteContextSlot(esi, Context::SlotOffset(variable->index()), eax,
904 ecx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, 905 ecx, kDontSaveFPRegs, EMIT_REMEMBERED_SET,
905 OMIT_SMI_CHECK); 906 OMIT_SMI_CHECK);
906 PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS); 907 PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS);
907 908
(...skipping 4443 matching lines...) Expand 10 before | Expand all | Expand 10 after
5351 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5352 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5352 Assembler::target_address_at(call_target_address, 5353 Assembler::target_address_at(call_target_address,
5353 unoptimized_code)); 5354 unoptimized_code));
5354 return OSR_AFTER_STACK_CHECK; 5355 return OSR_AFTER_STACK_CHECK;
5355 } 5356 }
5356 5357
5357 5358
5358 } } // namespace v8::internal 5359 } } // namespace v8::internal
5359 5360
5360 #endif // V8_TARGET_ARCH_X87 5361 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « 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