Prevent representation inference from double-visiting.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 5 Sep 2013 09:01:28 +0000 (09:01 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 5 Sep 2013 09:01:28 +0000 (09:01 +0000)
This prevents representation inference from pushing the current value
into the worklist while it is still being worked on. This might lead
to having a value in the worklist that isn't flexible anymore.

R=verwaest@chromium.org
TEST=mjsunit/compiler/escape-analysis (+GC-Stress)

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

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

src/hydrogen-infer-representation.cc

index 1b3ab6f..f61649a 100644 (file)
@@ -152,8 +152,8 @@ void HInferRepresentationPhase::Run() {
   // Do a fixed point iteration, trying to improve representations
   while (!worklist_.is_empty()) {
     HValue* current = worklist_.RemoveLast();
-    in_worklist_.Remove(current->id());
     current->InferRepresentation(this);
+    in_worklist_.Remove(current->id());
   }
 
   // Lastly: any instruction that we don't have representation information