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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 } | 532 } |
533 | 533 |
534 void KeyedStoreIC::Generate(MacroAssembler* masm, | 534 void KeyedStoreIC::Generate(MacroAssembler* masm, |
535 const ExternalReference& f) { | 535 const ExternalReference& f) { |
536 } | 536 } |
537 | 537 |
538 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { | 538 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { |
539 } | 539 } |
540 | 540 |
541 | 541 |
542 // Defined in ic.cc. | |
543 Object* StoreIC_Miss(Arguments args); | |
544 | |
545 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 542 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
546 // ----------- S t a t e ------------- | 543 // ----------- S t a t e ------------- |
547 // -- r0 : value | 544 // -- r0 : value |
548 // -- r2 : name | 545 // -- r2 : name |
549 // -- lr : return address | 546 // -- lr : return address |
550 // -- [sp] : receiver | 547 // -- [sp] : receiver |
551 // ----------------------------------- | 548 // ----------------------------------- |
552 | 549 |
553 // Get the receiver from the stack and probe the stub cache. | 550 // Get the receiver from the stack and probe the stub cache. |
554 __ ldr(r1, MemOperand(sp)); | 551 __ ldr(r1, MemOperand(sp)); |
555 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, MONOMORPHIC); | 552 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, MONOMORPHIC); |
556 StubCache::GenerateProbe(masm, flags, r1, r2, r3); | 553 StubCache::GenerateProbe(masm, flags, r1, r2, r3); |
557 | 554 |
558 // Cache miss: Jump to runtime. | 555 // Cache miss: Jump to runtime. |
559 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); | 556 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); |
560 } | 557 } |
561 | 558 |
562 | 559 |
| 560 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { |
| 561 // ----------- S t a t e ------------- |
| 562 // -- r0 : value |
| 563 // -- r2 : name |
| 564 // -- lr : return address |
| 565 // -- [sp] : receiver |
| 566 // ----------------------------------- |
| 567 |
| 568 __ ldr(r3, MemOperand(sp)); // copy receiver |
| 569 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); |
| 570 |
| 571 // Perform tail call to the entry. |
| 572 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_ExtendStorage)), 3); |
| 573 } |
| 574 |
| 575 |
563 void StoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) { | 576 void StoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) { |
564 // ----------- S t a t e ------------- | 577 // ----------- S t a t e ------------- |
565 // -- r0 : value | 578 // -- r0 : value |
566 // -- r2 : name | 579 // -- r2 : name |
567 // -- lr : return address | 580 // -- lr : return address |
568 // -- [sp] : receiver | 581 // -- [sp] : receiver |
569 // ----------------------------------- | 582 // ----------------------------------- |
570 | 583 |
571 __ ldr(r3, MemOperand(sp)); // copy receiver | 584 __ ldr(r3, MemOperand(sp)); // copy receiver |
572 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); | 585 __ stm(db_w, sp, r0.bit() | r2.bit() | r3.bit()); |
573 | 586 |
574 // Perform tail call to the entry. | 587 // Perform tail call to the entry. |
575 __ TailCallRuntime(f, 3); | 588 __ TailCallRuntime(f, 3); |
576 } | 589 } |
577 | 590 |
578 | 591 |
579 #undef __ | 592 #undef __ |
580 | 593 |
581 | 594 |
582 } } // namespace v8::internal | 595 } } // namespace v8::internal |
OLD | NEW |