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

Side by Side Diff: src/mips64/full-codegen-mips64.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/mips/full-codegen-mips.cc ('k') | src/ppc/full-codegen-ppc.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_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
944 __ Push(cp, a2, a1); 944 __ Push(cp, a2, a1);
945 // Push initial value for function declaration. 945 // Push initial value for function declaration.
946 VisitForStackValue(declaration->fun()); 946 VisitForStackValue(declaration->fun());
947 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 947 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
948 break; 948 break;
949 } 949 }
950 } 950 }
951 } 951 }
952 952
953 953
954 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
955 Variable* variable = declaration->proxy()->var();
956 ModuleDescriptor* descriptor = declaration->module()->descriptor();
957 DCHECK(variable->location() == Variable::CONTEXT);
958 DCHECK(descriptor->IsFrozen());
959 Comment cmnt(masm_, "[ ModuleDeclaration");
960 EmitDebugCheckDeclarationContext(variable);
961
962 // Load instance object.
963 __ LoadContext(a1, scope_->ContextChainLength(scope_->ScriptScope()));
964 __ ld(a1, ContextOperand(a1, descriptor->Index()));
965 __ ld(a1, ContextOperand(a1, Context::EXTENSION_INDEX));
966
967 // Assign it.
968 __ sd(a1, ContextOperand(cp, variable->index()));
969 // We know that we have written a module, which is not a smi.
970 __ RecordWriteContextSlot(cp,
971 Context::SlotOffset(variable->index()),
972 a1,
973 a3,
974 kRAHasBeenSaved,
975 kDontSaveFPRegs,
976 EMIT_REMEMBERED_SET,
977 OMIT_SMI_CHECK);
978 PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS);
979
980 // Traverse into body.
981 Visit(declaration->module());
982 }
983
984
985 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) { 954 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) {
986 VariableProxy* proxy = declaration->proxy(); 955 VariableProxy* proxy = declaration->proxy();
987 Variable* variable = proxy->var(); 956 Variable* variable = proxy->var();
988 switch (variable->location()) { 957 switch (variable->location()) {
989 case Variable::UNALLOCATED: 958 case Variable::UNALLOCATED:
990 // TODO(rossberg) 959 // TODO(rossberg)
991 break; 960 break;
992 961
993 case Variable::CONTEXT: { 962 case Variable::CONTEXT: {
994 Comment cmnt(masm_, "[ ImportDeclaration"); 963 Comment cmnt(masm_, "[ ImportDeclaration");
(...skipping 4486 matching lines...) Expand 10 before | Expand all | Expand 10 after
5481 Assembler::target_address_at(pc_immediate_load_address)) == 5450 Assembler::target_address_at(pc_immediate_load_address)) ==
5482 reinterpret_cast<uint64_t>( 5451 reinterpret_cast<uint64_t>(
5483 isolate->builtins()->OsrAfterStackCheck()->entry())); 5452 isolate->builtins()->OsrAfterStackCheck()->entry()));
5484 return OSR_AFTER_STACK_CHECK; 5453 return OSR_AFTER_STACK_CHECK;
5485 } 5454 }
5486 5455
5487 5456
5488 } } // namespace v8::internal 5457 } } // namespace v8::internal
5489 5458
5490 #endif // V8_TARGET_ARCH_MIPS64 5459 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698