| 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 __ GetObjectType(a1, scratch, scratch); | 456 __ GetObjectType(a1, scratch, scratch); |
| 457 __ Branch(miss, ne, scratch, Operand(JS_FUNCTION_TYPE)); | 457 __ Branch(miss, ne, scratch, Operand(JS_FUNCTION_TYPE)); |
| 458 | 458 |
| 459 // Invoke the function. | 459 // Invoke the function. |
| 460 ParameterCount actual(argc); | 460 ParameterCount actual(argc); |
| 461 __ InvokeFunction(a1, actual, JUMP_FUNCTION, | 461 __ InvokeFunction(a1, actual, JUMP_FUNCTION, |
| 462 NullCallWrapper(), CALL_AS_METHOD); | 462 NullCallWrapper(), CALL_AS_METHOD); |
| 463 } | 463 } |
| 464 | 464 |
| 465 | 465 |
| 466 static void GenerateCallNormal(MacroAssembler* masm, int argc) { | 466 void CallICBase::GenerateNormal(MacroAssembler* masm, int argc) { |
| 467 // ----------- S t a t e ------------- | 467 // ----------- S t a t e ------------- |
| 468 // -- a2 : name | 468 // -- a2 : name |
| 469 // -- ra : return address | 469 // -- ra : return address |
| 470 // ----------------------------------- | 470 // ----------------------------------- |
| 471 Label miss; | 471 Label miss; |
| 472 | 472 |
| 473 // Get the receiver of the function from the stack into a1. | 473 // Get the receiver of the function from the stack into a1. |
| 474 __ lw(a1, MemOperand(sp, argc * kPointerSize)); | 474 __ lw(a1, MemOperand(sp, argc * kPointerSize)); |
| 475 | 475 |
| 476 GenerateStringDictionaryReceiverCheck(masm, a1, a0, a3, t0, &miss); | 476 GenerateStringDictionaryReceiverCheck(masm, a1, a0, a3, t0, &miss); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 // -- ra : return address | 560 // -- ra : return address |
| 561 // ----------------------------------- | 561 // ----------------------------------- |
| 562 | 562 |
| 563 // Get the receiver of the function from the stack into a1. | 563 // Get the receiver of the function from the stack into a1. |
| 564 __ lw(a1, MemOperand(sp, argc * kPointerSize)); | 564 __ lw(a1, MemOperand(sp, argc * kPointerSize)); |
| 565 GenerateMonomorphicCacheProbe(masm, argc, Code::CALL_IC, extra_ic_state); | 565 GenerateMonomorphicCacheProbe(masm, argc, Code::CALL_IC, extra_ic_state); |
| 566 GenerateMiss(masm, argc, extra_ic_state); | 566 GenerateMiss(masm, argc, extra_ic_state); |
| 567 } | 567 } |
| 568 | 568 |
| 569 | 569 |
| 570 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) { | |
| 571 // ----------- S t a t e ------------- | |
| 572 // -- a2 : name | |
| 573 // -- ra : return address | |
| 574 // ----------------------------------- | |
| 575 | |
| 576 GenerateCallNormal(masm, argc); | |
| 577 GenerateMiss(masm, argc, Code::kNoExtraICState); | |
| 578 } | |
| 579 | |
| 580 | |
| 581 void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { | 570 void KeyedCallIC::GenerateMegamorphic(MacroAssembler* masm, int argc) { |
| 582 // ----------- S t a t e ------------- | 571 // ----------- S t a t e ------------- |
| 583 // -- a2 : name | 572 // -- a2 : name |
| 584 // -- ra : return address | 573 // -- ra : return address |
| 585 // ----------------------------------- | 574 // ----------------------------------- |
| 586 | 575 |
| 587 // Get the receiver of the function from the stack into a1. | 576 // Get the receiver of the function from the stack into a1. |
| 588 __ lw(a1, MemOperand(sp, argc * kPointerSize)); | 577 __ lw(a1, MemOperand(sp, argc * kPointerSize)); |
| 589 | 578 |
| 590 Label do_call, slow_call, slow_load, slow_reload_receiver; | 579 Label do_call, slow_call, slow_load, slow_reload_receiver; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 // ----------- S t a t e ------------- | 676 // ----------- S t a t e ------------- |
| 688 // -- a2 : name | 677 // -- a2 : name |
| 689 // -- ra : return address | 678 // -- ra : return address |
| 690 // ----------------------------------- | 679 // ----------------------------------- |
| 691 | 680 |
| 692 // Check if the name is a string. | 681 // Check if the name is a string. |
| 693 Label miss; | 682 Label miss; |
| 694 __ JumpIfSmi(a2, &miss); | 683 __ JumpIfSmi(a2, &miss); |
| 695 __ IsObjectJSStringType(a2, a0, &miss); | 684 __ IsObjectJSStringType(a2, a0, &miss); |
| 696 | 685 |
| 697 GenerateCallNormal(masm, argc); | 686 CallICBase::GenerateNormal(masm, argc); |
| 698 __ bind(&miss); | 687 __ bind(&miss); |
| 699 GenerateMiss(masm, argc); | 688 GenerateMiss(masm, argc); |
| 700 } | 689 } |
| 701 | 690 |
| 702 | 691 |
| 703 // Defined in ic.cc. | 692 // Defined in ic.cc. |
| 704 Object* LoadIC_Miss(Arguments args); | 693 Object* LoadIC_Miss(Arguments args); |
| 705 | 694 |
| 706 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 695 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 707 // ----------- S t a t e ------------- | 696 // ----------- S t a t e ------------- |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 1631 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
| 1643 patcher.masm()->andi(at, reg, kSmiTagMask); | 1632 patcher.masm()->andi(at, reg, kSmiTagMask); |
| 1644 patcher.ChangeBranchCondition(eq); | 1633 patcher.ChangeBranchCondition(eq); |
| 1645 } | 1634 } |
| 1646 } | 1635 } |
| 1647 | 1636 |
| 1648 | 1637 |
| 1649 } } // namespace v8::internal | 1638 } } // namespace v8::internal |
| 1650 | 1639 |
| 1651 #endif // V8_TARGET_ARCH_MIPS | 1640 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |