| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 void GenerateCall(MacroAssembler* masm, ExternalReference function); | 604 void GenerateCall(MacroAssembler* masm, ExternalReference function); |
| 605 void GenerateCall(MacroAssembler* masm, Register target); | 605 void GenerateCall(MacroAssembler* masm, Register target); |
| 606 | 606 |
| 607 private: | 607 private: |
| 608 Major MajorKey() { return DirectCEntry; } | 608 Major MajorKey() { return DirectCEntry; } |
| 609 int MinorKey() { return 0; } | 609 int MinorKey() { return 0; } |
| 610 const char* GetName() { return "DirectCEntryStub"; } | 610 const char* GetName() { return "DirectCEntryStub"; } |
| 611 }; | 611 }; |
| 612 | 612 |
| 613 | 613 |
| 614 // Generate code to load an element from a pixel array. The receiver is assumed | |
| 615 // to not be a smi and to have elements, the caller must guarantee this | |
| 616 // precondition. If key is not a smi, then the generated code branches to | |
| 617 // key_not_smi. Callers can specify NULL for key_not_smi to signal that a smi | |
| 618 // check has already been performed on key so that the smi check is not | |
| 619 // generated. If key is not a valid index within the bounds of the pixel array, | |
| 620 // the generated code jumps to out_of_range. receiver, key and elements are | |
| 621 // unchanged throughout the generated code sequence. | |
| 622 void GenerateFastPixelArrayLoad(MacroAssembler* masm, | |
| 623 Register receiver, | |
| 624 Register key, | |
| 625 Register elements_map, | |
| 626 Register elements, | |
| 627 Register scratch1, | |
| 628 Register scratch2, | |
| 629 Register result, | |
| 630 Label* not_pixel_array, | |
| 631 Label* key_not_smi, | |
| 632 Label* out_of_range); | |
| 633 | |
| 634 // Generate code to store an element into a pixel array, clamping values between | |
| 635 // [0..255]. The receiver is assumed to not be a smi and to have elements, the | |
| 636 // caller must guarantee this precondition. If key is not a smi, then the | |
| 637 // generated code branches to key_not_smi. Callers can specify NULL for | |
| 638 // key_not_smi to signal that a smi check has already been performed on key so | |
| 639 // that the smi check is not generated. If value is not a smi, the generated | |
| 640 // code will branch to value_not_smi. If the receiver doesn't have pixel array | |
| 641 // elements, the generated code will branch to not_pixel_array, unless | |
| 642 // not_pixel_array is NULL, in which case the caller must ensure that the | |
| 643 // receiver has pixel array elements. If key is not a valid index within the | |
| 644 // bounds of the pixel array, the generated code jumps to out_of_range. If | |
| 645 // load_elements_from_receiver is true, then the elements of receiver is loaded | |
| 646 // into elements, otherwise elements is assumed to already be the receiver's | |
| 647 // elements. If load_elements_map_from_elements is true, elements_map is loaded | |
| 648 // from elements, otherwise it is assumed to already contain the element map. | |
| 649 void GenerateFastPixelArrayStore(MacroAssembler* masm, | |
| 650 Register receiver, | |
| 651 Register key, | |
| 652 Register value, | |
| 653 Register elements, | |
| 654 Register elements_map, | |
| 655 Register scratch1, | |
| 656 Register scratch2, | |
| 657 bool load_elements_from_receiver, | |
| 658 bool load_elements_map_from_elements, | |
| 659 Label* key_not_smi, | |
| 660 Label* value_not_smi, | |
| 661 Label* not_pixel_array, | |
| 662 Label* out_of_range); | |
| 663 | |
| 664 } } // namespace v8::internal | 614 } } // namespace v8::internal |
| 665 | 615 |
| 666 #endif // V8_ARM_CODE_STUBS_ARM_H_ | 616 #endif // V8_ARM_CODE_STUBS_ARM_H_ |
| OLD | NEW |