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

Unified Diff: src/hydrogen.cc

Issue 7206040: Remove redundant hydrogen- and lithium instruction for symbol comparison. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
===================================================================
--- src/hydrogen.cc (revision 8347)
+++ src/hydrogen.cc (working copy)
@@ -5237,15 +5237,13 @@
}
-HCompareSymbolEq* HGraphBuilder::BuildSymbolCompare(HValue* left,
- HValue* right,
- Token::Value op) {
- ASSERT(op == Token::EQ || op == Token::EQ_STRICT);
+HCompareObjectEq* HGraphBuilder::BuildSymbolCompare(HValue* left,
+ HValue* right) {
AddInstruction(new(zone()) HCheckNonSmi(left));
AddInstruction(HCheckInstanceType::NewIsSymbol(left));
AddInstruction(new(zone()) HCheckNonSmi(right));
AddInstruction(HCheckInstanceType::NewIsSymbol(right));
- return new(zone()) HCompareSymbolEq(left, right, op);
+ return new(zone()) HCompareObjectEq(left, right);
}
@@ -5594,7 +5592,7 @@
AddInstruction(HCheckInstanceType::NewIsSpecObject(left));
AddInstruction(new(zone()) HCheckNonSmi(right));
AddInstruction(HCheckInstanceType::NewIsSpecObject(right));
- instr = new(zone()) HCompareJSObjectEq(left, right);
+ instr = new(zone()) HCompareObjectEq(left, right);
break;
}
default:
@@ -5603,7 +5601,7 @@
}
} else if (type_info.IsString() && oracle()->IsSymbolCompare(expr) &&
(op == Token::EQ || op == Token::EQ_STRICT)) {
- instr = BuildSymbolCompare(left, right, op);
William Hesse 2011/06/21 10:41:19 Why is this factored out into a separate function,
+ instr = BuildSymbolCompare(left, right);
} else {
HCompare* compare = new(zone()) HCompare(left, right, op);
Representation r = ToRepresentation(type_info);
@@ -5849,7 +5847,7 @@
CHECK_ALIVE(VisitForValue(call->arguments()->at(1)));
HValue* right = Pop();
HValue* left = Pop();
- HCompareJSObjectEq* result = new(zone()) HCompareJSObjectEq(left, right);
+ HCompareObjectEq* result = new(zone()) HCompareObjectEq(left, right);
ast_context()->ReturnInstruction(result, call->id());
}
« no previous file with comments | « src/hydrogen.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698