Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index feac1be0bcfcdf45f6c435f7899acd645d24e4e8..4d3f5e1009b06051c3c8111436b0c3c5dc73b50f 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -379,7 +379,12 @@ intptr_t HValue::Hashcode() { |
intptr_t result = opcode(); |
int count = OperandCount(); |
for (int i = 0; i < count; ++i) { |
- result = result * 19 + OperandAt(i)->id() + (result >> 7); |
+ HValue* operand = OperandAt(i); |
Jakob Kummerow
2012/11/19 12:36:00
as discussed, just pass in any existing HValue as
danno
2012/11/26 17:16:18
Done.
|
+ if (operand != NULL) { |
+ result = result * 19 + OperandAt(i)->id() + (result >> 7); |
+ } else { |
+ result = result * 19 + (result >> 7); |
+ } |
} |
return result; |
} |
@@ -937,8 +942,10 @@ void HChange::PrintDataTo(StringStream* stream) { |
void HJSArrayLength::PrintDataTo(StringStream* stream) { |
value()->PrintNameTo(stream); |
- stream->Add(" "); |
- typecheck()->PrintNameTo(stream); |
+ if (typecheck() != NULL) { |
+ stream->Add(" "); |
+ typecheck()->PrintNameTo(stream); |
+ } |
} |
@@ -1051,7 +1058,9 @@ void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) { |
void HLoadElements::PrintDataTo(StringStream* stream) { |
value()->PrintNameTo(stream); |
stream->Add(" "); |
- typecheck()->PrintNameTo(stream); |
+ if (typecheck() != NULL) { |
+ typecheck()->PrintNameTo(stream); |
+ } |
} |
@@ -1853,7 +1862,9 @@ void HLoadKeyed::PrintDataTo(StringStream* stream) { |
stream->Add("["); |
key()->PrintNameTo(stream); |
stream->Add("] "); |
- dependency()->PrintNameTo(stream); |
+ if (dependency() != NULL) { |
+ dependency()->PrintNameTo(stream); |
+ } |
if (RequiresHoleCheck()) { |
stream->Add(" check_hole"); |
} |