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

Side by Side Diff: src/builtins/mips64/builtins-mips64.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/mips/builtins-mips.cc ('k') | src/builtins/x64/builtins-x64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 __ Branch(&new_object, ne, a1, Operand(a3)); 332 __ Branch(&new_object, ne, a1, Operand(a3));
333 333
334 // 5. Allocate a JSValue wrapper for the number. 334 // 5. Allocate a JSValue wrapper for the number.
335 __ AllocateJSValue(v0, a1, a0, a2, t1, &new_object); 335 __ AllocateJSValue(v0, a1, a0, a2, t1, &new_object);
336 __ jmp(&drop_frame_and_ret); 336 __ jmp(&drop_frame_and_ret);
337 337
338 // 6. Fallback to the runtime to create new object. 338 // 6. Fallback to the runtime to create new object.
339 __ bind(&new_object); 339 __ bind(&new_object);
340 { 340 {
341 FrameScope scope(masm, StackFrame::MANUAL); 341 FrameScope scope(masm, StackFrame::MANUAL);
342 FastNewObjectStub stub(masm->isolate());
343 __ SmiTag(t0); 342 __ SmiTag(t0);
344 __ EnterBuiltinFrame(cp, a1, t0); 343 __ EnterBuiltinFrame(cp, a1, t0);
345 __ Push(a0); 344 __ Push(a0);
346 __ CallStub(&stub); 345 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(),
346 RelocInfo::CODE_TARGET);
347 __ Pop(a0); 347 __ Pop(a0);
348 __ LeaveBuiltinFrame(cp, a1, t0); 348 __ LeaveBuiltinFrame(cp, a1, t0);
349 __ SmiUntag(t0); 349 __ SmiUntag(t0);
350 } 350 }
351 __ sd(a0, FieldMemOperand(v0, JSValue::kValueOffset)); 351 __ sd(a0, FieldMemOperand(v0, JSValue::kValueOffset));
352 352
353 __ bind(&drop_frame_and_ret); 353 __ bind(&drop_frame_and_ret);
354 { 354 {
355 __ Dlsa(sp, sp, t0, kPointerSizeLog2); 355 __ Dlsa(sp, sp, t0, kPointerSizeLog2);
356 __ DropAndRet(1); 356 __ DropAndRet(1);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 __ Branch(&new_object, ne, a1, Operand(a3)); 484 __ Branch(&new_object, ne, a1, Operand(a3));
485 485
486 // 5. Allocate a JSValue wrapper for the string. 486 // 5. Allocate a JSValue wrapper for the string.
487 __ AllocateJSValue(v0, a1, a0, a2, t1, &new_object); 487 __ AllocateJSValue(v0, a1, a0, a2, t1, &new_object);
488 __ jmp(&drop_frame_and_ret); 488 __ jmp(&drop_frame_and_ret);
489 489
490 // 6. Fallback to the runtime to create new object. 490 // 6. Fallback to the runtime to create new object.
491 __ bind(&new_object); 491 __ bind(&new_object);
492 { 492 {
493 FrameScope scope(masm, StackFrame::MANUAL); 493 FrameScope scope(masm, StackFrame::MANUAL);
494 FastNewObjectStub stub(masm->isolate());
495 __ SmiTag(t0); 494 __ SmiTag(t0);
496 __ EnterBuiltinFrame(cp, a1, t0); 495 __ EnterBuiltinFrame(cp, a1, t0);
497 __ Push(a0); 496 __ Push(a0);
498 __ CallStub(&stub); 497 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(),
498 RelocInfo::CODE_TARGET);
499 __ Pop(a0); 499 __ Pop(a0);
500 __ LeaveBuiltinFrame(cp, a1, t0); 500 __ LeaveBuiltinFrame(cp, a1, t0);
501 __ SmiUntag(t0); 501 __ SmiUntag(t0);
502 } 502 }
503 __ sd(a0, FieldMemOperand(v0, JSValue::kValueOffset)); 503 __ sd(a0, FieldMemOperand(v0, JSValue::kValueOffset));
504 504
505 __ bind(&drop_frame_and_ret); 505 __ bind(&drop_frame_and_ret);
506 { 506 {
507 __ Dlsa(sp, sp, t0, kPointerSizeLog2); 507 __ Dlsa(sp, sp, t0, kPointerSizeLog2);
508 __ DropAndRet(1); 508 __ DropAndRet(1);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 // Enter a construct frame. 575 // Enter a construct frame.
576 { 576 {
577 FrameScope scope(masm, StackFrame::CONSTRUCT); 577 FrameScope scope(masm, StackFrame::CONSTRUCT);
578 578
579 // Preserve the incoming parameters on the stack. 579 // Preserve the incoming parameters on the stack.
580 __ SmiTag(a0); 580 __ SmiTag(a0);
581 __ Push(cp, a0); 581 __ Push(cp, a0);
582 582
583 if (create_implicit_receiver) { 583 if (create_implicit_receiver) {
584 __ Push(a1, a3); 584 __ Push(a1, a3);
585 FastNewObjectStub stub(masm->isolate()); 585 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(),
586 __ CallStub(&stub); 586 RelocInfo::CODE_TARGET);
587 __ mov(t0, v0); 587 __ mov(t0, v0);
588 __ Pop(a1, a3); 588 __ Pop(a1, a3);
589 589
590 // ----------- S t a t e ------------- 590 // ----------- S t a t e -------------
591 // -- a1: constructor function 591 // -- a1: constructor function
592 // -- a3: new target 592 // -- a3: new target
593 // -- t0: newly allocated object 593 // -- t0: newly allocated object
594 // ----------------------------------- 594 // -----------------------------------
595 __ ld(a0, MemOperand(sp)); 595 __ ld(a0, MemOperand(sp));
596 } 596 }
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2997 __ break_(0xCC); 2997 __ break_(0xCC);
2998 } 2998 }
2999 } 2999 }
3000 3000
3001 #undef __ 3001 #undef __
3002 3002
3003 } // namespace internal 3003 } // namespace internal
3004 } // namespace v8 3004 } // namespace v8
3005 3005
3006 #endif // V8_TARGET_ARCH_MIPS64 3006 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/builtins/mips/builtins-mips.cc ('k') | src/builtins/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698