| 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 4453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4464 | 4464 |
| 4465 Handle<String> class_name_; | 4465 Handle<String> class_name_; |
| 4466 }; | 4466 }; |
| 4467 | 4467 |
| 4468 | 4468 |
| 4469 class HTypeofIsAndBranch V8_FINAL : public HUnaryControlInstruction { | 4469 class HTypeofIsAndBranch V8_FINAL : public HUnaryControlInstruction { |
| 4470 public: | 4470 public: |
| 4471 DECLARE_INSTRUCTION_FACTORY_P2(HTypeofIsAndBranch, HValue*, Handle<String>); | 4471 DECLARE_INSTRUCTION_FACTORY_P2(HTypeofIsAndBranch, HValue*, Handle<String>); |
| 4472 | 4472 |
| 4473 Handle<String> type_literal() { return type_literal_; } | 4473 Handle<String> type_literal() { return type_literal_; } |
| 4474 bool compares_number_type() { return compares_number_type_; } |
| 4474 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 4475 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
| 4475 | 4476 |
| 4476 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch) | 4477 DECLARE_CONCRETE_INSTRUCTION(TypeofIsAndBranch) |
| 4477 | 4478 |
| 4478 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 4479 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
| 4479 return Representation::Tagged(); | 4480 return Representation::None(); |
| 4480 } | 4481 } |
| 4481 | 4482 |
| 4483 virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; |
| 4484 |
| 4482 private: | 4485 private: |
| 4483 HTypeofIsAndBranch(HValue* value, Handle<String> type_literal) | 4486 HTypeofIsAndBranch(HValue* value, Handle<String> type_literal) |
| 4484 : HUnaryControlInstruction(value, NULL, NULL), | 4487 : HUnaryControlInstruction(value, NULL, NULL), |
| 4485 type_literal_(type_literal) { } | 4488 type_literal_(type_literal) { |
| 4489 Heap* heap = type_literal->GetHeap(); |
| 4490 compares_number_type_ = type_literal->Equals(heap->number_string()); |
| 4491 } |
| 4486 | 4492 |
| 4487 Handle<String> type_literal_; | 4493 Handle<String> type_literal_; |
| 4494 bool compares_number_type_ : 1; |
| 4488 }; | 4495 }; |
| 4489 | 4496 |
| 4490 | 4497 |
| 4491 class HInstanceOf V8_FINAL : public HBinaryOperation { | 4498 class HInstanceOf V8_FINAL : public HBinaryOperation { |
| 4492 public: | 4499 public: |
| 4493 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInstanceOf, HValue*, HValue*); | 4500 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HInstanceOf, HValue*, HValue*); |
| 4494 | 4501 |
| 4495 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 4502 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
| 4496 return Representation::Tagged(); | 4503 return Representation::Tagged(); |
| 4497 } | 4504 } |
| (...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7300 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7307 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
| 7301 }; | 7308 }; |
| 7302 | 7309 |
| 7303 | 7310 |
| 7304 #undef DECLARE_INSTRUCTION | 7311 #undef DECLARE_INSTRUCTION |
| 7305 #undef DECLARE_CONCRETE_INSTRUCTION | 7312 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7306 | 7313 |
| 7307 } } // namespace v8::internal | 7314 } } // namespace v8::internal |
| 7308 | 7315 |
| 7309 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7316 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |