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

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

Issue 1475383002: [compiler] Always pass closure argument to with, catch and block context creation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove WithExpression from messages.h Created 5 years 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
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 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 4800 matching lines...) Expand 10 before | Expand all | Expand 10 after
4811 __ lw(dst, ContextOperand(cp, context_index)); 4811 __ lw(dst, ContextOperand(cp, context_index));
4812 } 4812 }
4813 4813
4814 4814
4815 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() { 4815 void FullCodeGenerator::PushFunctionArgumentForContextAllocation() {
4816 Scope* closure_scope = scope()->ClosureScope(); 4816 Scope* closure_scope = scope()->ClosureScope();
4817 if (closure_scope->is_script_scope() || 4817 if (closure_scope->is_script_scope() ||
4818 closure_scope->is_module_scope()) { 4818 closure_scope->is_module_scope()) {
4819 // Contexts nested in the native context have a canonical empty function 4819 // Contexts nested in the native context have a canonical empty function
4820 // as their closure, not the anonymous closure containing the global 4820 // as their closure, not the anonymous closure containing the global
4821 // code. Pass a smi sentinel and let the runtime look up the empty 4821 // code.
4822 // function. 4822 __ lw(at, GlobalObjectOperand());
4823 __ li(at, Operand(Smi::FromInt(0))); 4823 __ lw(at, FieldMemOperand(at, JSGlobalObject::kNativeContextOffset));
4824 __ lw(at, ContextOperand(at, Context::CLOSURE_INDEX));
4824 } else if (closure_scope->is_eval_scope()) { 4825 } else if (closure_scope->is_eval_scope()) {
4825 // Contexts created by a call to eval have the same closure as the 4826 // Contexts created by a call to eval have the same closure as the
4826 // context calling eval, not the anonymous closure containing the eval 4827 // context calling eval, not the anonymous closure containing the eval
4827 // code. Fetch it from the context. 4828 // code. Fetch it from the context.
4828 __ lw(at, ContextOperand(cp, Context::CLOSURE_INDEX)); 4829 __ lw(at, ContextOperand(cp, Context::CLOSURE_INDEX));
4829 } else { 4830 } else {
4830 DCHECK(closure_scope->is_function_scope()); 4831 DCHECK(closure_scope->is_function_scope());
4831 __ lw(at, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 4832 __ lw(at, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
4832 } 4833 }
4833 __ push(at); 4834 __ push(at);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
4975 reinterpret_cast<uint32_t>( 4976 reinterpret_cast<uint32_t>(
4976 isolate->builtins()->OsrAfterStackCheck()->entry())); 4977 isolate->builtins()->OsrAfterStackCheck()->entry()));
4977 return OSR_AFTER_STACK_CHECK; 4978 return OSR_AFTER_STACK_CHECK;
4978 } 4979 }
4979 4980
4980 4981
4981 } // namespace internal 4982 } // namespace internal
4982 } // namespace v8 4983 } // namespace v8
4983 4984
4984 #endif // V8_TARGET_ARCH_MIPS 4985 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698