Fix ugly typo in HValue::UpdateRepresentation.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 24 Jun 2013 14:34:07 +0000 (14:34 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 24 Jun 2013 14:34:07 +0000 (14:34 +0000)
R=jkummerow@chromium.org
TEST=mjsunit/math-min-max --extra-flags="--gc-interval=500"

Review URL: https://codereview.chromium.org/17580019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen-instructions.cc
src/hydrogen-instructions.h
src/hydrogen.cc
src/hydrogen.h

index ebb0ad5..1431727 100644 (file)
@@ -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 32eda11..6de90de 100644 (file)
@@ -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 0cfb9ed..8d3a0ac 100644 (file)
@@ -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 3a0ded5..8f273f4 100644 (file)
@@ -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