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

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: 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_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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 DCHECK_EQ(scope(), info->scope()); 253 DCHECK_EQ(scope(), info->scope());
254 Variable* arguments = info->scope()->arguments(); 254 Variable* arguments = info->scope()->arguments();
255 if (arguments != NULL) { 255 if (arguments != NULL) {
256 // Arguments object must be allocated after the context object, in 256 // Arguments object must be allocated after the context object, in
257 // case the "arguments" or ".arguments" variables are in the context. 257 // case the "arguments" or ".arguments" variables are in the context.
258 Comment cmnt(masm_, "[ Allocate arguments object"); 258 Comment cmnt(masm_, "[ Allocate arguments object");
259 if (!function_in_register) { 259 if (!function_in_register) {
260 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 260 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
261 } 261 }
262 if (is_strict(language_mode()) || !has_simple_parameters()) { 262 if (is_strict(language_mode()) || !has_simple_parameters()) {
263 FastNewStrictArgumentsStub stub(isolate()); 263 __ call(isolate()->builtins()->FastNewStrictArguments(),
264 __ CallStub(&stub); 264 RelocInfo::CODE_TARGET);
265 RestoreContext();
265 } else if (literal()->has_duplicate_parameters()) { 266 } else if (literal()->has_duplicate_parameters()) {
266 __ Push(rdi); 267 __ Push(rdi);
267 __ CallRuntime(Runtime::kNewSloppyArguments_Generic); 268 __ CallRuntime(Runtime::kNewSloppyArguments_Generic);
268 } else { 269 } else {
269 FastNewSloppyArgumentsStub stub(isolate()); 270 __ call(isolate()->builtins()->FastNewSloppyArguments(),
270 __ CallStub(&stub); 271 RelocInfo::CODE_TARGET);
272 RestoreContext();
271 } 273 }
272 274
273 SetVar(arguments, rax, rbx, rdx); 275 SetVar(arguments, rax, rbx, rdx);
274 } 276 }
275 277
276 if (FLAG_trace) { 278 if (FLAG_trace) {
277 __ CallRuntime(Runtime::kTraceEnter); 279 __ CallRuntime(Runtime::kTraceEnter);
278 } 280 }
279 281
280 // Visit the declarations and body unless there is an illegal 282 // Visit the declarations and body unless there is an illegal
(...skipping 2480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2761 DCHECK_EQ( 2763 DCHECK_EQ(
2762 isolate->builtins()->OnStackReplacement()->entry(), 2764 isolate->builtins()->OnStackReplacement()->entry(),
2763 Assembler::target_address_at(call_target_address, unoptimized_code)); 2765 Assembler::target_address_at(call_target_address, unoptimized_code));
2764 return ON_STACK_REPLACEMENT; 2766 return ON_STACK_REPLACEMENT;
2765 } 2767 }
2766 2768
2767 } // namespace internal 2769 } // namespace internal
2768 } // namespace v8 2770 } // namespace v8
2769 2771
2770 #endif // V8_TARGET_ARCH_X64 2772 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698