| OLD | NEW |
| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 __ b(ne, &new_object); | 319 __ b(ne, &new_object); |
| 320 | 320 |
| 321 // 5. Allocate a JSValue wrapper for the number. | 321 // 5. Allocate a JSValue wrapper for the number. |
| 322 __ AllocateJSValue(r0, r1, r2, r4, r5, &new_object); | 322 __ AllocateJSValue(r0, r1, r2, r4, r5, &new_object); |
| 323 __ b(&drop_frame_and_ret); | 323 __ b(&drop_frame_and_ret); |
| 324 | 324 |
| 325 // 6. Fallback to the runtime to create new object. | 325 // 6. Fallback to the runtime to create new object. |
| 326 __ bind(&new_object); | 326 __ bind(&new_object); |
| 327 { | 327 { |
| 328 FrameScope scope(masm, StackFrame::MANUAL); | 328 FrameScope scope(masm, StackFrame::MANUAL); |
| 329 FastNewObjectStub stub(masm->isolate()); | |
| 330 __ SmiTag(r6); | 329 __ SmiTag(r6); |
| 331 __ EnterBuiltinFrame(cp, r1, r6); | 330 __ EnterBuiltinFrame(cp, r1, r6); |
| 332 __ Push(r2); // first argument | 331 __ Push(r2); // first argument |
| 333 __ CallStub(&stub); | 332 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
| 333 RelocInfo::CODE_TARGET); |
| 334 __ Pop(r2); | 334 __ Pop(r2); |
| 335 __ LeaveBuiltinFrame(cp, r1, r6); | 335 __ LeaveBuiltinFrame(cp, r1, r6); |
| 336 __ SmiUntag(r6); | 336 __ SmiUntag(r6); |
| 337 } | 337 } |
| 338 __ str(r2, FieldMemOperand(r0, JSValue::kValueOffset)); | 338 __ str(r2, FieldMemOperand(r0, JSValue::kValueOffset)); |
| 339 | 339 |
| 340 __ bind(&drop_frame_and_ret); | 340 __ bind(&drop_frame_and_ret); |
| 341 { | 341 { |
| 342 __ Drop(r6); | 342 __ Drop(r6); |
| 343 __ Ret(1); | 343 __ Ret(1); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 __ b(ne, &new_object); | 467 __ b(ne, &new_object); |
| 468 | 468 |
| 469 // 5. Allocate a JSValue wrapper for the string. | 469 // 5. Allocate a JSValue wrapper for the string. |
| 470 __ AllocateJSValue(r0, r1, r2, r4, r5, &new_object); | 470 __ AllocateJSValue(r0, r1, r2, r4, r5, &new_object); |
| 471 __ b(&drop_frame_and_ret); | 471 __ b(&drop_frame_and_ret); |
| 472 | 472 |
| 473 // 6. Fallback to the runtime to create new object. | 473 // 6. Fallback to the runtime to create new object. |
| 474 __ bind(&new_object); | 474 __ bind(&new_object); |
| 475 { | 475 { |
| 476 FrameScope scope(masm, StackFrame::MANUAL); | 476 FrameScope scope(masm, StackFrame::MANUAL); |
| 477 FastNewObjectStub stub(masm->isolate()); | |
| 478 __ SmiTag(r6); | 477 __ SmiTag(r6); |
| 479 __ EnterBuiltinFrame(cp, r1, r6); | 478 __ EnterBuiltinFrame(cp, r1, r6); |
| 480 __ Push(r2); // first argument | 479 __ Push(r2); // first argument |
| 481 __ CallStub(&stub); | 480 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
| 481 RelocInfo::CODE_TARGET); |
| 482 __ Pop(r2); | 482 __ Pop(r2); |
| 483 __ LeaveBuiltinFrame(cp, r1, r6); | 483 __ LeaveBuiltinFrame(cp, r1, r6); |
| 484 __ SmiUntag(r6); | 484 __ SmiUntag(r6); |
| 485 } | 485 } |
| 486 __ str(r2, FieldMemOperand(r0, JSValue::kValueOffset)); | 486 __ str(r2, FieldMemOperand(r0, JSValue::kValueOffset)); |
| 487 | 487 |
| 488 __ bind(&drop_frame_and_ret); | 488 __ bind(&drop_frame_and_ret); |
| 489 { | 489 { |
| 490 __ Drop(r6); | 490 __ Drop(r6); |
| 491 __ Ret(1); | 491 __ Ret(1); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 { | 567 { |
| 568 FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT); | 568 FrameAndConstantPoolScope scope(masm, StackFrame::CONSTRUCT); |
| 569 | 569 |
| 570 // Preserve the incoming parameters on the stack. | 570 // Preserve the incoming parameters on the stack. |
| 571 __ SmiTag(r0); | 571 __ SmiTag(r0); |
| 572 __ Push(cp, r0); | 572 __ Push(cp, r0); |
| 573 | 573 |
| 574 if (create_implicit_receiver) { | 574 if (create_implicit_receiver) { |
| 575 // Allocate the new receiver object. | 575 // Allocate the new receiver object. |
| 576 __ Push(r1, r3); | 576 __ Push(r1, r3); |
| 577 FastNewObjectStub stub(masm->isolate()); | 577 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
| 578 __ CallStub(&stub); | 578 RelocInfo::CODE_TARGET); |
| 579 __ mov(r4, r0); | 579 __ mov(r4, r0); |
| 580 __ Pop(r1, r3); | 580 __ Pop(r1, r3); |
| 581 | 581 |
| 582 // ----------- S t a t e ------------- | 582 // ----------- S t a t e ------------- |
| 583 // -- r1: constructor function | 583 // -- r1: constructor function |
| 584 // -- r3: new target | 584 // -- r3: new target |
| 585 // -- r4: newly allocated object | 585 // -- r4: newly allocated object |
| 586 // ----------------------------------- | 586 // ----------------------------------- |
| 587 | 587 |
| 588 // Retrieve smi-tagged arguments count from the stack. | 588 // Retrieve smi-tagged arguments count from the stack. |
| (...skipping 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2887 __ bkpt(0); | 2887 __ bkpt(0); |
| 2888 } | 2888 } |
| 2889 } | 2889 } |
| 2890 | 2890 |
| 2891 #undef __ | 2891 #undef __ |
| 2892 | 2892 |
| 2893 } // namespace internal | 2893 } // namespace internal |
| 2894 } // namespace v8 | 2894 } // namespace v8 |
| 2895 | 2895 |
| 2896 #endif // V8_TARGET_ARCH_ARM | 2896 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |