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

Side by Side Diff: src/ppc/full-codegen-ppc.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/mips64/full-codegen-mips64.cc ('k') | src/prettyprinter.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 7 #if V8_TARGET_ARCH_PPC
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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 __ Push(cp, r5, r4); 912 __ Push(cp, r5, r4);
913 // Push initial value for function declaration. 913 // Push initial value for function declaration.
914 VisitForStackValue(declaration->fun()); 914 VisitForStackValue(declaration->fun());
915 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 915 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
916 break; 916 break;
917 } 917 }
918 } 918 }
919 } 919 }
920 920
921 921
922 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
923 Variable* variable = declaration->proxy()->var();
924 ModuleDescriptor* descriptor = declaration->module()->descriptor();
925 DCHECK(variable->location() == Variable::CONTEXT);
926 DCHECK(descriptor->IsFrozen());
927
928 Comment cmnt(masm_, "[ ModuleDeclaration");
929 EmitDebugCheckDeclarationContext(variable);
930
931 // Load instance object.
932 __ LoadContext(r4, scope_->ContextChainLength(scope_->ScriptScope()));
933 __ LoadP(r4, ContextOperand(r4, descriptor->Index()));
934 __ LoadP(r4, ContextOperand(r4, Context::EXTENSION_INDEX));
935
936 // Assign it.
937 __ StoreP(r4, ContextOperand(cp, variable->index()), r0);
938 // We know that we have written a module, which is not a smi.
939 __ RecordWriteContextSlot(cp, Context::SlotOffset(variable->index()), r4, r6,
940 kLRHasBeenSaved, kDontSaveFPRegs,
941 EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
942 PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS);
943
944 // Traverse into body.
945 Visit(declaration->module());
946 }
947
948
949 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) { 922 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) {
950 VariableProxy* proxy = declaration->proxy(); 923 VariableProxy* proxy = declaration->proxy();
951 Variable* variable = proxy->var(); 924 Variable* variable = proxy->var();
952 switch (variable->location()) { 925 switch (variable->location()) {
953 case Variable::UNALLOCATED: 926 case Variable::UNALLOCATED:
954 // TODO(rossberg) 927 // TODO(rossberg)
955 break; 928 break;
956 929
957 case Variable::CONTEXT: { 930 case Variable::CONTEXT: {
958 Comment cmnt(masm_, "[ ImportDeclaration"); 931 Comment cmnt(masm_, "[ ImportDeclaration");
(...skipping 4516 matching lines...) Expand 10 before | Expand all | Expand 10 after
5475 return ON_STACK_REPLACEMENT; 5448 return ON_STACK_REPLACEMENT;
5476 } 5449 }
5477 5450
5478 DCHECK(interrupt_address == 5451 DCHECK(interrupt_address ==
5479 isolate->builtins()->OsrAfterStackCheck()->entry()); 5452 isolate->builtins()->OsrAfterStackCheck()->entry());
5480 return OSR_AFTER_STACK_CHECK; 5453 return OSR_AFTER_STACK_CHECK;
5481 } 5454 }
5482 } 5455 }
5483 } // namespace v8::internal 5456 } // namespace v8::internal
5484 #endif // V8_TARGET_ARCH_PPC 5457 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/prettyprinter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698