| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 V(Mul) \ | 146 V(Mul) \ |
| 147 V(ObjectLiteral) \ | 147 V(ObjectLiteral) \ |
| 148 V(OsrEntry) \ | 148 V(OsrEntry) \ |
| 149 V(OuterContext) \ | 149 V(OuterContext) \ |
| 150 V(Parameter) \ | 150 V(Parameter) \ |
| 151 V(Power) \ | 151 V(Power) \ |
| 152 V(PushArgument) \ | 152 V(PushArgument) \ |
| 153 V(Random) \ | 153 V(Random) \ |
| 154 V(RegExpLiteral) \ | 154 V(RegExpLiteral) \ |
| 155 V(Return) \ | 155 V(Return) \ |
| 156 V(Ror) \ |
| 156 V(Sar) \ | 157 V(Sar) \ |
| 157 V(Shl) \ | 158 V(Shl) \ |
| 158 V(Shr) \ | 159 V(Shr) \ |
| 159 V(Simulate) \ | 160 V(Simulate) \ |
| 160 V(SoftDeoptimize) \ | 161 V(SoftDeoptimize) \ |
| 161 V(StackCheck) \ | 162 V(StackCheck) \ |
| 162 V(StoreContextSlot) \ | 163 V(StoreContextSlot) \ |
| 163 V(StoreGlobalCell) \ | 164 V(StoreGlobalCell) \ |
| 164 V(StoreGlobalGeneric) \ | 165 V(StoreGlobalGeneric) \ |
| 165 V(StoreKeyedFastDoubleElement) \ | 166 V(StoreKeyedFastDoubleElement) \ |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 bool CanTruncateToInt32() const { return CheckFlag(kTruncatingToInt32); } | 891 bool CanTruncateToInt32() const { return CheckFlag(kTruncatingToInt32); } |
| 891 | 892 |
| 892 virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0; | 893 virtual LInstruction* CompileToLithium(LChunkBuilder* builder) = 0; |
| 893 | 894 |
| 894 #ifdef DEBUG | 895 #ifdef DEBUG |
| 895 virtual void Verify(); | 896 virtual void Verify(); |
| 896 #endif | 897 #endif |
| 897 | 898 |
| 898 virtual bool IsCall() { return false; } | 899 virtual bool IsCall() { return false; } |
| 899 | 900 |
| 901 bool UnusedAndSafeToDelete() const { |
| 902 bool deleteable_operation = IsBitwiseBinaryOperation(); |
| 903 return HasNoUses() && !HasObservableSideEffects() && deleteable_operation; |
| 904 } |
| 905 |
| 900 DECLARE_ABSTRACT_INSTRUCTION(Instruction) | 906 DECLARE_ABSTRACT_INSTRUCTION(Instruction) |
| 901 | 907 |
| 902 protected: | 908 protected: |
| 903 HInstruction() | 909 HInstruction() |
| 904 : next_(NULL), | 910 : next_(NULL), |
| 905 previous_(NULL), | 911 previous_(NULL), |
| 906 position_(RelocInfo::kNoPosition) { | 912 position_(RelocInfo::kNoPosition) { |
| 907 SetGVNFlag(kDependsOnOsrEntries); | 913 SetGVNFlag(kDependsOnOsrEntries); |
| 908 } | 914 } |
| 909 | 915 |
| (...skipping 2732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3642 HValue* left, | 3648 HValue* left, |
| 3643 HValue* right); | 3649 HValue* right); |
| 3644 | 3650 |
| 3645 DECLARE_CONCRETE_INSTRUCTION(Sar) | 3651 DECLARE_CONCRETE_INSTRUCTION(Sar) |
| 3646 | 3652 |
| 3647 protected: | 3653 protected: |
| 3648 virtual bool DataEquals(HValue* other) { return true; } | 3654 virtual bool DataEquals(HValue* other) { return true; } |
| 3649 }; | 3655 }; |
| 3650 | 3656 |
| 3651 | 3657 |
| 3658 class HRor: public HBitwiseBinaryOperation { |
| 3659 public: |
| 3660 HRor(HValue* context, HValue* left, HValue* right) |
| 3661 : HBitwiseBinaryOperation(context, left, right) { |
| 3662 ChangeRepresentation(Representation::Integer32()); |
| 3663 } |
| 3664 |
| 3665 virtual Representation RequiredInputRepresentation(int index) { |
| 3666 return Representation::Integer32(); |
| 3667 } |
| 3668 |
| 3669 static HInstruction* NewHRor(Zone* zone, |
| 3670 HValue* context, |
| 3671 HValue* left, |
| 3672 HValue* right); |
| 3673 |
| 3674 DECLARE_CONCRETE_INSTRUCTION(Ror) |
| 3675 |
| 3676 protected: |
| 3677 virtual bool DataEquals(HValue* other) { return true; } |
| 3678 }; |
| 3679 |
| 3680 |
| 3652 class HOsrEntry: public HTemplateInstruction<0> { | 3681 class HOsrEntry: public HTemplateInstruction<0> { |
| 3653 public: | 3682 public: |
| 3654 explicit HOsrEntry(BailoutId ast_id) : ast_id_(ast_id) { | 3683 explicit HOsrEntry(BailoutId ast_id) : ast_id_(ast_id) { |
| 3655 SetGVNFlag(kChangesOsrEntries); | 3684 SetGVNFlag(kChangesOsrEntries); |
| 3656 } | 3685 } |
| 3657 | 3686 |
| 3658 BailoutId ast_id() const { return ast_id_; } | 3687 BailoutId ast_id() const { return ast_id_; } |
| 3659 | 3688 |
| 3660 virtual Representation RequiredInputRepresentation(int index) { | 3689 virtual Representation RequiredInputRepresentation(int index) { |
| 3661 return Representation::None(); | 3690 return Representation::None(); |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5282 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5311 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
| 5283 }; | 5312 }; |
| 5284 | 5313 |
| 5285 | 5314 |
| 5286 #undef DECLARE_INSTRUCTION | 5315 #undef DECLARE_INSTRUCTION |
| 5287 #undef DECLARE_CONCRETE_INSTRUCTION | 5316 #undef DECLARE_CONCRETE_INSTRUCTION |
| 5288 | 5317 |
| 5289 } } // namespace v8::internal | 5318 } } // namespace v8::internal |
| 5290 | 5319 |
| 5291 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5320 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |