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

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

Issue 6664001: [Isolates] Merge (7083,7111] from bleeding_edge. (Closed)
Patch Set: Created 9 years, 9 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
« no previous file with comments | « src/api.cc ('k') | 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 // Currently only needed on ARM. 581 // Currently only needed on ARM.
582 class RegExpCEntryStub: public CodeStub { 582 class RegExpCEntryStub: public CodeStub {
583 public: 583 public:
584 RegExpCEntryStub() {} 584 RegExpCEntryStub() {}
585 virtual ~RegExpCEntryStub() {} 585 virtual ~RegExpCEntryStub() {}
586 void Generate(MacroAssembler* masm); 586 void Generate(MacroAssembler* masm);
587 587
588 private: 588 private:
589 Major MajorKey() { return RegExpCEntry; } 589 Major MajorKey() { return RegExpCEntry; }
590 int MinorKey() { return 0; } 590 int MinorKey() { return 0; }
591
592 bool NeedsImmovableCode() { return true; }
593
591 const char* GetName() { return "RegExpCEntryStub"; } 594 const char* GetName() { return "RegExpCEntryStub"; }
592 }; 595 };
593 596
594 597
595 // Trampoline stub to call into native code. To call safely into native code 598 // Trampoline stub to call into native code. To call safely into native code
596 // in the presence of compacting GC (which can move code objects) we need to 599 // in the presence of compacting GC (which can move code objects) we need to
597 // keep the code which called into native pinned in the memory. Currently the 600 // keep the code which called into native pinned in the memory. Currently the
598 // simplest approach is to generate such stub early enough so it can never be 601 // simplest approach is to generate such stub early enough so it can never be
599 // moved by GC 602 // moved by GC
600 class DirectCEntryStub: public CodeStub { 603 class DirectCEntryStub: public CodeStub {
601 public: 604 public:
602 DirectCEntryStub() {} 605 DirectCEntryStub() {}
603 void Generate(MacroAssembler* masm); 606 void Generate(MacroAssembler* masm);
604 void GenerateCall(MacroAssembler* masm, ExternalReference function); 607 void GenerateCall(MacroAssembler* masm, ExternalReference function);
605 void GenerateCall(MacroAssembler* masm, Register target); 608 void GenerateCall(MacroAssembler* masm, Register target);
606 609
607 private: 610 private:
608 Major MajorKey() { return DirectCEntry; } 611 Major MajorKey() { return DirectCEntry; }
609 int MinorKey() { return 0; } 612 int MinorKey() { return 0; }
613
614 bool NeedsImmovableCode() { return true; }
615
610 const char* GetName() { return "DirectCEntryStub"; } 616 const char* GetName() { return "DirectCEntryStub"; }
611 }; 617 };
612 618
613 619
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 620 } } // namespace v8::internal
665 621
666 #endif // V8_ARM_CODE_STUBS_ARM_H_ 622 #endif // V8_ARM_CODE_STUBS_ARM_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698