Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: src/arm/code-stubs-arm.h

Issue 6478027: Implement specialized IC code stubs for pixel array stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge with latest Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 void Generate(MacroAssembler* masm); 582 void Generate(MacroAssembler* masm);
583 void GenerateCall(MacroAssembler* masm, ApiFunction *function); 583 void GenerateCall(MacroAssembler* masm, ApiFunction *function);
584 584
585 private: 585 private:
586 Major MajorKey() { return DirectCEntry; } 586 Major MajorKey() { return DirectCEntry; }
587 int MinorKey() { return 0; } 587 int MinorKey() { return 0; }
588 const char* GetName() { return "DirectCEntryStub"; } 588 const char* GetName() { return "DirectCEntryStub"; }
589 }; 589 };
590 590
591 591
592 // Generate code the to load an element from a pixel array. The receiver is 592 // Generate code to load an element from a pixel array. The receiver is assumed
593 // assumed to not be a smi and to have elements, the caller must guarantee this 593 // to not be a smi and to have elements, the caller must guarantee this
594 // precondition. If the receiver does not have elements that are pixel arrays, 594 // precondition. If key is not a smi, then the generated code branches to
595 // the generated code jumps to not_pixel_array. If key is not a smi, then the 595 // key_not_smi. Callers can specify NULL for key_not_smi to signal that a smi
596 // generated code branches to key_not_smi. Callers can specify NULL for 596 // check has already been performed on key so that the smi check is not
597 // key_not_smi to signal that a smi check has already been performed on key so 597 // generated. If key is not a valid index within the bounds of the pixel array,
598 // that the smi check is not generated . If key is not a valid index within the 598 // the generated code jumps to out_of_range. receiver, key and elements are
599 // bounds of the pixel array, the generated code jumps to out_of_range. 599 // unchanged throughout the generated code sequence.
600 void GenerateFastPixelArrayLoad(MacroAssembler* masm, 600 void GenerateFastPixelArrayLoad(MacroAssembler* masm,
601 Register receiver, 601 Register receiver,
602 Register key, 602 Register key,
603 Register elements_map, 603 Register elements_map,
604 Register elements, 604 Register elements,
605 Register scratch1, 605 Register scratch1,
606 Register scratch2, 606 Register scratch2,
607 Register result, 607 Register result,
608 Label* not_pixel_array, 608 Label* not_pixel_array,
609 Label* key_not_smi, 609 Label* key_not_smi,
610 Label* out_of_range); 610 Label* out_of_range);
611 611
612 // Generate code to store an element into a pixel array, clamping values between
613 // [0..255]. The receiver is assumed to not be a smi and to have elements, the
614 // caller must guarantee this precondition. If key is not a smi, then the
615 // generated code branches to key_not_smi. Callers can specify NULL for
616 // key_not_smi to signal that a smi check has already been performed on key so
617 // that the smi check is not generated. If value is not a smi, the generated
618 // code will branch to value_not_smi. If the receiver doesn't have pixel array
619 // elements, the generated code will branch to not_pixel_array, unless
620 // not_pixel_array is NULL, in which case the caller must ensure that the
621 // receiver has pixel array elements. If key is not a valid index within the
622 // bounds of the pixel array, the generated code jumps to out_of_range. If
623 // load_elements_from_receiver is true, then the elements of receiver is loaded
624 // into elements, otherwise elements is assumed to already be the receiver's
625 // elements. If load_elements_map_from_elements is true, elements_map is loaded
626 // from elements, otherwise it is assumed to already contain the element map.
627 void GenerateFastPixelArrayStore(MacroAssembler* masm,
628 Register receiver,
629 Register key,
630 Register value,
631 Register elements,
632 Register elements_map,
633 Register scratch1,
634 Register scratch2,
635 bool load_elements_from_receiver,
636 bool load_elements_map_from_elements,
637 Label* key_not_smi,
638 Label* value_not_smi,
639 Label* not_pixel_array,
640 Label* out_of_range);
612 641
613 } } // namespace v8::internal 642 } } // namespace v8::internal
614 643
615 #endif // V8_ARM_CODE_STUBS_ARM_H_ 644 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698