4dab7b5a1d
The implicit assignment to the induction variable in a ForInStatement has been ignored by the AST loop assignment analysis. This was hidden for cases where the parser introduced a ".for" temporary, but triggers when the variable is declared outside the loop. R=bmeurer@chromium.org TEST=mjsunit/regress/regress-crbug-647887 BUG=chromium:647887 Review-Url: https://codereview.chromium.org/2356733002 Cr-Commit-Position: refs/heads/master@{#39551}
15 lines
344 B
JavaScript
15 lines
344 B
JavaScript
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
function f(obj) {
|
|
var key;
|
|
for (key in obj) { }
|
|
return key === undefined;
|
|
}
|
|
|
|
%OptimizeFunctionOnNextCall(f);
|
|
assertFalse(f({ foo:0 }));
|