Temporarily patch HCompareIDAndBranch to accept Smi.
R=jkummerow@chromium.org Review URL: https://chromiumcodereview.appspot.com/16957005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15122 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
681b10b3c0
commit
4ac1aa533d
@ -9687,6 +9687,7 @@ void HOptimizedGraphBuilder::VisitArithmeticExpression(BinaryOperation* expr) {
|
|||||||
// TODO(rossberg): this should die eventually.
|
// TODO(rossberg): this should die eventually.
|
||||||
Representation HOptimizedGraphBuilder::ToRepresentation(TypeInfo info) {
|
Representation HOptimizedGraphBuilder::ToRepresentation(TypeInfo info) {
|
||||||
if (info.IsUninitialized()) return Representation::None();
|
if (info.IsUninitialized()) return Representation::None();
|
||||||
|
// TODO(verwaest): Return Smi rather than Integer32.
|
||||||
if (info.IsSmi()) return Representation::Integer32();
|
if (info.IsSmi()) return Representation::Integer32();
|
||||||
if (info.IsInteger32()) return Representation::Integer32();
|
if (info.IsInteger32()) return Representation::Integer32();
|
||||||
if (info.IsDouble()) return Representation::Double();
|
if (info.IsDouble()) return Representation::Double();
|
||||||
@ -9920,6 +9921,10 @@ void HOptimizedGraphBuilder::VisitCompareOperation(CompareOperation* expr) {
|
|||||||
result->set_position(expr->position());
|
result->set_position(expr->position());
|
||||||
return ast_context()->ReturnInstruction(result, expr->id());
|
return ast_context()->ReturnInstruction(result, expr->id());
|
||||||
} else {
|
} else {
|
||||||
|
// TODO(verwaest): Remove once ToRepresentation properly returns Smi when
|
||||||
|
// the IC measures Smi.
|
||||||
|
if (left_type->Is(Type::Integer31())) left_rep = Representation::Smi();
|
||||||
|
if (right_type->Is(Type::Integer31())) right_rep = Representation::Smi();
|
||||||
HCompareIDAndBranch* result =
|
HCompareIDAndBranch* result =
|
||||||
new(zone()) HCompareIDAndBranch(left, right, op);
|
new(zone()) HCompareIDAndBranch(left, right, op);
|
||||||
result->set_observed_input_representation(left_rep, right_rep);
|
result->set_observed_input_representation(left_rep, right_rep);
|
||||||
|
Loading…
Reference in New Issue
Block a user