| 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 4270 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4281 | 4281 | 
| 4282 | 4282 | 
| 4283 class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> { | 4283 class HCompareObjectEqAndBranch : public HTemplateControlInstruction<2, 2> { | 
| 4284  public: | 4284  public: | 
| 4285   DECLARE_INSTRUCTION_FACTORY_P2(HCompareObjectEqAndBranch, HValue*, HValue*); | 4285   DECLARE_INSTRUCTION_FACTORY_P2(HCompareObjectEqAndBranch, HValue*, HValue*); | 
| 4286   DECLARE_INSTRUCTION_FACTORY_P4(HCompareObjectEqAndBranch, HValue*, HValue*, | 4286   DECLARE_INSTRUCTION_FACTORY_P4(HCompareObjectEqAndBranch, HValue*, HValue*, | 
| 4287                                  HBasicBlock*, HBasicBlock*); | 4287                                  HBasicBlock*, HBasicBlock*); | 
| 4288 | 4288 | 
| 4289   virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; | 4289   virtual bool KnownSuccessorBlock(HBasicBlock** block) V8_OVERRIDE; | 
| 4290 | 4290 | 
|  | 4291   static const int kNoKnownSuccessorIndex = -1; | 
|  | 4292   int known_successor_index() const { return known_successor_index_; } | 
|  | 4293   void set_known_successor_index(int known_successor_index) { | 
|  | 4294     known_successor_index_ = known_successor_index; | 
|  | 4295   } | 
|  | 4296 | 
| 4291   HValue* left() { return OperandAt(0); } | 4297   HValue* left() { return OperandAt(0); } | 
| 4292   HValue* right() { return OperandAt(1); } | 4298   HValue* right() { return OperandAt(1); } | 
| 4293 | 4299 | 
| 4294   virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 4300   virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 
| 4295 | 4301 | 
| 4296   virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 4302   virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 
| 4297     return Representation::Tagged(); | 4303     return Representation::Tagged(); | 
| 4298   } | 4304   } | 
| 4299 | 4305 | 
| 4300   virtual Representation observed_input_representation(int index) V8_OVERRIDE { | 4306   virtual Representation observed_input_representation(int index) V8_OVERRIDE { | 
| 4301     return Representation::Tagged(); | 4307     return Representation::Tagged(); | 
| 4302   } | 4308   } | 
| 4303 | 4309 | 
| 4304   DECLARE_CONCRETE_INSTRUCTION(CompareObjectEqAndBranch) | 4310   DECLARE_CONCRETE_INSTRUCTION(CompareObjectEqAndBranch) | 
| 4305 | 4311 | 
| 4306  private: | 4312  private: | 
| 4307   HCompareObjectEqAndBranch(HValue* left, | 4313   HCompareObjectEqAndBranch(HValue* left, | 
| 4308                             HValue* right, | 4314                             HValue* right, | 
| 4309                             HBasicBlock* true_target = NULL, | 4315                             HBasicBlock* true_target = NULL, | 
| 4310                             HBasicBlock* false_target = NULL) { | 4316                             HBasicBlock* false_target = NULL) | 
|  | 4317       : known_successor_index_(kNoKnownSuccessorIndex) { | 
| 4311     ASSERT(!left->IsConstant() || | 4318     ASSERT(!left->IsConstant() || | 
| 4312            (!HConstant::cast(left)->HasInteger32Value() || | 4319            (!HConstant::cast(left)->HasInteger32Value() || | 
| 4313             HConstant::cast(left)->HasSmiValue())); | 4320             HConstant::cast(left)->HasSmiValue())); | 
| 4314     ASSERT(!right->IsConstant() || | 4321     ASSERT(!right->IsConstant() || | 
| 4315            (!HConstant::cast(right)->HasInteger32Value() || | 4322            (!HConstant::cast(right)->HasInteger32Value() || | 
| 4316             HConstant::cast(right)->HasSmiValue())); | 4323             HConstant::cast(right)->HasSmiValue())); | 
| 4317     SetOperandAt(0, left); | 4324     SetOperandAt(0, left); | 
| 4318     SetOperandAt(1, right); | 4325     SetOperandAt(1, right); | 
| 4319     SetSuccessorAt(0, true_target); | 4326     SetSuccessorAt(0, true_target); | 
| 4320     SetSuccessorAt(1, false_target); | 4327     SetSuccessorAt(1, false_target); | 
| 4321   } | 4328   } | 
|  | 4329 | 
|  | 4330   int known_successor_index_; | 
| 4322 }; | 4331 }; | 
| 4323 | 4332 | 
| 4324 | 4333 | 
| 4325 class HIsObjectAndBranch V8_FINAL : public HUnaryControlInstruction { | 4334 class HIsObjectAndBranch V8_FINAL : public HUnaryControlInstruction { | 
| 4326  public: | 4335  public: | 
| 4327   DECLARE_INSTRUCTION_FACTORY_P1(HIsObjectAndBranch, HValue*); | 4336   DECLARE_INSTRUCTION_FACTORY_P1(HIsObjectAndBranch, HValue*); | 
| 4328   DECLARE_INSTRUCTION_FACTORY_P3(HIsObjectAndBranch, HValue*, | 4337   DECLARE_INSTRUCTION_FACTORY_P3(HIsObjectAndBranch, HValue*, | 
| 4329                                  HBasicBlock*, HBasicBlock*); | 4338                                  HBasicBlock*, HBasicBlock*); | 
| 4330 | 4339 | 
| 4331   virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 4340   virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 
| (...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 7505   virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7514   virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 
| 7506 }; | 7515 }; | 
| 7507 | 7516 | 
| 7508 | 7517 | 
| 7509 #undef DECLARE_INSTRUCTION | 7518 #undef DECLARE_INSTRUCTION | 
| 7510 #undef DECLARE_CONCRETE_INSTRUCTION | 7519 #undef DECLARE_CONCRETE_INSTRUCTION | 
| 7511 | 7520 | 
| 7512 } }  // namespace v8::internal | 7521 } }  // namespace v8::internal | 
| 7513 | 7522 | 
| 7514 #endif  // V8_HYDROGEN_INSTRUCTIONS_H_ | 7523 #endif  // V8_HYDROGEN_INSTRUCTIONS_H_ | 
| OLD | NEW | 
|---|