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

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

Issue 1106383008: Remove unused Module-related AST nodes and associated codegen (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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') | no next file » | 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 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 __ push(Immediate(variable->name())); 884 __ push(Immediate(variable->name()));
885 __ push(Immediate(Smi::FromInt(NONE))); 885 __ push(Immediate(Smi::FromInt(NONE)));
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) {
895 Variable* variable = declaration->proxy()->var();
896 ModuleDescriptor* descriptor = declaration->module()->descriptor();
897 DCHECK(variable->location() == Variable::CONTEXT);
898 DCHECK(descriptor->IsFrozen());
899
900 Comment cmnt(masm_, "[ ModuleDeclaration");
901 EmitDebugCheckDeclarationContext(variable);
902
903 // Load instance object.
904 __ LoadContext(eax, scope_->ContextChainLength(scope_->ScriptScope()));
905 __ mov(eax, ContextOperand(eax, descriptor->Index()));
906 __ mov(eax, ContextOperand(eax, Context::EXTENSION_INDEX));
907
908 // Assign it.
909 __ mov(ContextOperand(esi, variable->index()), eax);
910 // We know that we have written a module, which is not a smi.
911 __ RecordWriteContextSlot(esi, Context::SlotOffset(variable->index()), eax,
912 ecx, kDontSaveFPRegs, EMIT_REMEMBERED_SET,
913 OMIT_SMI_CHECK);
914 PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS);
915
916 // Traverse into body.
917 Visit(declaration->module());
918 }
919
920
921 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) { 894 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) {
922 VariableProxy* proxy = declaration->proxy(); 895 VariableProxy* proxy = declaration->proxy();
923 Variable* variable = proxy->var(); 896 Variable* variable = proxy->var();
924 switch (variable->location()) { 897 switch (variable->location()) {
925 case Variable::UNALLOCATED: 898 case Variable::UNALLOCATED:
926 // TODO(rossberg) 899 // TODO(rossberg)
927 break; 900 break;
928 901
929 case Variable::CONTEXT: { 902 case Variable::CONTEXT: {
930 Comment cmnt(masm_, "[ ImportDeclaration"); 903 Comment cmnt(masm_, "[ ImportDeclaration");
(...skipping 4454 matching lines...) Expand 10 before | Expand all | Expand 10 after
5385 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5358 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5386 Assembler::target_address_at(call_target_address, 5359 Assembler::target_address_at(call_target_address,
5387 unoptimized_code)); 5360 unoptimized_code));
5388 return OSR_AFTER_STACK_CHECK; 5361 return OSR_AFTER_STACK_CHECK;
5389 } 5362 }
5390 5363
5391 5364
5392 } } // namespace v8::internal 5365 } } // namespace v8::internal
5393 5366
5394 #endif // V8_TARGET_ARCH_X87 5367 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698