Chromium Code Reviews| Index: src/hydrogen-instructions.h |
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
| index 80773bf14789e8524dc4c46184588641d6396495..85bb51eb6bb7975a33c0c4e8c1e63c1088051b13 100644 |
| --- a/src/hydrogen-instructions.h |
| +++ b/src/hydrogen-instructions.h |
| @@ -4436,23 +4436,35 @@ class HClassOfTestAndBranch V8_FINAL : public HUnaryControlInstruction { |
| class HTypeofIsAndBranch V8_FINAL : public HUnaryControlInstruction { |
| public: |
| - DECLARE_INSTRUCTION_FACTORY_P2(HTypeofIsAndBranch, HValue*, Handle<String>); |
| + static HTypeofIsAndBranch* New(Zone* zone, HValue* context, |
|
Jakob Kummerow
2013/11/08 12:07:05
Please leave the DECLARE_INSTRUCTION_FACTORY_P2 ma
Weiliang
2013/11/08 13:50:26
Done.
|
| + HValue* value, Handle<String> type_literal) { |
| + Heap* heap = zone->isolate()->heap(); |
| + bool is_number = false; |
|
Jakob Kummerow
2013/11/08 12:07:05
bool is_number = type_literal->Equals(heap->number
Weiliang
2013/11/08 13:50:26
Done.
|
| + if (type_literal->Equals(heap->number_string())) { |
| + is_number = true; |
| + } |
| + return new(zone) HTypeofIsAndBranch(value, type_literal, is_number); |
| + } |
| Handle<String> type_literal() { return type_literal_; } |
| + bool CheckNumberString() { return is_number_; } |
|
Jakob Kummerow
2013/11/08 12:07:05
I'd call the field compares_number_type_ and the a
Weiliang
2013/11/08 13:50:26
Done.
|
| virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch) |
| virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
| - return Representation::Tagged(); |
| + return Representation::None(); |
| } |
| + virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; |
| + |
| private: |
| - HTypeofIsAndBranch(HValue* value, Handle<String> type_literal) |
| + HTypeofIsAndBranch(HValue* value, Handle<String> type_literal, bool is_number) |
| : HUnaryControlInstruction(value, NULL, NULL), |
| - type_literal_(type_literal) { } |
| + type_literal_(type_literal), is_number_(is_number) { } |
| Handle<String> type_literal_; |
| + bool is_number_ : 1; |
| }; |