Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index 4ed0187eaee4853bd6267698997c76f305176b25..e03ba3379f45db6274787f9ee92c3bfa0f987c95 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -92,6 +92,7 @@ class LChunkBuilder; |
| V(CheckInstanceType) \ |
| V(CheckMaps) \ |
| V(CheckNonSmi) \ |
| + V(CheckSmi) \ |
| V(CheckPrototypeMaps) \ |
| V(ClampToUint8) \ |
| V(ClassOfTestAndBranch) \ |
| @@ -129,6 +130,7 @@ class LChunkBuilder; |
| V(InvokeFunction) \ |
| V(IsConstructCallAndBranch) \ |
| V(IsObjectAndBranch) \ |
| + V(IsNumberAndBranch) \ |
| V(IsStringAndBranch) \ |
| V(IsSmiAndBranch) \ |
| V(IsUndetectableAndBranch) \ |
| @@ -2948,6 +2950,49 @@ class HCheckInstanceType: public HUnaryOperation { |
| }; |
| +class HCheckSmi: public HUnaryOperation { |
| + public: |
| + explicit HCheckSmi(HValue* value) : HUnaryOperation(value) { |
| + set_representation(Representation::Smi()); |
| + SetFlag(kUseGVN); |
| + } |
| + |
| + virtual Representation RequiredInputRepresentation(int index) { |
| + return Representation::Tagged(); |
| + } |
| + |
| + virtual HType CalculateInferredType(); |
| + |
| + virtual HValue* Canonicalize() { |
| + HType value_type = value()->type(); |
| + if (value_type.IsSmi()) { |
| + return NULL; |
| + } |
| + return this; |
| + } |
| + |
| + DECLARE_CONCRETE_INSTRUCTION(CheckSmi) |
| + |
| + protected: |
| + virtual bool DataEquals(HValue* other) { return true; } |
| +}; |
| + |
| + |
| +class HIsNumberAndBranch: public HUnaryControlInstruction { |
| + public: |
| + explicit HIsNumberAndBranch(HValue* value) |
| + : HUnaryControlInstruction(value, NULL, NULL) { |
| + SetFlag(kFlexibleRepresentation); |
| + } |
| + |
| + virtual Representation RequiredInputRepresentation(int index) { |
| + return Representation::None(); |
| + } |
| + |
| + DECLARE_CONCRETE_INSTRUCTION(IsNumberAndBranch) |
| +}; |
| + |
| + |
| class HCheckNonSmi: public HUnaryOperation { |
| public: |
| explicit HCheckNonSmi(HValue* value) : HUnaryOperation(value) { |
| @@ -4025,6 +4070,7 @@ class HIsObjectAndBranch: public HUnaryControlInstruction { |
| DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch) |
| }; |
| + |
|
danno
2013/06/27 13:31:06
Remove this extraneous whitespace change
oliv
2013/06/27 17:20:48
On 2013/06/27 13:31:06, danno wrote:
> Remove this
|
| class HIsStringAndBranch: public HUnaryControlInstruction { |
| public: |
| explicit HIsStringAndBranch(HValue* value) |