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

Side by Side Diff: src/builtins/arm64/builtins-arm64.cc

Issue 2606733002: [stubs] Port FastNewObjectStub to TF (Closed)
Patch Set: Review feedback Created 3 years, 11 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/builtins/arm/builtins-arm.cc ('k') | src/builtins/builtins.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/deoptimizer.h" 10 #include "src/deoptimizer.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 __ B(ne, &new_object); 308 __ B(ne, &new_object);
309 309
310 // 5. Allocate a JSValue wrapper for the number. 310 // 5. Allocate a JSValue wrapper for the number.
311 __ AllocateJSValue(x0, x1, x2, x4, x5, &new_object); 311 __ AllocateJSValue(x0, x1, x2, x4, x5, &new_object);
312 __ B(&drop_frame_and_ret); 312 __ B(&drop_frame_and_ret);
313 313
314 // 6. Fallback to the runtime to create new object. 314 // 6. Fallback to the runtime to create new object.
315 __ bind(&new_object); 315 __ bind(&new_object);
316 { 316 {
317 FrameScope scope(masm, StackFrame::MANUAL); 317 FrameScope scope(masm, StackFrame::MANUAL);
318 FastNewObjectStub stub(masm->isolate());
319 __ SmiTag(x6); 318 __ SmiTag(x6);
320 __ EnterBuiltinFrame(cp, x1, x6); 319 __ EnterBuiltinFrame(cp, x1, x6);
321 __ Push(x2); // first argument 320 __ Push(x2); // first argument
322 __ CallStub(&stub); 321 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(),
322 RelocInfo::CODE_TARGET);
323 __ Pop(x2); 323 __ Pop(x2);
324 __ LeaveBuiltinFrame(cp, x1, x6); 324 __ LeaveBuiltinFrame(cp, x1, x6);
325 __ SmiUntag(x6); 325 __ SmiUntag(x6);
326 } 326 }
327 __ Str(x2, FieldMemOperand(x0, JSValue::kValueOffset)); 327 __ Str(x2, FieldMemOperand(x0, JSValue::kValueOffset));
328 328
329 __ bind(&drop_frame_and_ret); 329 __ bind(&drop_frame_and_ret);
330 { 330 {
331 __ Drop(x6); 331 __ Drop(x6);
332 __ Drop(1); 332 __ Drop(1);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 __ B(ne, &new_object); 460 __ B(ne, &new_object);
461 461
462 // 5. Allocate a JSValue wrapper for the string. 462 // 5. Allocate a JSValue wrapper for the string.
463 __ AllocateJSValue(x0, x1, x2, x4, x5, &new_object); 463 __ AllocateJSValue(x0, x1, x2, x4, x5, &new_object);
464 __ B(&drop_frame_and_ret); 464 __ B(&drop_frame_and_ret);
465 465
466 // 6. Fallback to the runtime to create new object. 466 // 6. Fallback to the runtime to create new object.
467 __ bind(&new_object); 467 __ bind(&new_object);
468 { 468 {
469 FrameScope scope(masm, StackFrame::MANUAL); 469 FrameScope scope(masm, StackFrame::MANUAL);
470 FastNewObjectStub stub(masm->isolate());
471 __ SmiTag(x6); 470 __ SmiTag(x6);
472 __ EnterBuiltinFrame(cp, x1, x6); 471 __ EnterBuiltinFrame(cp, x1, x6);
473 __ Push(x2); // first argument 472 __ Push(x2); // first argument
474 __ CallStub(&stub); 473 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(),
474 RelocInfo::CODE_TARGET);
475 __ Pop(x2); 475 __ Pop(x2);
476 __ LeaveBuiltinFrame(cp, x1, x6); 476 __ LeaveBuiltinFrame(cp, x1, x6);
477 __ SmiUntag(x6); 477 __ SmiUntag(x6);
478 } 478 }
479 __ Str(x2, FieldMemOperand(x0, JSValue::kValueOffset)); 479 __ Str(x2, FieldMemOperand(x0, JSValue::kValueOffset));
480 480
481 __ bind(&drop_frame_and_ret); 481 __ bind(&drop_frame_and_ret);
482 { 482 {
483 __ Drop(x6); 483 __ Drop(x6);
484 __ Drop(1); 484 __ Drop(1);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 Register constructor = x1; 562 Register constructor = x1;
563 Register new_target = x3; 563 Register new_target = x3;
564 564
565 // Preserve the incoming parameters on the stack. 565 // Preserve the incoming parameters on the stack.
566 __ SmiTag(argc); 566 __ SmiTag(argc);
567 __ Push(cp, argc); 567 __ Push(cp, argc);
568 568
569 if (create_implicit_receiver) { 569 if (create_implicit_receiver) {
570 // Allocate the new receiver object. 570 // Allocate the new receiver object.
571 __ Push(constructor, new_target); 571 __ Push(constructor, new_target);
572 FastNewObjectStub stub(masm->isolate()); 572 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(),
573 __ CallStub(&stub); 573 RelocInfo::CODE_TARGET);
574 __ Mov(x4, x0); 574 __ Mov(x4, x0);
575 __ Pop(new_target, constructor); 575 __ Pop(new_target, constructor);
576 576
577 // ----------- S t a t e ------------- 577 // ----------- S t a t e -------------
578 // -- x1: constructor function 578 // -- x1: constructor function
579 // -- x3: new target 579 // -- x3: new target
580 // -- x4: newly allocated object 580 // -- x4: newly allocated object
581 // ----------------------------------- 581 // -----------------------------------
582 582
583 // Reload the number of arguments from the stack. 583 // Reload the number of arguments from the stack.
(...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2998 __ Unreachable(); 2998 __ Unreachable();
2999 } 2999 }
3000 } 3000 }
3001 3001
3002 #undef __ 3002 #undef __
3003 3003
3004 } // namespace internal 3004 } // namespace internal
3005 } // namespace v8 3005 } // namespace v8
3006 3006
3007 #endif // V8_TARGET_ARCH_ARM 3007 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698