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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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, 5 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/mips/full-codegen-mips.cc ('k') | src/full-codegen/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 5259 matching lines...) Expand 10 before | Expand all | Expand 10 after
5270 __ sd(value, MemOperand(fp, frame_offset)); 5270 __ sd(value, MemOperand(fp, frame_offset));
5271 } 5271 }
5272 5272
5273 5273
5274 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { 5274 void FullCodeGenerator::LoadContextField(Register dst, int context_index) {
5275 __ ld(dst, ContextOperand(cp, context_index)); 5275 __ ld(dst, ContextOperand(cp, context_index));
5276 } 5276 }
5277 5277
5278 5278
5279 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { 5279 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() {
5280 Scope* declaration_scope = scope()->DeclarationScope(); 5280 Scope* closure_scope = scope()->ClosureScope();
5281 if (declaration_scope->is_script_scope() || 5281 if (closure_scope->is_script_scope() ||
5282 declaration_scope->is_module_scope()) { 5282 closure_scope->is_module_scope()) {
5283 // Contexts nested in the native context have a canonical empty function 5283 // Contexts nested in the native context have a canonical empty function
5284 // as their closure, not the anonymous closure containing the global 5284 // as their closure, not the anonymous closure containing the global
5285 // code. Pass a smi sentinel and let the runtime look up the empty 5285 // code. Pass a smi sentinel and let the runtime look up the empty
5286 // function. 5286 // function.
5287 __ li(at, Operand(Smi::FromInt(0))); 5287 __ li(at, Operand(Smi::FromInt(0)));
5288 } else if (declaration_scope->is_eval_scope()) { 5288 } else if (closure_scope->is_eval_scope()) {
5289 // Contexts created by a call to eval have the same closure as the 5289 // Contexts created by a call to eval have the same closure as the
5290 // context calling eval, not the anonymous closure containing the eval 5290 // context calling eval, not the anonymous closure containing the eval
5291 // code. Fetch it from the context. 5291 // code. Fetch it from the context.
5292 __ ld(at, ContextOperand(cp, Context::CLOSURE_INDEX)); 5292 __ ld(at, ContextOperand(cp, Context::CLOSURE_INDEX));
5293 } else { 5293 } else {
5294 DCHECK(declaration_scope->is_function_scope()); 5294 DCHECK(closure_scope->is_function_scope());
5295 __ ld(at, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 5295 __ ld(at, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
5296 } 5296 }
5297 __ push(at); 5297 __ push(at);
5298 } 5298 }
5299 5299
5300 5300
5301 // ---------------------------------------------------------------------------- 5301 // ----------------------------------------------------------------------------
5302 // Non-local control flow support. 5302 // Non-local control flow support.
5303 5303
5304 void FullCodeGenerator::EnterFinallyBlock() { 5304 void FullCodeGenerator::EnterFinallyBlock() {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
5441 reinterpret_cast<uint64_t>( 5441 reinterpret_cast<uint64_t>(
5442 isolate->builtins()->OsrAfterStackCheck()->entry())); 5442 isolate->builtins()->OsrAfterStackCheck()->entry()));
5443 return OSR_AFTER_STACK_CHECK; 5443 return OSR_AFTER_STACK_CHECK;
5444 } 5444 }
5445 5445
5446 5446
5447 } // namespace internal 5447 } // namespace internal
5448 } // namespace v8 5448 } // namespace v8
5449 5449
5450 #endif // V8_TARGET_ARCH_MIPS64 5450 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698