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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1250423002: Find right scope associated with prologue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
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 5266 matching lines...) Expand 10 before | Expand all | Expand 10 after
5277 __ Str(value, MemOperand(fp, frame_offset)); 5277 __ Str(value, MemOperand(fp, frame_offset));
5278 } 5278 }
5279 5279
5280 5280
5281 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { 5281 void FullCodeGenerator::LoadContextField(Register dst, int context_index) {
5282 __ Ldr(dst, ContextMemOperand(cp, context_index)); 5282 __ Ldr(dst, ContextMemOperand(cp, context_index));
5283 } 5283 }
5284 5284
5285 5285
5286 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { 5286 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() {
5287 Scope* declaration_scope = scope()->DeclarationScope(); 5287 Scope* closure_scope = scope()->ClosureScope();
5288 if (declaration_scope->is_script_scope() || 5288 if (closure_scope->is_script_scope() ||
5289 declaration_scope->is_module_scope()) { 5289 closure_scope->is_module_scope()) {
5290 // Contexts nested in the native context have a canonical empty function 5290 // Contexts nested in the native context have a canonical empty function
5291 // as their closure, not the anonymous closure containing the global 5291 // as their closure, not the anonymous closure containing the global
5292 // code. Pass a smi sentinel and let the runtime look up the empty 5292 // code. Pass a smi sentinel and let the runtime look up the empty
5293 // function. 5293 // function.
5294 DCHECK(kSmiTag == 0); 5294 DCHECK(kSmiTag == 0);
5295 __ Push(xzr); 5295 __ Push(xzr);
5296 } else if (declaration_scope->is_eval_scope()) { 5296 } else if (closure_scope->is_eval_scope()) {
5297 // Contexts created by a call to eval have the same closure as the 5297 // Contexts created by a call to eval have the same closure as the
5298 // context calling eval, not the anonymous closure containing the eval 5298 // context calling eval, not the anonymous closure containing the eval
5299 // code. Fetch it from the context. 5299 // code. Fetch it from the context.
5300 __ Ldr(x10, ContextMemOperand(cp, Context::CLOSURE_INDEX)); 5300 __ Ldr(x10, ContextMemOperand(cp, Context::CLOSURE_INDEX));
5301 __ Push(x10); 5301 __ Push(x10);
5302 } else { 5302 } else {
5303 DCHECK(declaration_scope->is_function_scope()); 5303 DCHECK(closure_scope->is_function_scope());
5304 __ Ldr(x10, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 5304 __ Ldr(x10, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
5305 __ Push(x10); 5305 __ Push(x10);
5306 } 5306 }
5307 } 5307 }
5308 5308
5309 5309
5310 void FullCodeGenerator::EnterFinallyBlock() { 5310 void FullCodeGenerator::EnterFinallyBlock() {
5311 ASM_LOCATION("FullCodeGenerator::EnterFinallyBlock"); 5311 ASM_LOCATION("FullCodeGenerator::EnterFinallyBlock");
5312 DCHECK(!result_register().is(x10)); 5312 DCHECK(!result_register().is(x10));
5313 // Preserve the result register while executing finally block. 5313 // Preserve the result register while executing finally block.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
5459 } 5459 }
5460 5460
5461 return INTERRUPT; 5461 return INTERRUPT;
5462 } 5462 }
5463 5463
5464 5464
5465 } // namespace internal 5465 } // namespace internal
5466 } // namespace v8 5466 } // namespace v8
5467 5467
5468 #endif // V8_TARGET_ARCH_ARM64 5468 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698