Reviewers: Jakob,

Description:
Fix ugly typo in HValue::UpdateRepresentation.

[email protected]
TEST=mjsunit/math-min-max --extra-flags="--gc-interval=500"

Please review this at https://codereview.chromium.org/17580019/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/hydrogen-instructions.h
  M src/hydrogen-instructions.cc
  M src/hydrogen.h
  M src/hydrogen.cc


Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index ebb0ad55e0d71be882f00ca934cd4a11fab7b267..1431727f819eafea49791da6ecea8789398024e8 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -128,7 +128,7 @@ void HValue::UpdateRepresentation(Representation new_rep,
                                   const char* reason) {
   Representation r = representation();
   if (new_rep.is_more_general_than(r)) {
-    if (CheckFlag(kCannotBeTagged) && r.IsTagged()) return;
+    if (CheckFlag(kCannotBeTagged) && new_rep.IsTagged()) return;
     if (FLAG_trace_representation) {
       PrintF("Changing #%d %s representation %s -> %s based on %s\n",
              id(), Mnemonic(), r.Mnemonic(), new_rep.Mnemonic(), reason);
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 32eda119ca89cef688a0b80e9f24cd573cf109bb..6de90deb5b3309ff9069abff3f85af5951deaf8f 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -890,10 +890,10 @@ class HValue: public ZoneObject {
   Representation representation() const { return representation_; }
   void ChangeRepresentation(Representation r) {
     ASSERT(CheckFlag(kFlexibleRepresentation));
+    ASSERT(!CheckFlag(kCannotBeTagged) || !r.IsTagged());
     RepresentationChanged(r);
     representation_ = r;
-    if (r.IsTagged() ||
-        (r.IsDouble() && CheckFlag(kCannotBeTagged))) {
+    if (r.IsTagged()) {
       // Tagged is the bottom of the lattice, don't go any further.
       ClearFlag(kFlexibleRepresentation);
     }
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 486075cec8e91a16a3ea4d28f7d92ebb330d4ee8..445be39834588f01bafe9bd1a6c0c29005930665 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4651,12 +4651,6 @@ void HGraph::RestoreActualValues() {
 }


-void HOptimizedGraphBuilder::AddPhi(HPhi* instr) {
-  ASSERT(current_block() != NULL);
-  current_block()->AddPhi(instr);
-}
-
-
 void HOptimizedGraphBuilder::PushAndAdd(HInstruction* instr) {
   Push(instr);
   AddInstruction(instr);
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 6a49e5708de953eb5cb74e88906afe9526c18b79..a57feb08bf3613977d4e12c171925770d0f8a610 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1624,8 +1624,6 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor { // Visit a list of expressions from left to right, each in a value context.
   void VisitExpressions(ZoneList<Expression*>* exprs);

-  void AddPhi(HPhi* phi);
-
   void PushAndAdd(HInstruction* instr);

// Remove the arguments from the bailout environment and emit instructions


--
--
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.


Reply via email to