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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 | 994 |
995 void UpdateRedefinedUsesWhileSettingUpInformativeDefinitions() { | 995 void UpdateRedefinedUsesWhileSettingUpInformativeDefinitions() { |
996 UpdateRedefinedUsesInner<TestDominanceUsingProcessedFlag>(); | 996 UpdateRedefinedUsesInner<TestDominanceUsingProcessedFlag>(); |
997 } | 997 } |
998 void UpdateRedefinedUses() { | 998 void UpdateRedefinedUses() { |
999 UpdateRedefinedUsesInner<Dominates>(); | 999 UpdateRedefinedUsesInner<Dominates>(); |
1000 } | 1000 } |
1001 | 1001 |
1002 bool IsInteger32Constant(); | 1002 bool IsInteger32Constant(); |
1003 int32_t GetInteger32Constant(); | 1003 int32_t GetInteger32Constant(); |
| 1004 bool EqualsInteger32Constant(int32_t value); |
1004 | 1005 |
1005 bool IsDefinedAfter(HBasicBlock* other) const; | 1006 bool IsDefinedAfter(HBasicBlock* other) const; |
1006 | 1007 |
1007 // Operands. | 1008 // Operands. |
1008 virtual int OperandCount() = 0; | 1009 virtual int OperandCount() = 0; |
1009 virtual HValue* OperandAt(int index) const = 0; | 1010 virtual HValue* OperandAt(int index) const = 0; |
1010 void SetOperandAt(int index, HValue* value); | 1011 void SetOperandAt(int index, HValue* value); |
1011 | 1012 |
1012 void DeleteAndReplaceWith(HValue* other); | 1013 void DeleteAndReplaceWith(HValue* other); |
1013 void ReplaceAllUsesWith(HValue* other); | 1014 void ReplaceAllUsesWith(HValue* other); |
(...skipping 2307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3321 Handle<String> StringValue() const { | 3322 Handle<String> StringValue() const { |
3322 ASSERT(HasStringValue()); | 3323 ASSERT(HasStringValue()); |
3323 return Handle<String>::cast(handle_); | 3324 return Handle<String>::cast(handle_); |
3324 } | 3325 } |
3325 bool HasInternalizedStringValue() const { | 3326 bool HasInternalizedStringValue() const { |
3326 return HasStringValue() && is_internalized_string_; | 3327 return HasStringValue() && is_internalized_string_; |
3327 } | 3328 } |
3328 | 3329 |
3329 bool BooleanValue() const { return boolean_value_; } | 3330 bool BooleanValue() const { return boolean_value_; } |
3330 | 3331 |
3331 bool IsUint32() { | |
3332 return HasInteger32Value() && (Integer32Value() >= 0); | |
3333 } | |
3334 | |
3335 virtual intptr_t Hashcode() { | 3332 virtual intptr_t Hashcode() { |
3336 if (has_int32_value_) { | 3333 if (has_int32_value_) { |
3337 return static_cast<intptr_t>(int32_value_); | 3334 return static_cast<intptr_t>(int32_value_); |
3338 } else if (has_double_value_) { | 3335 } else if (has_double_value_) { |
3339 return static_cast<intptr_t>(BitCast<int64_t>(double_value_)); | 3336 return static_cast<intptr_t>(BitCast<int64_t>(double_value_)); |
3340 } else { | 3337 } else { |
3341 ASSERT(!handle_.is_null()); | 3338 ASSERT(!handle_.is_null()); |
3342 return unique_id_.Hashcode(); | 3339 return unique_id_.Hashcode(); |
3343 } | 3340 } |
3344 } | 3341 } |
(...skipping 3145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6490 virtual bool IsDeletable() const { return true; } | 6487 virtual bool IsDeletable() const { return true; } |
6491 }; | 6488 }; |
6492 | 6489 |
6493 | 6490 |
6494 #undef DECLARE_INSTRUCTION | 6491 #undef DECLARE_INSTRUCTION |
6495 #undef DECLARE_CONCRETE_INSTRUCTION | 6492 #undef DECLARE_CONCRETE_INSTRUCTION |
6496 | 6493 |
6497 } } // namespace v8::internal | 6494 } } // namespace v8::internal |
6498 | 6495 |
6499 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6496 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |