A tiny code review. Reviewers: Toon Verwaest,

Description:
Prevent representation inference from double-visiting.

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.

[email protected]
TEST=mjsunit/compiler/escape-analysis (+GC-Stress)

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

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

Affected files +1, -1:
  M src/hydrogen-infer-representation.cc


Index: src/hydrogen-infer-representation.cc
diff --git a/src/hydrogen-infer-representation.cc b/src/hydrogen-infer-representation.cc index 1b3ab6ffbb2d814b31c65fded335c0ba7c429892..f61649a68f43880bdbc697778780dafec9f4571c 100644
--- a/src/hydrogen-infer-representation.cc
+++ b/src/hydrogen-infer-representation.cc
@@ -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


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