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 5550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5561 DECLARE_INSTRUCTION_FACTORY_P3(HLoadNamedField, HValue*, HObjectAccess, | 5561 DECLARE_INSTRUCTION_FACTORY_P3(HLoadNamedField, HValue*, HObjectAccess, |
5562 HValue*); | 5562 HValue*); |
5563 | 5563 |
5564 HValue* object() { return OperandAt(0); } | 5564 HValue* object() { return OperandAt(0); } |
5565 HValue* typecheck() { | 5565 HValue* typecheck() { |
5566 ASSERT(HasTypeCheck()); | 5566 ASSERT(HasTypeCheck()); |
5567 return OperandAt(1); | 5567 return OperandAt(1); |
5568 } | 5568 } |
5569 | 5569 |
5570 bool HasTypeCheck() const { return OperandAt(0) != OperandAt(1); } | 5570 bool HasTypeCheck() const { return OperandAt(0) != OperandAt(1); } |
5571 void clear_typecheck() { SetOperandAt(1, object()); } | |
Michael Starzinger
2013/08/12 09:22:09
nit: Can we name this "ClearTypeCheck" instead?
| |
5571 HObjectAccess access() const { return access_; } | 5572 HObjectAccess access() const { return access_; } |
5572 Representation field_representation() const { | 5573 Representation field_representation() const { |
5573 return access_.representation(); | 5574 return access_.representation(); |
5574 } | 5575 } |
5575 | 5576 |
5576 virtual bool HasEscapingOperandAt(int index) { return false; } | 5577 virtual bool HasEscapingOperandAt(int index) { return false; } |
5577 virtual Representation RequiredInputRepresentation(int index) { | 5578 virtual Representation RequiredInputRepresentation(int index) { |
5578 if (index == 0 && access().IsExternalMemory()) { | 5579 if (index == 0 && access().IsExternalMemory()) { |
5579 // object must be external in case of external memory access | 5580 // object must be external in case of external memory access |
5580 return Representation::External(); | 5581 return Representation::External(); |
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6765 virtual bool IsDeletable() const { return true; } | 6766 virtual bool IsDeletable() const { return true; } |
6766 }; | 6767 }; |
6767 | 6768 |
6768 | 6769 |
6769 #undef DECLARE_INSTRUCTION | 6770 #undef DECLARE_INSTRUCTION |
6770 #undef DECLARE_CONCRETE_INSTRUCTION | 6771 #undef DECLARE_CONCRETE_INSTRUCTION |
6771 | 6772 |
6772 } } // namespace v8::internal | 6773 } } // namespace v8::internal |
6773 | 6774 |
6774 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6775 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |