| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 intptr_t HValue::Hashcode() { | 310 intptr_t HValue::Hashcode() { |
| 311 intptr_t result = opcode(); | 311 intptr_t result = opcode(); |
| 312 int count = OperandCount(); | 312 int count = OperandCount(); |
| 313 for (int i = 0; i < count; ++i) { | 313 for (int i = 0; i < count; ++i) { |
| 314 result = result * 19 + OperandAt(i)->id() + (result >> 7); | 314 result = result * 19 + OperandAt(i)->id() + (result >> 7); |
| 315 } | 315 } |
| 316 return result; | 316 return result; |
| 317 } | 317 } |
| 318 | 318 |
| 319 | 319 |
| 320 const char* HValue::Mnemonic() const { |
| 321 switch (opcode()) { |
| 322 #define MAKE_CASE(type) case k##type: return #type; |
| 323 HYDROGEN_CONCRETE_INSTRUCTION_LIST(MAKE_CASE) |
| 324 #undef MAKE_CASE |
| 325 case kPhi: return "Phi"; |
| 326 default: return ""; |
| 327 } |
| 328 } |
| 329 |
| 330 |
| 320 void HValue::SetOperandAt(int index, HValue* value) { | 331 void HValue::SetOperandAt(int index, HValue* value) { |
| 321 ASSERT(value == NULL || !value->representation().IsNone()); | 332 ASSERT(value == NULL || !value->representation().IsNone()); |
| 322 RegisterUse(index, value); | 333 RegisterUse(index, value); |
| 323 InternalSetOperandAt(index, value); | 334 InternalSetOperandAt(index, value); |
| 324 } | 335 } |
| 325 | 336 |
| 326 | 337 |
| 327 void HValue::ReplaceAndDelete(HValue* other) { | 338 void HValue::ReplaceAndDelete(HValue* other) { |
| 328 if (other != NULL) ReplaceValue(other); | 339 if (other != NULL) ReplaceValue(other); |
| 329 Delete(); | 340 Delete(); |
| (...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 | 1657 |
| 1647 | 1658 |
| 1648 void HCheckPrototypeMaps::Verify() { | 1659 void HCheckPrototypeMaps::Verify() { |
| 1649 HInstruction::Verify(); | 1660 HInstruction::Verify(); |
| 1650 ASSERT(HasNoUses()); | 1661 ASSERT(HasNoUses()); |
| 1651 } | 1662 } |
| 1652 | 1663 |
| 1653 #endif | 1664 #endif |
| 1654 | 1665 |
| 1655 } } // namespace v8::internal | 1666 } } // namespace v8::internal |
| OLD | NEW |