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()); |
} |