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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/arm64/full-codegen-arm64.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_ARM 7 #if V8_TARGET_ARCH_ARM
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 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 __ Push(cp, r2, r1); 954 __ Push(cp, r2, r1);
955 // Push initial value for function declaration. 955 // Push initial value for function declaration.
956 VisitForStackValue(declaration->fun()); 956 VisitForStackValue(declaration->fun());
957 __ CallRuntime(Runtime::kDeclareLookupSlot, 4); 957 __ CallRuntime(Runtime::kDeclareLookupSlot, 4);
958 break; 958 break;
959 } 959 }
960 } 960 }
961 } 961 }
962 962
963 963
964 void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
965 Variable* variable = declaration->proxy()->var();
966 ModuleDescriptor* descriptor = declaration->module()->descriptor();
967 DCHECK(variable->location() == Variable::CONTEXT);
968 DCHECK(descriptor->IsFrozen());
969
970 Comment cmnt(masm_, "[ ModuleDeclaration");
971 EmitDebugCheckDeclarationContext(variable);
972
973 // Load instance object.
974 __ LoadContext(r1, scope_->ContextChainLength(scope_->ScriptScope()));
975 __ ldr(r1, ContextOperand(r1, descriptor->Index()));
976 __ ldr(r1, ContextOperand(r1, Context::EXTENSION_INDEX));
977
978 // Assign it.
979 __ str(r1, ContextOperand(cp, variable->index()));
980 // We know that we have written a module, which is not a smi.
981 __ RecordWriteContextSlot(cp,
982 Context::SlotOffset(variable->index()),
983 r1,
984 r3,
985 kLRHasBeenSaved,
986 kDontSaveFPRegs,
987 EMIT_REMEMBERED_SET,
988 OMIT_SMI_CHECK);
989 PrepareForBailoutForId(declaration->proxy()->id(), NO_REGISTERS);
990
991 // Traverse into body.
992 Visit(declaration->module());
993 }
994
995
996 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) { 964 void FullCodeGenerator::VisitImportDeclaration(ImportDeclaration* declaration) {
997 VariableProxy* proxy = declaration->proxy(); 965 VariableProxy* proxy = declaration->proxy();
998 Variable* variable = proxy->var(); 966 Variable* variable = proxy->var();
999 switch (variable->location()) { 967 switch (variable->location()) {
1000 case Variable::UNALLOCATED: 968 case Variable::UNALLOCATED:
1001 // TODO(rossberg) 969 // TODO(rossberg)
1002 break; 970 break;
1003 971
1004 case Variable::CONTEXT: { 972 case Variable::CONTEXT: {
1005 Comment cmnt(masm_, "[ ImportDeclaration"); 973 Comment cmnt(masm_, "[ ImportDeclaration");
(...skipping 4530 matching lines...) Expand 10 before | Expand all | Expand 10 after
5536 5504
5537 DCHECK(interrupt_address == 5505 DCHECK(interrupt_address ==
5538 isolate->builtins()->OsrAfterStackCheck()->entry()); 5506 isolate->builtins()->OsrAfterStackCheck()->entry());
5539 return OSR_AFTER_STACK_CHECK; 5507 return OSR_AFTER_STACK_CHECK;
5540 } 5508 }
5541 5509
5542 5510
5543 } } // namespace v8::internal 5511 } } // namespace v8::internal
5544 5512
5545 #endif // V8_TARGET_ARCH_ARM 5513 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698