Reviewers: Jakob,
Message:
PTAL
Description:
Temporarily patch HCompareIDAndBranch to accept Smi.
Please review this at https://chromiumcodereview.appspot.com/16957005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/hydrogen.cc
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
b3ffac7e01eaae70cdb30867ce382e90301bf9f9..3a37097d9874e5e1e9afcd36bff0f1a9620d2922
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -9693,6 +9693,7 @@ void
HOptimizedGraphBuilder::VisitArithmeticExpression(BinaryOperation* expr) {
Representation HOptimizedGraphBuilder::ToRepresentation(TypeInfo info) {
if (info.IsUninitialized()) return Representation::None();
+ // TODO(verwaest): Return Smi rather than Integer32.
if (info.IsSmi()) return Representation::Integer32();
if (info.IsInteger32()) return Representation::Integer32();
if (info.IsDouble()) return Representation::Double();
@@ -9918,6 +9919,10 @@ void
HOptimizedGraphBuilder::VisitCompareOperation(CompareOperation* expr) {
result->set_position(expr->position());
return ast_context()->ReturnInstruction(result, expr->id());
} else {
+ // TODO(verwaest): Remove once ToRepresentation properly returns Smi
when
+ // the IC measures Smi.
+ if (left_rep.IsInteger32()) left_rep = Representation::Smi();
+ if (right_rep.IsInteger32()) right_rep = Representation::Smi();
HCompareIDAndBranch* result =
new(zone()) HCompareIDAndBranch(left, right, op);
result->set_observed_input_representation(left_rep, right_rep);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.