OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 __ AllocateJSValue(r3, r4, r5, r7, r8, &new_object); | 331 __ AllocateJSValue(r3, r4, r5, r7, r8, &new_object); |
332 __ b(&drop_frame_and_ret); | 332 __ b(&drop_frame_and_ret); |
333 | 333 |
334 // 6. Fallback to the runtime to create new object. | 334 // 6. Fallback to the runtime to create new object. |
335 __ bind(&new_object); | 335 __ bind(&new_object); |
336 { | 336 { |
337 FrameScope scope(masm, StackFrame::MANUAL); | 337 FrameScope scope(masm, StackFrame::MANUAL); |
338 __ SmiTag(r9); | 338 __ SmiTag(r9); |
339 __ EnterBuiltinFrame(cp, r4, r9); | 339 __ EnterBuiltinFrame(cp, r4, r9); |
340 __ Push(r5); // first argument | 340 __ Push(r5); // first argument |
341 FastNewObjectStub stub(masm->isolate()); | 341 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
342 __ CallStub(&stub); | 342 RelocInfo::CODE_TARGET); |
343 __ Pop(r5); | 343 __ Pop(r5); |
344 __ LeaveBuiltinFrame(cp, r4, r9); | 344 __ LeaveBuiltinFrame(cp, r4, r9); |
345 __ SmiUntag(r9); | 345 __ SmiUntag(r9); |
346 } | 346 } |
347 __ StoreP(r5, FieldMemOperand(r3, JSValue::kValueOffset), r0); | 347 __ StoreP(r5, FieldMemOperand(r3, JSValue::kValueOffset), r0); |
348 | 348 |
349 __ bind(&drop_frame_and_ret); | 349 __ bind(&drop_frame_and_ret); |
350 { | 350 { |
351 __ Drop(r9); | 351 __ Drop(r9); |
352 __ Ret(1); | 352 __ Ret(1); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 __ AllocateJSValue(r3, r4, r5, r7, r8, &new_object); | 483 __ AllocateJSValue(r3, r4, r5, r7, r8, &new_object); |
484 __ b(&drop_frame_and_ret); | 484 __ b(&drop_frame_and_ret); |
485 | 485 |
486 // 6. Fallback to the runtime to create new object. | 486 // 6. Fallback to the runtime to create new object. |
487 __ bind(&new_object); | 487 __ bind(&new_object); |
488 { | 488 { |
489 FrameScope scope(masm, StackFrame::MANUAL); | 489 FrameScope scope(masm, StackFrame::MANUAL); |
490 __ SmiTag(r9); | 490 __ SmiTag(r9); |
491 __ EnterBuiltinFrame(cp, r4, r9); | 491 __ EnterBuiltinFrame(cp, r4, r9); |
492 __ Push(r5); // first argument | 492 __ Push(r5); // first argument |
493 FastNewObjectStub stub(masm->isolate()); | 493 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
494 __ CallStub(&stub); | 494 RelocInfo::CODE_TARGET); |
495 __ Pop(r5); | 495 __ Pop(r5); |
496 __ LeaveBuiltinFrame(cp, r4, r9); | 496 __ LeaveBuiltinFrame(cp, r4, r9); |
497 __ SmiUntag(r9); | 497 __ SmiUntag(r9); |
498 } | 498 } |
499 __ StoreP(r5, FieldMemOperand(r3, JSValue::kValueOffset), r0); | 499 __ StoreP(r5, FieldMemOperand(r3, JSValue::kValueOffset), r0); |
500 | 500 |
501 __ bind(&drop_frame_and_ret); | 501 __ bind(&drop_frame_and_ret); |
502 { | 502 { |
503 __ Drop(r9); | 503 __ Drop(r9); |
504 __ Ret(1); | 504 __ Ret(1); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 if (!create_implicit_receiver) { | 580 if (!create_implicit_receiver) { |
581 __ SmiTag(r7, r3, SetRC); | 581 __ SmiTag(r7, r3, SetRC); |
582 __ Push(cp, r7); | 582 __ Push(cp, r7); |
583 __ PushRoot(Heap::kTheHoleValueRootIndex); | 583 __ PushRoot(Heap::kTheHoleValueRootIndex); |
584 } else { | 584 } else { |
585 __ SmiTag(r3); | 585 __ SmiTag(r3); |
586 __ Push(cp, r3); | 586 __ Push(cp, r3); |
587 | 587 |
588 // Allocate the new receiver object. | 588 // Allocate the new receiver object. |
589 __ Push(r4, r6); | 589 __ Push(r4, r6); |
590 FastNewObjectStub stub(masm->isolate()); | 590 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
591 __ CallStub(&stub); | 591 RelocInfo::CODE_TARGET); |
592 __ mr(r7, r3); | 592 __ mr(r7, r3); |
593 __ Pop(r4, r6); | 593 __ Pop(r4, r6); |
594 | 594 |
595 // ----------- S t a t e ------------- | 595 // ----------- S t a t e ------------- |
596 // -- r4: constructor function | 596 // -- r4: constructor function |
597 // -- r6: new target | 597 // -- r6: new target |
598 // -- r7: newly allocated object | 598 // -- r7: newly allocated object |
599 // ----------------------------------- | 599 // ----------------------------------- |
600 | 600 |
601 // Retrieve smi-tagged arguments count from the stack. | 601 // Retrieve smi-tagged arguments count from the stack. |
(...skipping 2369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2971 __ CallRuntime(Runtime::kThrowStackOverflow); | 2971 __ CallRuntime(Runtime::kThrowStackOverflow); |
2972 __ bkpt(0); | 2972 __ bkpt(0); |
2973 } | 2973 } |
2974 } | 2974 } |
2975 | 2975 |
2976 #undef __ | 2976 #undef __ |
2977 } // namespace internal | 2977 } // namespace internal |
2978 } // namespace v8 | 2978 } // namespace v8 |
2979 | 2979 |
2980 #endif // V8_TARGET_ARCH_PPC | 2980 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |