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 3133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3144 : HBitwiseBinaryOperation(context, left, right), op_(op) { | 3144 : HBitwiseBinaryOperation(context, left, right), op_(op) { |
3145 ASSERT(op == Token::BIT_AND || | 3145 ASSERT(op == Token::BIT_AND || |
3146 op == Token::BIT_OR || | 3146 op == Token::BIT_OR || |
3147 op == Token::BIT_XOR); | 3147 op == Token::BIT_XOR); |
3148 } | 3148 } |
3149 | 3149 |
3150 Token::Value op() const { return op_; } | 3150 Token::Value op() const { return op_; } |
3151 | 3151 |
3152 virtual bool IsCommutative() const { return true; } | 3152 virtual bool IsCommutative() const { return true; } |
3153 | 3153 |
| 3154 virtual HValue* Canonicalize(); |
| 3155 |
3154 static HInstruction* NewHBitwise(Zone* zone, | 3156 static HInstruction* NewHBitwise(Zone* zone, |
3155 Token::Value op, | 3157 Token::Value op, |
3156 HValue* context, | 3158 HValue* context, |
3157 HValue* left, | 3159 HValue* left, |
3158 HValue* right); | 3160 HValue* right); |
3159 | 3161 |
3160 DECLARE_CONCRETE_INSTRUCTION(Bitwise) | 3162 DECLARE_CONCRETE_INSTRUCTION(Bitwise) |
3161 | 3163 |
3162 protected: | 3164 protected: |
3163 virtual bool DataEquals(HValue* other) { | 3165 virtual bool DataEquals(HValue* other) { |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4499 | 4501 |
4500 DECLARE_CONCRETE_INSTRUCTION(In) | 4502 DECLARE_CONCRETE_INSTRUCTION(In) |
4501 }; | 4503 }; |
4502 | 4504 |
4503 #undef DECLARE_INSTRUCTION | 4505 #undef DECLARE_INSTRUCTION |
4504 #undef DECLARE_CONCRETE_INSTRUCTION | 4506 #undef DECLARE_CONCRETE_INSTRUCTION |
4505 | 4507 |
4506 } } // namespace v8::internal | 4508 } } // namespace v8::internal |
4507 | 4509 |
4508 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4510 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |