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

Side by Side Diff: src/hydrogen-instructions.h

Issue 6334055: Merge r6576 and r6581 from bleeding_edge to 3.0 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.0/build/ia32
Patch Set: 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 | « src/hydrogen.cc ('k') | src/ia32/deoptimizer-ia32.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 V(MaterializedLiteral) \ 57 V(MaterializedLiteral) \
58 V(Phi) \ 58 V(Phi) \
59 V(StoreKeyed) \ 59 V(StoreKeyed) \
60 V(StoreNamed) \ 60 V(StoreNamed) \
61 V(UnaryControlInstruction) \ 61 V(UnaryControlInstruction) \
62 V(UnaryOperation) \ 62 V(UnaryOperation) \
63 HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) 63 HYDROGEN_CONCRETE_INSTRUCTION_LIST(V)
64 64
65 65
66 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \ 66 #define HYDROGEN_CONCRETE_INSTRUCTION_LIST(V) \
67 V(AbnormalExit) \
67 V(AccessArgumentsAt) \ 68 V(AccessArgumentsAt) \
68 V(Add) \ 69 V(Add) \
69 V(ApplyArguments) \ 70 V(ApplyArguments) \
70 V(ArgumentsElements) \ 71 V(ArgumentsElements) \
71 V(ArgumentsLength) \ 72 V(ArgumentsLength) \
72 V(ArgumentsObject) \ 73 V(ArgumentsObject) \
73 V(ArrayLiteral) \ 74 V(ArrayLiteral) \
74 V(BitAnd) \ 75 V(BitAnd) \
75 V(BitNot) \ 76 V(BitNot) \
76 V(BitOr) \ 77 V(BitOr) \
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 class HReturn: public HUnaryControlInstruction { 828 class HReturn: public HUnaryControlInstruction {
828 public: 829 public:
829 explicit HReturn(HValue* value) 830 explicit HReturn(HValue* value)
830 : HUnaryControlInstruction(value, NULL, NULL) { 831 : HUnaryControlInstruction(value, NULL, NULL) {
831 } 832 }
832 833
833 DECLARE_CONCRETE_INSTRUCTION(Return, "return") 834 DECLARE_CONCRETE_INSTRUCTION(Return, "return")
834 }; 835 };
835 836
836 837
837 class HThrow: public HUnaryControlInstruction { 838 class HAbnormalExit: public HControlInstruction {
838 public: 839 public:
839 explicit HThrow(HValue* value) 840 HAbnormalExit() : HControlInstruction(NULL, NULL) { }
840 : HUnaryControlInstruction(value, NULL, NULL) { }
841 841
842 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw") 842 DECLARE_CONCRETE_INSTRUCTION(AbnormalExit, "abnormal_exit")
843 }; 843 };
844 844
845 845
846 class HUnaryOperation: public HInstruction { 846 class HUnaryOperation: public HInstruction {
847 public: 847 public:
848 explicit HUnaryOperation(HValue* value) { 848 explicit HUnaryOperation(HValue* value) {
849 SetOperandAt(0, value); 849 SetOperandAt(0, value);
850 } 850 }
851 851
852 HValue* value() const { return OperandAt(0); } 852 HValue* value() const { return OperandAt(0); }
853 virtual void PrintDataTo(StringStream* stream) const; 853 virtual void PrintDataTo(StringStream* stream) const;
854 virtual int OperandCount() const { return 1; } 854 virtual int OperandCount() const { return 1; }
855 virtual HValue* OperandAt(int index) const { return operands_[index]; } 855 virtual HValue* OperandAt(int index) const { return operands_[index]; }
856 856
857 DECLARE_INSTRUCTION(UnaryOperation) 857 DECLARE_INSTRUCTION(UnaryOperation)
858 858
859 protected: 859 protected:
860 virtual void InternalSetOperandAt(int index, HValue* value) { 860 virtual void InternalSetOperandAt(int index, HValue* value) {
861 operands_[index] = value; 861 operands_[index] = value;
862 } 862 }
863 863
864 private: 864 private:
865 HOperandVector<1> operands_; 865 HOperandVector<1> operands_;
866 }; 866 };
867 867
868 868
869 class HThrow: public HUnaryOperation {
870 public:
871 explicit HThrow(HValue* value) : HUnaryOperation(value) {
872 SetAllSideEffects();
873 }
874
875 virtual Representation RequiredInputRepresentation(int index) const {
876 return Representation::Tagged();
877 }
878
879 DECLARE_CONCRETE_INSTRUCTION(Throw, "throw")
880 };
881
882
869 class HChange: public HUnaryOperation { 883 class HChange: public HUnaryOperation {
870 public: 884 public:
871 HChange(HValue* value, 885 HChange(HValue* value,
872 Representation from, 886 Representation from,
873 Representation to) 887 Representation to)
874 : HUnaryOperation(value), from_(from), to_(to) { 888 : HUnaryOperation(value), from_(from), to_(to) {
875 ASSERT(!from.IsNone() && !to.IsNone()); 889 ASSERT(!from.IsNone() && !to.IsNone());
876 ASSERT(!from.Equals(to)); 890 ASSERT(!from.Equals(to));
877 set_representation(to); 891 set_representation(to);
878 SetFlag(kUseGVN); 892 SetFlag(kUseGVN);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 int environment_length_; 996 int environment_length_;
983 ZoneList<HValue*> values_; 997 ZoneList<HValue*> values_;
984 ZoneList<int> assigned_indexes_; 998 ZoneList<int> assigned_indexes_;
985 }; 999 };
986 1000
987 1001
988 class HStackCheck: public HInstruction { 1002 class HStackCheck: public HInstruction {
989 public: 1003 public:
990 HStackCheck() { } 1004 HStackCheck() { }
991 1005
992 DECLARE_CONCRETE_INSTRUCTION(Throw, "stack_check") 1006 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack_check")
993 }; 1007 };
994 1008
995 1009
996 class HEnterInlined: public HInstruction { 1010 class HEnterInlined: public HInstruction {
997 public: 1011 public:
998 HEnterInlined(Handle<JSFunction> closure, FunctionLiteral* function) 1012 HEnterInlined(Handle<JSFunction> closure, FunctionLiteral* function)
999 : closure_(closure), function_(function) { 1013 : closure_(closure), function_(function) {
1000 } 1014 }
1001 1015
1002 virtual void PrintDataTo(StringStream* stream) const; 1016 virtual void PrintDataTo(StringStream* stream) const;
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 public: 1838 public:
1825 HApplyArguments(HValue* function, 1839 HApplyArguments(HValue* function,
1826 HValue* receiver, 1840 HValue* receiver,
1827 HValue* length, 1841 HValue* length,
1828 HValue* elements) { 1842 HValue* elements) {
1829 set_representation(Representation::Tagged()); 1843 set_representation(Representation::Tagged());
1830 SetOperandAt(0, function); 1844 SetOperandAt(0, function);
1831 SetOperandAt(1, receiver); 1845 SetOperandAt(1, receiver);
1832 SetOperandAt(2, length); 1846 SetOperandAt(2, length);
1833 SetOperandAt(3, elements); 1847 SetOperandAt(3, elements);
1848 SetAllSideEffects();
1834 } 1849 }
1835 1850
1836 virtual Representation RequiredInputRepresentation(int index) const { 1851 virtual Representation RequiredInputRepresentation(int index) const {
1837 // The length is untagged, all other inputs are tagged. 1852 // The length is untagged, all other inputs are tagged.
1838 return (index == 2) 1853 return (index == 2)
1839 ? Representation::Integer32() 1854 ? Representation::Integer32()
1840 : Representation::Tagged(); 1855 : Representation::Tagged();
1841 } 1856 }
1842 1857
1843 HValue* function() const { return OperandAt(0); } 1858 HValue* function() const { return OperandAt(0); }
1844 HValue* receiver() const { return OperandAt(1); } 1859 HValue* receiver() const { return OperandAt(1); }
1845 HValue* length() const { return OperandAt(2); } 1860 HValue* length() const { return OperandAt(2); }
1846 HValue* elements() const { return OperandAt(3); } 1861 HValue* elements() const { return OperandAt(3); }
1847 1862
1848 virtual int OperandCount() const { return operands_.length(); } 1863 virtual int OperandCount() const { return operands_.length(); }
1849 virtual HValue* OperandAt(int index) const { return operands_[index]; } 1864 virtual HValue* OperandAt(int index) const { return operands_[index]; }
1850 1865
1851 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply_arguments") 1866 DECLARE_CONCRETE_INSTRUCTION(ApplyArguments, "apply_arguments")
1852 1867
1853
1854
1855 protected: 1868 protected:
1856 virtual void InternalSetOperandAt(int index, HValue* value) { 1869 virtual void InternalSetOperandAt(int index, HValue* value) {
1857 operands_[index] = value; 1870 operands_[index] = value;
1858 } 1871 }
1859 1872
1860 private: 1873 private:
1861 HOperandVector<4> operands_; 1874 HOperandVector<4> operands_;
1862 }; 1875 };
1863 1876
1864 1877
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
3108 HValue* object() const { return left(); } 3121 HValue* object() const { return left(); }
3109 HValue* key() const { return right(); } 3122 HValue* key() const { return right(); }
3110 }; 3123 };
3111 3124
3112 #undef DECLARE_INSTRUCTION 3125 #undef DECLARE_INSTRUCTION
3113 #undef DECLARE_CONCRETE_INSTRUCTION 3126 #undef DECLARE_CONCRETE_INSTRUCTION
3114 3127
3115 } } // namespace v8::internal 3128 } } // namespace v8::internal
3116 3129
3117 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 3130 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698