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

Unified Diff: src/hydrogen-instructions.cc

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: First pass at pre-VFP2 RA Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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");
}

Powered by Google App Engine
This is Rietveld 408576698