| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 __ CompareObjectType(r1, scratch, scratch, JS_FUNCTION_TYPE); | 457 __ CompareObjectType(r1, scratch, scratch, JS_FUNCTION_TYPE); |
| 458 __ b(ne, miss); | 458 __ b(ne, miss); |
| 459 | 459 |
| 460 // Invoke the function. | 460 // Invoke the function. |
| 461 ParameterCount actual(argc); | 461 ParameterCount actual(argc); |
| 462 __ InvokeFunction(r1, actual, JUMP_FUNCTION, | 462 __ InvokeFunction(r1, actual, JUMP_FUNCTION, |
| 463 NullCallWrapper(), CALL_AS_METHOD); | 463 NullCallWrapper(), CALL_AS_METHOD); |
| 464 } | 464 } |
| 465 | 465 |
| 466 | 466 |
| 467 static void GenerateCallNormal(MacroAssembler* masm, int argc) { | 467 void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) { |
| 468 // ----------- S t a t e ------------- | 468 // ----------- S t a t e ------------- |
| 469 // -- r2 : name | 469 // -- r2 : name |
| 470 // -- lr : return address | 470 // -- lr : return address |
| 471 // ----------------------------------- | 471 // ----------------------------------- |
| 472 Label miss; | 472 Label miss; |
| 473 | 473 |
| 474 // Get the receiver of the function from the stack into r1. | 474 // Get the receiver of the function from the stack into r1. |
| 475 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); | 475 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); |
| 476 | 476 |
| 477 GenerateStringDictionaryReceiverCheck(masm, r1, r0, r3, r4, &miss); | 477 GenerateStringDictionaryReceiverCheck(masm, r1, r0, r3, r4, &miss); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 // -- lr : return address | 561 // -- lr : return address |
| 562 // ----------------------------------- | 562 // ----------------------------------- |
| 563 | 563 |
| 564 // Get the receiver of the function from the stack into r1. | 564 // Get the receiver of the function from the stack into r1. |
| 565 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); | 565 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); |
| 566 GenerateMonomorphicCacheProbe(masm, argc, Code::CALL_IC, extra_ic_state); | 566 GenerateMonomorphicCacheProbe(masm, argc, Code::CALL_IC, extra_ic_state); |
| 567 GenerateMiss(masm, argc, extra_ic_state); | 567 GenerateMiss(masm, argc, extra_ic_state); |
| 568 } | 568 } |
| 569 | 569 |
| 570 | 570 |
| 571 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) { | |
| 572 // ----------- S t a t e ------------- | |
| 573 // -- r2 : name | |
| 574 // -- lr : return address | |
| 575 // ----------------------------------- | |
| 576 | |
| 577 GenerateCallNormal(masm, argc); | |
| 578 GenerateMiss(masm, argc, Code::kNoExtraICState); | |
| 579 } | |
| 580 | |
| 581 | |
| 582 void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { | 571 void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { |
| 583 // ----------- S t a t e ------------- | 572 // ----------- S t a t e ------------- |
| 584 // -- r2 : name | 573 // -- r2 : name |
| 585 // -- lr : return address | 574 // -- lr : return address |
| 586 // ----------------------------------- | 575 // ----------------------------------- |
| 587 | 576 |
| 588 // Get the receiver of the function from the stack into r1. | 577 // Get the receiver of the function from the stack into r1. |
| 589 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); | 578 __ ldr(r1, MemOperand(sp, argc * kPointerSize)); |
| 590 | 579 |
| 591 Label do_call, slow_call, slow_load, slow_reload_receiver; | 580 Label do_call, slow_call, slow_load, slow_reload_receiver; |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 // ----------- S t a t e ------------- | 678 // ----------- S t a t e ------------- |
| 690 // -- r2 : name | 679 // -- r2 : name |
| 691 // -- lr : return address | 680 // -- lr : return address |
| 692 // ----------------------------------- | 681 // ----------------------------------- |
| 693 | 682 |
| 694 // Check if the name is a string. | 683 // Check if the name is a string. |
| 695 Label miss; | 684 Label miss; |
| 696 __ JumpIfSmi(r2, &miss); | 685 __ JumpIfSmi(r2, &miss); |
| 697 __ IsObjectJSStringType(r2, r0, &miss); | 686 __ IsObjectJSStringType(r2, r0, &miss); |
| 698 | 687 |
| 699 GenerateCallNormal(masm, argc); | 688 CallICBase::GenerateNormal(masm, argc); |
| 700 __ bind(&miss); | 689 __ bind(&miss); |
| 701 GenerateMiss(masm, argc); | 690 GenerateMiss(masm, argc); |
| 702 } | 691 } |
| 703 | 692 |
| 704 | 693 |
| 705 // Defined in ic.cc. | 694 // Defined in ic.cc. |
| 706 Object* LoadIC_Miss(Arguments args); | 695 Object* LoadIC_Miss(Arguments args); |
| 707 | 696 |
| 708 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 697 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 709 // ----------- S t a t e ------------- | 698 // ----------- S t a t e ------------- |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 Register reg = Assembler::GetRn(instr_at_patch); | 1672 Register reg = Assembler::GetRn(instr_at_patch); |
| 1684 patcher.masm()->tst(reg, Operand(kSmiTagMask)); | 1673 patcher.masm()->tst(reg, Operand(kSmiTagMask)); |
| 1685 patcher.EmitCondition(eq); | 1674 patcher.EmitCondition(eq); |
| 1686 } | 1675 } |
| 1687 } | 1676 } |
| 1688 | 1677 |
| 1689 | 1678 |
| 1690 } } // namespace v8::internal | 1679 } } // namespace v8::internal |
| 1691 | 1680 |
| 1692 #endif // V8_TARGET_ARCH_ARM | 1681 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |