| 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 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3117 | 3117 | 
| 3118  private: | 3118  private: | 
| 3119   virtual bool IsDeletable() const { return true; } | 3119   virtual bool IsDeletable() const { return true; } | 
| 3120 }; | 3120 }; | 
| 3121 | 3121 | 
| 3122 | 3122 | 
| 3123 class HConstant: public HTemplateInstruction<0> { | 3123 class HConstant: public HTemplateInstruction<0> { | 
| 3124  public: | 3124  public: | 
| 3125   HConstant(Handle<Object> handle, Representation r); | 3125   HConstant(Handle<Object> handle, Representation r); | 
| 3126   HConstant(int32_t value, | 3126   HConstant(int32_t value, | 
| 3127             Representation r, | 3127             Representation r = Representation::None(), | 
| 3128             bool is_not_in_new_space = true, | 3128             bool is_not_in_new_space = true, | 
| 3129             Handle<Object> optional_handle = Handle<Object>::null()); | 3129             Handle<Object> optional_handle = Handle<Object>::null()); | 
| 3130   HConstant(double value, | 3130   HConstant(double value, | 
| 3131             Representation r, | 3131             Representation r = Representation::None(), | 
| 3132             bool is_not_in_new_space = true, | 3132             bool is_not_in_new_space = true, | 
| 3133             Handle<Object> optional_handle = Handle<Object>::null()); | 3133             Handle<Object> optional_handle = Handle<Object>::null()); | 
| 3134   HConstant(Handle<Object> handle, | 3134   HConstant(Handle<Object> handle, | 
| 3135             UniqueValueId unique_id, | 3135             UniqueValueId unique_id, | 
| 3136             Representation r, | 3136             Representation r, | 
| 3137             HType type, | 3137             HType type, | 
| 3138             bool is_internalized_string, | 3138             bool is_internalized_string, | 
| 3139             bool is_not_in_new_space, | 3139             bool is_not_in_new_space, | 
| 3140             bool boolean_value); | 3140             bool boolean_value); | 
| 3141 | 3141 | 
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3520   HValue* arguments() { return OperandAt(0); } | 3520   HValue* arguments() { return OperandAt(0); } | 
| 3521   HValue* length() { return OperandAt(1); } | 3521   HValue* length() { return OperandAt(1); } | 
| 3522   HValue* index() { return OperandAt(2); } | 3522   HValue* index() { return OperandAt(2); } | 
| 3523 | 3523 | 
| 3524   DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt) | 3524   DECLARE_CONCRETE_INSTRUCTION(AccessArgumentsAt) | 
| 3525 | 3525 | 
| 3526   virtual bool DataEquals(HValue* other) { return true; } | 3526   virtual bool DataEquals(HValue* other) { return true; } | 
| 3527 }; | 3527 }; | 
| 3528 | 3528 | 
| 3529 | 3529 | 
| 3530 enum BoundsCheckKeyMode { |  | 
| 3531   DONT_ALLOW_SMI_KEY, |  | 
| 3532   ALLOW_SMI_KEY |  | 
| 3533 }; |  | 
| 3534 |  | 
| 3535 |  | 
| 3536 class HBoundsCheckBaseIndexInformation; | 3530 class HBoundsCheckBaseIndexInformation; | 
| 3537 | 3531 | 
| 3538 | 3532 | 
| 3539 class HBoundsCheck: public HTemplateInstruction<2> { | 3533 class HBoundsCheck: public HTemplateInstruction<2> { | 
| 3540  public: | 3534  public: | 
| 3541   // Normally HBoundsCheck should be created using the | 3535   // Normally HBoundsCheck should be created using the | 
| 3542   // HGraphBuilder::AddBoundsCheck() helper. | 3536   // HGraphBuilder::AddBoundsCheck() helper. | 
| 3543   // However when building stubs, where we know that the arguments are Int32, | 3537   // However when building stubs, where we know that the arguments are Int32, | 
| 3544   // it makes sense to invoke this constructor directly. | 3538   // it makes sense to invoke this constructor directly. | 
| 3545   HBoundsCheck(HValue* index, | 3539   HBoundsCheck(HValue* index, HValue* length) | 
| 3546                HValue* length, | 3540     : skip_check_(false), | 
| 3547                BoundsCheckKeyMode key_mode = DONT_ALLOW_SMI_KEY) |  | 
| 3548     : key_mode_(key_mode), skip_check_(false), |  | 
| 3549       base_(NULL), offset_(0), scale_(0), | 3541       base_(NULL), offset_(0), scale_(0), | 
| 3550       responsibility_direction_(DIRECTION_NONE) { | 3542       responsibility_direction_(DIRECTION_NONE) { | 
| 3551     SetOperandAt(0, index); | 3543     SetOperandAt(0, index); | 
| 3552     SetOperandAt(1, length); | 3544     SetOperandAt(1, length); | 
| 3553     SetFlag(kFlexibleRepresentation); | 3545     SetFlag(kFlexibleRepresentation); | 
| 3554     SetFlag(kUseGVN); | 3546     SetFlag(kUseGVN); | 
| 3555   } | 3547   } | 
| 3556 | 3548 | 
| 3557   bool skip_check() { return skip_check_; } | 3549   bool skip_check() { return skip_check_; } | 
| 3558   void set_skip_check(bool skip_check) { skip_check_ = skip_check; } | 3550   void set_skip_check(bool skip_check) { skip_check_ = skip_check; } | 
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3611  protected: | 3603  protected: | 
| 3612   friend class HBoundsCheckBaseIndexInformation; | 3604   friend class HBoundsCheckBaseIndexInformation; | 
| 3613 | 3605 | 
| 3614   virtual void SetResponsibilityForRange(RangeGuaranteeDirection direction) { | 3606   virtual void SetResponsibilityForRange(RangeGuaranteeDirection direction) { | 
| 3615     responsibility_direction_ = static_cast<RangeGuaranteeDirection>( | 3607     responsibility_direction_ = static_cast<RangeGuaranteeDirection>( | 
| 3616         responsibility_direction_ | direction); | 3608         responsibility_direction_ | direction); | 
| 3617   } | 3609   } | 
| 3618 | 3610 | 
| 3619   virtual bool DataEquals(HValue* other) { return true; } | 3611   virtual bool DataEquals(HValue* other) { return true; } | 
| 3620   virtual void TryGuaranteeRangeChanging(RangeEvaluationContext* context); | 3612   virtual void TryGuaranteeRangeChanging(RangeEvaluationContext* context); | 
| 3621   BoundsCheckKeyMode key_mode_; |  | 
| 3622   bool skip_check_; | 3613   bool skip_check_; | 
| 3623   HValue* base_; | 3614   HValue* base_; | 
| 3624   int offset_; | 3615   int offset_; | 
| 3625   int scale_; | 3616   int scale_; | 
| 3626   RangeGuaranteeDirection responsibility_direction_; | 3617   RangeGuaranteeDirection responsibility_direction_; | 
| 3627 }; | 3618 }; | 
| 3628 | 3619 | 
| 3629 | 3620 | 
| 3630 class HBoundsCheckBaseIndexInformation: public HTemplateInstruction<2> { | 3621 class HBoundsCheckBaseIndexInformation: public HTemplateInstruction<2> { | 
| 3631  public: | 3622  public: | 
| (...skipping 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6499   virtual bool IsDeletable() const { return true; } | 6490   virtual bool IsDeletable() const { return true; } | 
| 6500 }; | 6491 }; | 
| 6501 | 6492 | 
| 6502 | 6493 | 
| 6503 #undef DECLARE_INSTRUCTION | 6494 #undef DECLARE_INSTRUCTION | 
| 6504 #undef DECLARE_CONCRETE_INSTRUCTION | 6495 #undef DECLARE_CONCRETE_INSTRUCTION | 
| 6505 | 6496 | 
| 6506 } }  // namespace v8::internal | 6497 } }  // namespace v8::internal | 
| 6507 | 6498 | 
| 6508 #endif  // V8_HYDROGEN_INSTRUCTIONS_H_ | 6499 #endif  // V8_HYDROGEN_INSTRUCTIONS_H_ | 
| OLD | NEW | 
|---|