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

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