| OLD | NEW |
| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 V(Power) \ | 141 V(Power) \ |
| 142 V(PushArgument) \ | 142 V(PushArgument) \ |
| 143 V(RegExpLiteral) \ | 143 V(RegExpLiteral) \ |
| 144 V(Return) \ | 144 V(Return) \ |
| 145 V(Sar) \ | 145 V(Sar) \ |
| 146 V(Shl) \ | 146 V(Shl) \ |
| 147 V(Shr) \ | 147 V(Shr) \ |
| 148 V(Simulate) \ | 148 V(Simulate) \ |
| 149 V(StackCheck) \ | 149 V(StackCheck) \ |
| 150 V(StoreContextSlot) \ | 150 V(StoreContextSlot) \ |
| 151 V(StoreGlobal) \ | 151 V(StoreGlobalCell) \ |
| 152 V(StoreGlobalGeneric) \ |
| 152 V(StoreKeyedFastElement) \ | 153 V(StoreKeyedFastElement) \ |
| 153 V(StoreKeyedSpecializedArrayElement) \ | 154 V(StoreKeyedSpecializedArrayElement) \ |
| 154 V(StoreKeyedGeneric) \ | 155 V(StoreKeyedGeneric) \ |
| 155 V(StoreNamedField) \ | 156 V(StoreNamedField) \ |
| 156 V(StoreNamedGeneric) \ | 157 V(StoreNamedGeneric) \ |
| 157 V(StringCharCodeAt) \ | 158 V(StringCharCodeAt) \ |
| 158 V(StringCharFromCode) \ | 159 V(StringCharFromCode) \ |
| 159 V(StringLength) \ | 160 V(StringLength) \ |
| 160 V(Sub) \ | 161 V(Sub) \ |
| 161 V(Test) \ | 162 V(Test) \ |
| (...skipping 2709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2871 } | 2872 } |
| 2872 | 2873 |
| 2873 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load_global_generic") | 2874 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric, "load_global_generic") |
| 2874 | 2875 |
| 2875 private: | 2876 private: |
| 2876 Handle<Object> name_; | 2877 Handle<Object> name_; |
| 2877 bool for_typeof_; | 2878 bool for_typeof_; |
| 2878 }; | 2879 }; |
| 2879 | 2880 |
| 2880 | 2881 |
| 2881 class HStoreGlobal: public HUnaryOperation { | 2882 class HStoreGlobalCell: public HUnaryOperation { |
| 2882 public: | 2883 public: |
| 2883 HStoreGlobal(HValue* value, | 2884 HStoreGlobalCell(HValue* value, |
| 2884 Handle<JSGlobalPropertyCell> cell, | 2885 Handle<JSGlobalPropertyCell> cell, |
| 2885 bool check_hole_value) | 2886 bool check_hole_value) |
| 2886 : HUnaryOperation(value), | 2887 : HUnaryOperation(value), |
| 2887 cell_(cell), | 2888 cell_(cell), |
| 2888 check_hole_value_(check_hole_value) { | 2889 check_hole_value_(check_hole_value) { |
| 2889 SetFlag(kChangesGlobalVars); | 2890 SetFlag(kChangesGlobalVars); |
| 2890 } | 2891 } |
| 2891 | 2892 |
| 2892 Handle<JSGlobalPropertyCell> cell() const { return cell_; } | 2893 Handle<JSGlobalPropertyCell> cell() const { return cell_; } |
| 2893 bool check_hole_value() const { return check_hole_value_; } | 2894 bool check_hole_value() const { return check_hole_value_; } |
| 2894 | 2895 |
| 2895 virtual Representation RequiredInputRepresentation(int index) const { | 2896 virtual Representation RequiredInputRepresentation(int index) const { |
| 2896 return Representation::Tagged(); | 2897 return Representation::Tagged(); |
| 2897 } | 2898 } |
| 2898 virtual void PrintDataTo(StringStream* stream); | 2899 virtual void PrintDataTo(StringStream* stream); |
| 2899 | 2900 |
| 2900 DECLARE_CONCRETE_INSTRUCTION(StoreGlobal, "store_global") | 2901 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalCell, "store_global_cell") |
| 2901 | 2902 |
| 2902 private: | 2903 private: |
| 2903 Handle<JSGlobalPropertyCell> cell_; | 2904 Handle<JSGlobalPropertyCell> cell_; |
| 2904 bool check_hole_value_; | 2905 bool check_hole_value_; |
| 2905 }; | 2906 }; |
| 2906 | 2907 |
| 2907 | 2908 |
| 2909 class HStoreGlobalGeneric: public HTemplateInstruction<3> { |
| 2910 public: |
| 2911 HStoreGlobalGeneric(HValue* context, |
| 2912 HValue* global_object, |
| 2913 Handle<Object> name, |
| 2914 HValue* value) |
| 2915 : name_(name) { |
| 2916 SetOperandAt(0, context); |
| 2917 SetOperandAt(1, global_object); |
| 2918 SetOperandAt(2, value); |
| 2919 set_representation(Representation::Tagged()); |
| 2920 SetAllSideEffects(); |
| 2921 } |
| 2922 |
| 2923 HValue* context() { return OperandAt(0); } |
| 2924 HValue* global_object() { return OperandAt(1); } |
| 2925 Handle<Object> name() const { return name_; } |
| 2926 HValue* value() { return OperandAt(2); } |
| 2927 |
| 2928 virtual void PrintDataTo(StringStream* stream); |
| 2929 |
| 2930 virtual Representation RequiredInputRepresentation(int index) const { |
| 2931 return Representation::Tagged(); |
| 2932 } |
| 2933 |
| 2934 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store_global_generic") |
| 2935 |
| 2936 private: |
| 2937 Handle<Object> name_; |
| 2938 }; |
| 2939 |
| 2940 |
| 2908 class HLoadContextSlot: public HUnaryOperation { | 2941 class HLoadContextSlot: public HUnaryOperation { |
| 2909 public: | 2942 public: |
| 2910 HLoadContextSlot(HValue* context , int slot_index) | 2943 HLoadContextSlot(HValue* context , int slot_index) |
| 2911 : HUnaryOperation(context), slot_index_(slot_index) { | 2944 : HUnaryOperation(context), slot_index_(slot_index) { |
| 2912 set_representation(Representation::Tagged()); | 2945 set_representation(Representation::Tagged()); |
| 2913 SetFlag(kUseGVN); | 2946 SetFlag(kUseGVN); |
| 2914 SetFlag(kDependsOnContextSlots); | 2947 SetFlag(kDependsOnContextSlots); |
| 2915 } | 2948 } |
| 2916 | 2949 |
| 2917 int slot_index() const { return slot_index_; } | 2950 int slot_index() const { return slot_index_; } |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3618 HValue* object() { return left(); } | 3651 HValue* object() { return left(); } |
| 3619 HValue* key() { return right(); } | 3652 HValue* key() { return right(); } |
| 3620 }; | 3653 }; |
| 3621 | 3654 |
| 3622 #undef DECLARE_INSTRUCTION | 3655 #undef DECLARE_INSTRUCTION |
| 3623 #undef DECLARE_CONCRETE_INSTRUCTION | 3656 #undef DECLARE_CONCRETE_INSTRUCTION |
| 3624 | 3657 |
| 3625 } } // namespace v8::internal | 3658 } } // namespace v8::internal |
| 3626 | 3659 |
| 3627 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 3660 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |