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.

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
This commit is contained in:
mstarzinger@chromium.org 2013-09-05 09:01:28 +00:00
parent 88910423c2
commit f670b2af85

View File

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