Index: test/mjsunit/compiler/regress-633497.js |
diff --git a/test/mjsunit/compiler/regress-628403.js b/test/mjsunit/compiler/regress-633497.js |
similarity index 50% |
copy from test/mjsunit/compiler/regress-628403.js |
copy to test/mjsunit/compiler/regress-633497.js |
index 4096ac32aee4692487618fc53f6b7bcf703a9098..8bf358af00a5dbfc03ab8f3a11f2170b174d3d4b 100644 |
--- a/test/mjsunit/compiler/regress-628403.js |
+++ b/test/mjsunit/compiler/regress-633497.js |
@@ -4,24 +4,26 @@ |
// Flags: --allow-natives-syntax |
-var dothrow = false; |
- |
-function g() { |
- if (dothrow) throw 1; |
-} |
- |
function f(a) { |
- try { |
- g(); |
- } catch(e) { |
- if (typeof e !== 'number' && e !== 1) throw e; |
- return a[0]; |
+ var x; |
+ a = a|0; |
+ var dummy; |
+ if (a === 1) { |
+ x = 277.5; |
+ } else if (a === 2) { |
+ x = 0; |
+ } else { |
+ dummy = 527.5; |
ahaas
2016/08/18 06:57:07
Could we add a comment which describes the purpose
|
+ dummy = 958.5; |
+ dummy = 1143.5; |
+ dummy = 1368.5; |
+ dummy = 1558.5; |
+ x = 277.5; |
} |
+ return +x; |
} |
-%NeverOptimizeFunction(g); |
f(); |
f(); |
%OptimizeFunctionOnNextCall(f); |
-dothrow = true; |
-assertEquals(42, f([42])); |
+assertEquals(277.5, f()); |