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 2893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2904 | 2904 |
2905 virtual void PrintDataTo(StringStream* stream); | 2905 virtual void PrintDataTo(StringStream* stream); |
2906 | 2906 |
2907 HValue* index() { return OperandAt(0); } | 2907 HValue* index() { return OperandAt(0); } |
2908 HValue* length() { return OperandAt(1); } | 2908 HValue* length() { return OperandAt(1); } |
2909 | 2909 |
2910 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck) | 2910 DECLARE_CONCRETE_INSTRUCTION(BoundsCheck) |
2911 | 2911 |
2912 protected: | 2912 protected: |
2913 virtual bool DataEquals(HValue* other) { return true; } | 2913 virtual bool DataEquals(HValue* other) { return true; } |
2914 | |
2915 private: | |
2914 BoundsCheckKeyMode key_mode_; | 2916 BoundsCheckKeyMode key_mode_; |
2915 }; | 2917 }; |
2916 | 2918 |
2917 | 2919 |
2918 class HBitwiseBinaryOperation: public HBinaryOperation { | 2920 class HBitwiseBinaryOperation: public HBinaryOperation { |
2919 public: | 2921 public: |
2920 HBitwiseBinaryOperation(HValue* context, HValue* left, HValue* right) | 2922 HBitwiseBinaryOperation(HValue* context, HValue* left, HValue* right) |
2921 : HBinaryOperation(context, left, right) { | 2923 : HBinaryOperation(context, left, right) { |
2922 set_representation(Representation::Tagged()); | 2924 set_representation(Representation::Tagged()); |
2923 SetFlag(kFlexibleRepresentation); | 2925 SetFlag(kFlexibleRepresentation); |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3760 return Representation::None(); | 3762 return Representation::None(); |
3761 } | 3763 } |
3762 | 3764 |
3763 DECLARE_CONCRETE_INSTRUCTION(OsrEntry) | 3765 DECLARE_CONCRETE_INSTRUCTION(OsrEntry) |
3764 | 3766 |
3765 private: | 3767 private: |
3766 BailoutId ast_id_; | 3768 BailoutId ast_id_; |
3767 }; | 3769 }; |
3768 | 3770 |
3769 | 3771 |
3772 enum ParameterKind { | |
3773 FUNCTION_PARAMETER, | |
3774 KEYED_LOAD_IC_PARAMETER, | |
3775 KEYED_STORE_IC_PARAMETER | |
Jakob Kummerow
2012/11/19 12:36:00
Remove this
danno
2012/11/26 17:16:18
Done.
| |
3776 }; | |
3777 | |
3778 | |
3770 class HParameter: public HTemplateInstruction<0> { | 3779 class HParameter: public HTemplateInstruction<0> { |
3771 public: | 3780 public: |
3772 explicit HParameter(unsigned index) : index_(index) { | 3781 explicit HParameter(unsigned index, |
3782 ParameterKind kind = FUNCTION_PARAMETER) | |
3783 : index_(index), | |
3784 kind_(kind) { | |
3773 set_representation(Representation::Tagged()); | 3785 set_representation(Representation::Tagged()); |
3774 } | 3786 } |
3775 | 3787 |
3776 unsigned index() const { return index_; } | 3788 unsigned index() const { return index_; } |
3789 ParameterKind kind() const { return kind_; } | |
3777 | 3790 |
3778 virtual void PrintDataTo(StringStream* stream); | 3791 virtual void PrintDataTo(StringStream* stream); |
3779 | 3792 |
3780 virtual Representation RequiredInputRepresentation(int index) { | 3793 virtual Representation RequiredInputRepresentation(int index) { |
3781 return Representation::None(); | 3794 return Representation::None(); |
3782 } | 3795 } |
3783 | 3796 |
3784 DECLARE_CONCRETE_INSTRUCTION(Parameter) | 3797 DECLARE_CONCRETE_INSTRUCTION(Parameter) |
3785 | 3798 |
3786 private: | 3799 private: |
3787 unsigned index_; | 3800 unsigned index_; |
3801 ParameterKind kind_; | |
3788 }; | 3802 }; |
3789 | 3803 |
3790 | 3804 |
3791 class HCallStub: public HUnaryCall { | 3805 class HCallStub: public HUnaryCall { |
3792 public: | 3806 public: |
3793 HCallStub(HValue* context, CodeStub::Major major_key, int argument_count) | 3807 HCallStub(HValue* context, CodeStub::Major major_key, int argument_count) |
3794 : HUnaryCall(context, argument_count), | 3808 : HUnaryCall(context, argument_count), |
3795 major_key_(major_key), | 3809 major_key_(major_key), |
3796 transcendental_type_(TranscendentalCache::kNumberOfCaches) { | 3810 transcendental_type_(TranscendentalCache::kNumberOfCaches) { |
3797 } | 3811 } |
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5282 virtual bool IsDeletable() const { return true; } | 5296 virtual bool IsDeletable() const { return true; } |
5283 }; | 5297 }; |
5284 | 5298 |
5285 | 5299 |
5286 #undef DECLARE_INSTRUCTION | 5300 #undef DECLARE_INSTRUCTION |
5287 #undef DECLARE_CONCRETE_INSTRUCTION | 5301 #undef DECLARE_CONCRETE_INSTRUCTION |
5288 | 5302 |
5289 } } // namespace v8::internal | 5303 } } // namespace v8::internal |
5290 | 5304 |
5291 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5305 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |