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