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

Side by Side Diff: src/x64/full-codegen-x64.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/typing.cc ('k') | src/x87/full-codegen-x87.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_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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 __ Push(variable->name()); 914 __ Push(variable->name());
915 __ Push(Smi::FromInt(NONE)); 915 __ Push(Smi::FromInt(NONE));
916 VisitForStackValue(declaration->fun()); 916 VisitForStackValue(declaration->fun());
917 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 917 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
918 break; 918 break;
919 } 919 }
920 } 920 }
921 } 921 }
922 922
923 923
924 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
925 Variable* variable = declaration->proxy()->var();
926 ModuleDescriptor* descriptor = declaration->module()->descriptor();
927 DCHECK(variable->location() == Variable::CONTEXT);
928 DCHECK(descriptor->IsFrozen());
929
930 Comment cmnt(masm_, "[ ModuleDeclaration");
931 EmitDebugCheckDeclarationContext(variable);
932
933 // Load instance object.
934 __ LoadContext(rax, scope_->ContextChainLength(scope_->ScriptScope()));
935 __ movp(rax, ContextOperand(rax, descriptor->Index()));
936 __ movp(rax, ContextOperand(rax, Context::EXTENSION_INDEX));
937
938 // Assign it.
939 __ movp(ContextOperand(rsi, variable->index()), rax);
940 // We know that we have written a module, which is not a smi.
941 __ RecordWriteContextSlot(rsi,
942 Context::SlotOffset(variable->index()),
943 rax,
944 rcx,
945 kDontSaveFPRegs,
946 EMIT_REMEMBERED_SET,
947 OMIT_SMI_CHECK);
948 PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS);
949
950 // Traverse into body.
951 Visit(declaration->module());
952 }
953
954
955 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) { 924 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) {
956 VariableProxy* proxy = declaration->proxy(); 925 VariableProxy* proxy = declaration->proxy();
957 Variable* variable = proxy->var(); 926 Variable* variable = proxy->var();
958 switch (variable->location()) { 927 switch (variable->location()) {
959 case Variable::UNALLOCATED: 928 case Variable::UNALLOCATED:
960 // TODO(rossberg) 929 // TODO(rossberg)
961 break; 930 break;
962 931
963 case Variable::CONTEXT: { 932 case Variable::CONTEXT: {
964 Comment cmnt(masm_, "[ ImportDeclaration"); 933 Comment cmnt(masm_, "[ ImportDeclaration");
(...skipping 4454 matching lines...) Expand 10 before | Expand all | Expand 10 after
5419 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5388 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5420 Assembler::target_address_at(call_target_address, 5389 Assembler::target_address_at(call_target_address,
5421 unoptimized_code)); 5390 unoptimized_code));
5422 return OSR_AFTER_STACK_CHECK; 5391 return OSR_AFTER_STACK_CHECK;
5423 } 5392 }
5424 5393
5425 5394
5426 } } // namespace v8::internal 5395 } } // namespace v8::internal
5427 5396
5428 #endif // V8_TARGET_ARCH_X64 5397 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/typing.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698