| Index: test/mjsunit/compiler/regress-truncate-number-or-undefined-to-float64.js
|
| diff --git a/test/mjsunit/regress/regress-crbug-513471.js b/test/mjsunit/compiler/regress-truncate-number-or-undefined-to-float64.js
|
| similarity index 62%
|
| copy from test/mjsunit/regress/regress-crbug-513471.js
|
| copy to test/mjsunit/compiler/regress-truncate-number-or-undefined-to-float64.js
|
| index 48c793e512315284ddf218f8847d9c357280fe95..1dc3042ea7fb83eb2e464873815ca1f38ed26ee2 100644
|
| --- a/test/mjsunit/regress/regress-crbug-513471.js
|
| +++ b/test/mjsunit/compiler/regress-truncate-number-or-undefined-to-float64.js
|
| @@ -4,7 +4,16 @@
|
|
|
| // Flags: --allow-natives-syntax
|
|
|
| -var g = (function*(){});
|
| -var f = g();
|
| +function g(a, b) {
|
| + a = +a;
|
| + if (b) {
|
| + a = undefined;
|
| + }
|
| + print(a);
|
| + return +a;
|
| +}
|
| +
|
| +g(0);
|
| +g(0);
|
| %OptimizeFunctionOnNextCall(g);
|
| -f.next();
|
| +assertTrue(Number.isNaN(g(0, true)));
|
|
|