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

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

Issue 2645743002: [builtins] Port parameter and argument-related code stubs to CSA (Closed)
Patch Set: Remove stray change Created 3 years, 10 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
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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 Variable* arguments = info->scope()->arguments(); 274 Variable* arguments = info->scope()->arguments();
275 if (arguments != NULL) { 275 if (arguments != NULL) {
276 // Function uses arguments object. 276 // Function uses arguments object.
277 Comment cmnt(masm_, "[ Allocate arguments object"); 277 Comment cmnt(masm_, "[ Allocate arguments object");
278 if (!function_in_register_a1) { 278 if (!function_in_register_a1) {
279 // Load this again, if it's used by the local context below. 279 // Load this again, if it's used by the local context below.
280 __ lw(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); 280 __ lw(a1, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
281 } 281 }
282 if (is_strict(language_mode()) || !has_simple_parameters()) { 282 if (is_strict(language_mode()) || !has_simple_parameters()) {
283 FastNewStrictArgumentsStub stub(isolate()); 283 Callable callable = CodeFactory::FastNewStrictArguments(isolate());
284 __ CallStub(&stub); 284 __ Call(callable.code(), RelocInfo::CODE_TARGET);
285 RestoreContext();
285 } else if (literal()->has_duplicate_parameters()) { 286 } else if (literal()->has_duplicate_parameters()) {
286 __ Push(a1); 287 __ Push(a1);
287 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); 288 __ CallRuntime(Runtime::kNewSloppyArguments_Generic);
288 } else { 289 } else {
289 FastNewSloppyArgumentsStub stub(isolate()); 290 Callable callable = CodeFactory::FastNewSloppyArguments(isolate());
290 __ CallStub(&stub); 291 __ Call(callable.code(), RelocInfo::CODE_TARGET);
292 RestoreContext();
291 } 293 }
292 294
293 SetVar(arguments, v0, a1, a2); 295 SetVar(arguments, v0, a1, a2);
294 } 296 }
295 297
296 if (FLAG_trace) { 298 if (FLAG_trace) {
297 __ CallRuntime(Runtime::kTraceEnter); 299 __ CallRuntime(Runtime::kTraceEnter);
298 } 300 }
299 301
300 // Visit the declarations and body unless there is an illegal 302 // Visit the declarations and body unless there is an illegal
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after
2868 reinterpret_cast<uint32_t>( 2870 reinterpret_cast<uint32_t>(
2869 isolate->builtins()->OnStackReplacement()->entry())); 2871 isolate->builtins()->OnStackReplacement()->entry()));
2870 return ON_STACK_REPLACEMENT; 2872 return ON_STACK_REPLACEMENT;
2871 } 2873 }
2872 2874
2873 2875
2874 } // namespace internal 2876 } // namespace internal
2875 } // namespace v8 2877 } // namespace v8
2876 2878
2877 #endif // V8_TARGET_ARCH_MIPS 2879 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698