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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 void GenerateCall(MacroAssembler* masm, ApiFunction *function); | 583 void GenerateCall(MacroAssembler* masm, ApiFunction *function); |
584 void GenerateCall(MacroAssembler* masm, Register target); | 584 void GenerateCall(MacroAssembler* masm, Register target); |
585 | 585 |
586 private: | 586 private: |
587 Major MajorKey() { return DirectCEntry; } | 587 Major MajorKey() { return DirectCEntry; } |
588 int MinorKey() { return 0; } | 588 int MinorKey() { return 0; } |
589 const char* GetName() { return "DirectCEntryStub"; } | 589 const char* GetName() { return "DirectCEntryStub"; } |
590 }; | 590 }; |
591 | 591 |
592 | 592 |
593 // Generate code to load an element from a pixel array. The receiver is assumed | |
594 // to not be a smi and to have elements, the caller must guarantee this | |
595 // precondition. If key is not a smi, then the generated code branches to | |
596 // key_not_smi. Callers can specify NULL for key_not_smi to signal that a smi | |
597 // check has already been performed on key so that the smi check is not | |
598 // generated. If key is not a valid index within the bounds of the pixel array, | |
599 // the generated code jumps to out_of_range. receiver, key and elements are | |
600 // unchanged throughout the generated code sequence. | |
601 void GenerateFastPixelArrayLoad(MacroAssembler* masm, | |
602 Register receiver, | |
603 Register key, | |
604 Register elements_map, | |
605 Register elements, | |
606 Register scratch1, | |
607 Register scratch2, | |
608 Register result, | |
609 Label* not_pixel_array, | |
610 Label* key_not_smi, | |
611 Label* out_of_range); | |
612 | |
613 // Generate code to store an element into a pixel array, clamping values between | |
614 // [0..255]. The receiver is assumed to not be a smi and to have elements, the | |
615 // caller must guarantee this precondition. If key is not a smi, then the | |
616 // generated code branches to key_not_smi. Callers can specify NULL for | |
617 // key_not_smi to signal that a smi check has already been performed on key so | |
618 // that the smi check is not generated. If value is not a smi, the generated | |
619 // code will branch to value_not_smi. If the receiver doesn't have pixel array | |
620 // elements, the generated code will branch to not_pixel_array, unless | |
621 // not_pixel_array is NULL, in which case the caller must ensure that the | |
622 // receiver has pixel array elements. If key is not a valid index within the | |
623 // bounds of the pixel array, the generated code jumps to out_of_range. If | |
624 // load_elements_from_receiver is true, then the elements of receiver is loaded | |
625 // into elements, otherwise elements is assumed to already be the receiver's | |
626 // elements. If load_elements_map_from_elements is true, elements_map is loaded | |
627 // from elements, otherwise it is assumed to already contain the element map. | |
628 void GenerateFastPixelArrayStore(MacroAssembler* masm, | |
629 Register receiver, | |
630 Register key, | |
631 Register value, | |
632 Register elements, | |
633 Register elements_map, | |
634 Register scratch1, | |
635 Register scratch2, | |
636 bool load_elements_from_receiver, | |
637 bool load_elements_map_from_elements, | |
638 Label* key_not_smi, | |
639 Label* value_not_smi, | |
640 Label* not_pixel_array, | |
641 Label* out_of_range); | |
642 | |
643 } } // namespace v8::internal | 593 } } // namespace v8::internal |
644 | 594 |
645 #endif // V8_ARM_CODE_STUBS_ARM_H_ | 595 #endif // V8_ARM_CODE_STUBS_ARM_H_ |
OLD | NEW |