| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 // ----------- S t a t e ------------- | 487 // ----------- S t a t e ------------- |
| 488 // -- r2 : name | 488 // -- r2 : name |
| 489 // -- lr : return address | 489 // -- lr : return address |
| 490 // -- [sp] : receiver | 490 // -- [sp] : receiver |
| 491 // ----------------------------------- | 491 // ----------------------------------- |
| 492 | 492 |
| 493 __ ldr(r3, MemOperand(sp, 0)); | 493 __ ldr(r3, MemOperand(sp, 0)); |
| 494 __ stm(db_w, sp, r2.bit() | r3.bit()); | 494 __ stm(db_w, sp, r2.bit() | r3.bit()); |
| 495 | 495 |
| 496 // Perform tail call to the entry. | 496 // Perform tail call to the entry. |
| 497 __ TailCallRuntime(ExternalReference(IC_Utility(kLoadIC_Miss)), 2, 1); | 497 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss)); |
| 498 __ TailCallExternalReference(ref, 2, 1); |
| 498 } | 499 } |
| 499 | 500 |
| 500 | 501 |
| 501 // TODO(181): Implement map patching once loop nesting is tracked on the | 502 // TODO(181): Implement map patching once loop nesting is tracked on the |
| 502 // ARM platform so we can generate inlined fast-case code loads in | 503 // ARM platform so we can generate inlined fast-case code loads in |
| 503 // loops. | 504 // loops. |
| 504 void LoadIC::ClearInlinedVersion(Address address) {} | 505 void LoadIC::ClearInlinedVersion(Address address) {} |
| 505 bool LoadIC::PatchInlinedLoad(Address address, Object* map, int offset) { | 506 bool LoadIC::PatchInlinedLoad(Address address, Object* map, int offset) { |
| 506 return false; | 507 return false; |
| 507 } | 508 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 524 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { | 525 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
| 525 // ---------- S t a t e -------------- | 526 // ---------- S t a t e -------------- |
| 526 // -- lr : return address | 527 // -- lr : return address |
| 527 // -- sp[0] : key | 528 // -- sp[0] : key |
| 528 // -- sp[4] : receiver | 529 // -- sp[4] : receiver |
| 529 // ----------------------------------- | 530 // ----------------------------------- |
| 530 | 531 |
| 531 __ ldm(ia, sp, r2.bit() | r3.bit()); | 532 __ ldm(ia, sp, r2.bit() | r3.bit()); |
| 532 __ stm(db_w, sp, r2.bit() | r3.bit()); | 533 __ stm(db_w, sp, r2.bit() | r3.bit()); |
| 533 | 534 |
| 534 __ TailCallRuntime(ExternalReference(IC_Utility(kKeyedLoadIC_Miss)), 2, 1); | 535 ExternalReference ref = ExternalReference(IC_Utility(kKeyedLoadIC_Miss)); |
| 536 __ TailCallExternalReference(ref, 2, 1); |
| 535 } | 537 } |
| 536 | 538 |
| 537 | 539 |
| 538 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { | 540 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
| 539 // ---------- S t a t e -------------- | 541 // ---------- S t a t e -------------- |
| 540 // -- lr : return address | 542 // -- lr : return address |
| 541 // -- sp[0] : key | 543 // -- sp[0] : key |
| 542 // -- sp[4] : receiver | 544 // -- sp[4] : receiver |
| 543 // ----------------------------------- | 545 // ----------------------------------- |
| 544 | 546 |
| 545 __ ldm(ia, sp, r2.bit() | r3.bit()); | 547 __ ldm(ia, sp, r2.bit() | r3.bit()); |
| 546 __ stm(db_w, sp, r2.bit() | r3.bit()); | 548 __ stm(db_w, sp, r2.bit() | r3.bit()); |
| 547 | 549 |
| 548 __ TailCallRuntime(ExternalReference(Runtime::kGetProperty), 2, 1); | 550 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); |
| 549 } | 551 } |
| 550 | 552 |
| 551 | 553 |
| 552 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { | 554 void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { |
| 553 // ---------- S t a t e -------------- | 555 // ---------- S t a t e -------------- |
| 554 // -- lr : return address | 556 // -- lr : return address |
| 555 // -- sp[0] : key | 557 // -- sp[0] : key |
| 556 // -- sp[4] : receiver | 558 // -- sp[4] : receiver |
| 557 // ----------------------------------- | 559 // ----------------------------------- |
| 558 Label slow, fast; | 560 Label slow, fast; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 __ ldrb(r3, FieldMemOperand(r2, Map::kBitFieldOffset)); | 657 __ ldrb(r3, FieldMemOperand(r2, Map::kBitFieldOffset)); |
| 656 __ and_(r3, r3, Operand(kSlowCaseBitFieldMask)); | 658 __ and_(r3, r3, Operand(kSlowCaseBitFieldMask)); |
| 657 __ cmp(r3, Operand(1 << Map::kHasIndexedInterceptor)); | 659 __ cmp(r3, Operand(1 << Map::kHasIndexedInterceptor)); |
| 658 __ b(ne, &slow); | 660 __ b(ne, &slow); |
| 659 | 661 |
| 660 // Everything is fine, call runtime. | 662 // Everything is fine, call runtime. |
| 661 __ push(r1); // receiver | 663 __ push(r1); // receiver |
| 662 __ push(r0); // key | 664 __ push(r0); // key |
| 663 | 665 |
| 664 // Perform tail call to the entry. | 666 // Perform tail call to the entry. |
| 665 __ TailCallRuntime(ExternalReference( | 667 __ TailCallExternalReference(ExternalReference( |
| 666 IC_Utility(kKeyedLoadPropertyWithInterceptor)), 2, 1); | 668 IC_Utility(kKeyedLoadPropertyWithInterceptor)), 2, 1); |
| 667 | 669 |
| 668 __ bind(&slow); | 670 __ bind(&slow); |
| 669 GenerateMiss(masm); | 671 GenerateMiss(masm); |
| 670 } | 672 } |
| 671 | 673 |
| 672 | 674 |
| 673 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | 675 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
| 674 // ---------- S t a t e -------------- | 676 // ---------- S t a t e -------------- |
| 675 // -- r0 : value | 677 // -- r0 : value |
| 676 // -- lr : return address | 678 // -- lr : return address |
| 677 // -- sp[0] : key | 679 // -- sp[0] : key |
| 678 // -- sp[1] : receiver | 680 // -- sp[1] : receiver |
| 679 // ----------------------------------- | 681 // ----------------------------------- |
| 680 | 682 |
| 681 __ ldm(ia, sp, r2.bit() | r3.bit()); | 683 __ ldm(ia, sp, r2.bit() | r3.bit()); |
| 682 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); | 684 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); |
| 683 | 685 |
| 684 __ TailCallRuntime(ExternalReference(IC_Utility(kKeyedStoreIC_Miss)), 3, 1); | 686 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss)); |
| 687 __ TailCallExternalReference(ref, 3, 1); |
| 685 } | 688 } |
| 686 | 689 |
| 687 | 690 |
| 688 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { | 691 void KeyedStoreIC::GenerateRuntimeSetProperty(MacroAssembler* masm) { |
| 689 // ---------- S t a t e -------------- | 692 // ---------- S t a t e -------------- |
| 690 // -- r0 : value | 693 // -- r0 : value |
| 691 // -- lr : return address | 694 // -- lr : return address |
| 692 // -- sp[0] : key | 695 // -- sp[0] : key |
| 693 // -- sp[1] : receiver | 696 // -- sp[1] : receiver |
| 694 // ----------------------------------- | 697 // ----------------------------------- |
| 695 __ ldm(ia, sp, r1.bit() | r3.bit()); // r0 == value, r1 == key, r3 == object | 698 __ ldm(ia, sp, r1.bit() | r3.bit()); // r0 == value, r1 == key, r3 == object |
| 696 __ stm(db_w, sp, r0.bit() | r1.bit() | r3.bit()); | 699 __ stm(db_w, sp, r0.bit() | r1.bit() | r3.bit()); |
| 697 | 700 |
| 698 __ TailCallRuntime(ExternalReference(Runtime::kSetProperty), 3, 1); | 701 __ TailCallRuntime(Runtime::kSetProperty, 3, 1); |
| 699 } | 702 } |
| 700 | 703 |
| 701 | 704 |
| 702 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { | 705 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { |
| 703 // ---------- S t a t e -------------- | 706 // ---------- S t a t e -------------- |
| 704 // -- r0 : value | 707 // -- r0 : value |
| 705 // -- lr : return address | 708 // -- lr : return address |
| 706 // -- sp[0] : key | 709 // -- sp[0] : key |
| 707 // -- sp[1] : receiver | 710 // -- sp[1] : receiver |
| 708 // ----------------------------------- | 711 // ----------------------------------- |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 // -- r0 : value | 850 // -- r0 : value |
| 848 // -- r1 : receiver | 851 // -- r1 : receiver |
| 849 // -- r2 : name | 852 // -- r2 : name |
| 850 // -- lr : return address | 853 // -- lr : return address |
| 851 // ----------------------------------- | 854 // ----------------------------------- |
| 852 | 855 |
| 853 __ push(r1); | 856 __ push(r1); |
| 854 __ stm(db_w, sp, r2.bit() | r0.bit()); | 857 __ stm(db_w, sp, r2.bit() | r0.bit()); |
| 855 | 858 |
| 856 // Perform tail call to the entry. | 859 // Perform tail call to the entry. |
| 857 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1); | 860 ExternalReference ref = ExternalReference(IC_Utility(kStoreIC_Miss)); |
| 861 __ TailCallExternalReference(ref, 3, 1); |
| 858 } | 862 } |
| 859 | 863 |
| 860 | 864 |
| 861 void StoreIC::GenerateArrayLength(MacroAssembler* masm) { | 865 void StoreIC::GenerateArrayLength(MacroAssembler* masm) { |
| 862 // ----------- S t a t e ------------- | 866 // ----------- S t a t e ------------- |
| 863 // -- r0 : value | 867 // -- r0 : value |
| 864 // -- r1 : receiver | 868 // -- r1 : receiver |
| 865 // -- r2 : name | 869 // -- r2 : name |
| 866 // -- lr : return address | 870 // -- lr : return address |
| 867 // ----------------------------------- | 871 // ----------------------------------- |
| (...skipping 22 matching lines...) Expand all Loading... |
| 890 __ CompareObjectType(scratch, scratch, scratch, FIXED_ARRAY_TYPE); | 894 __ CompareObjectType(scratch, scratch, scratch, FIXED_ARRAY_TYPE); |
| 891 __ b(ne, &miss); | 895 __ b(ne, &miss); |
| 892 | 896 |
| 893 // Check that value is a smi. | 897 // Check that value is a smi. |
| 894 __ BranchOnNotSmi(value, &miss); | 898 __ BranchOnNotSmi(value, &miss); |
| 895 | 899 |
| 896 // Prepare tail call to StoreIC_ArrayLength. | 900 // Prepare tail call to StoreIC_ArrayLength. |
| 897 __ push(receiver); | 901 __ push(receiver); |
| 898 __ push(value); | 902 __ push(value); |
| 899 | 903 |
| 900 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_ArrayLength)), 2, 1); | 904 ExternalReference ref = ExternalReference(IC_Utility(kStoreIC_ArrayLength)); |
| 905 __ TailCallExternalReference(ref, 2, 1); |
| 901 | 906 |
| 902 __ bind(&miss); | 907 __ bind(&miss); |
| 903 | 908 |
| 904 GenerateMiss(masm); | 909 GenerateMiss(masm); |
| 905 } | 910 } |
| 906 | 911 |
| 907 | 912 |
| 908 #undef __ | 913 #undef __ |
| 909 | 914 |
| 910 | 915 |
| 911 } } // namespace v8::internal | 916 } } // namespace v8::internal |
| OLD | NEW |