# Tried to mock out arguments. This flushed out another problem. Minimized testcase:
Object.prototype.mock_arguments = ['x', 'y']
function foo(a) {
var sum = 0;
for (var i in a) {
var tmp = a[i] + 2 + 5 + 3;
a = new Array();
sum += tmp;
}
return sum;
}
a = new Array();
for (var i = 0; i < 10000; i++) {
a[i] = (i * 999);
}
foo(a);
print(foo(a));
# Compared nocrankshaft with noturbo_opt
# Flags of nocrankshaft:
--abort_on_stack_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --random-seed 1681183061 --nocrankshaft
# Flags of noturbo_opt:
--abort_on_stack_overflow --expose-gc --allow-natives-syntax --invoke-weak-callbacks --omit-quit --random-seed 1681183061 --always-opt --turbo-filter=~
Difference:
- NaNx,y253
+ NaNx,y253x,y253
### Start of configuration nocrankshaft:
NaNx,y253
### End of configuration nocrankshaft
### Start of configuration noturbo_opt:
NaNx,y253x,y253
### End of configuration noturbo_opt
Comment 1 by bugdroid1@chromium.org
, Nov 8 2016