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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ia32/code-stubs-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 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_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 DCHECK_EQ(scope(), info->scope()); 254 DCHECK_EQ(scope(), info->scope());
255 Variable* arguments = info->scope()->arguments(); 255 Variable* arguments = info->scope()->arguments();
256 if (arguments != NULL) { 256 if (arguments != NULL) {
257 // Arguments object must be allocated after the context object, in 257 // Arguments object must be allocated after the context object, in
258 // case the "arguments" or ".arguments" variables are in the context. 258 // case the "arguments" or ".arguments" variables are in the context.
259 Comment cmnt(masm_, "[ Allocate arguments object"); 259 Comment cmnt(masm_, "[ Allocate arguments object");
260 if (!function_in_register) { 260 if (!function_in_register) {
261 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 261 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
262 } 262 }
263 if (is_strict(language_mode()) || !has_simple_parameters()) { 263 if (is_strict(language_mode()) || !has_simple_parameters()) {
264 FastNewStrictArgumentsStub stub(isolate()); 264 __ call(isolate()->builtins()->FastNewStrictArguments(),
265 __ CallStub(&stub); 265 RelocInfo::CODE_TARGET);
266 RestoreContext();
266 } else if (literal()->has_duplicate_parameters()) { 267 } else if (literal()->has_duplicate_parameters()) {
267 __ Push(rdi); 268 __ Push(rdi);
268 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); 269 __ CallRuntime(Runtime::kNewSloppyArguments_Generic);
269 } else { 270 } else {
270 FastNewSloppyArgumentsStub stub(isolate()); 271 __ call(isolate()->builtins()->FastNewSloppyArguments(),
271 __ CallStub(&stub); 272 RelocInfo::CODE_TARGET);
273 RestoreContext();
272 } 274 }
273 275
274 SetVar(arguments, rax, rbx, rdx); 276 SetVar(arguments, rax, rbx, rdx);
275 } 277 }
276 278
277 if (FLAG_trace) { 279 if (FLAG_trace) {
278 __ CallRuntime(Runtime::kTraceEnter); 280 __ CallRuntime(Runtime::kTraceEnter);
279 } 281 }
280 282
281 // Visit the declarations and body unless there is an illegal 283 // Visit the declarations and body unless there is an illegal
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 DCHECK_EQ( 2765 DCHECK_EQ(
2764 isolate->builtins()->OnStackReplacement()->entry(), 2766 isolate->builtins()->OnStackReplacement()->entry(),
2765 Assembler::target_address_at(call_target_address, unoptimized_code)); 2767 Assembler::target_address_at(call_target_address, unoptimized_code));
2766 return ON_STACK_REPLACEMENT; 2768 return ON_STACK_REPLACEMENT;
2767 } 2769 }
2768 2770
2769 } // namespace internal 2771 } // namespace internal
2770 } // namespace v8 2772 } // namespace v8
2771 2773
2772 #endif // V8_TARGET_ARCH_X64 2774 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698