Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 6880014: Reduce the number of virtual functions in hydrogen-instruction.h classes (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698