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

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

Powered by Google App Engine
This is Rietveld 408576698