| Index: test/mjsunit/compiler/smi-stores-opt.js
|
| diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/mjsunit/compiler/smi-stores-opt.js
|
| similarity index 86%
|
| copy from test/mjsunit/regress/regress-crbug-242870.js
|
| copy to test/mjsunit/compiler/smi-stores-opt.js
|
| index 7183375ca811cedc81c870d34e694e98cf727f9b..ca0923abc99501096d182bcdcd05f6f4020de9c9 100644
|
| --- a/test/mjsunit/regress/regress-crbug-242870.js
|
| +++ b/test/mjsunit/compiler/smi-stores-opt.js
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2013 the V8 project authors. All rights reserved.
|
| +// Copyright 2014 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -27,17 +27,23 @@
|
|
|
| // Flags: --allow-natives-syntax
|
|
|
| -var non_const_true = true;
|
| +var o = {a:1.5};
|
| +o.a = 0;
|
| +var a = o.a;
|
|
|
| -function f() {
|
| - return (non_const_true || true && g());
|
| +function g() {
|
| + return 1;
|
| }
|
|
|
| -function g() {
|
| - for (;;) {}
|
| +var o2 = {a:{}};
|
| +
|
| +function f() {
|
| + var result = {a: a};
|
| + var literal = {x:g()};
|
| + return [result, literal];
|
| }
|
|
|
| -assertTrue(f());
|
| -assertTrue(f());
|
| +f();
|
| +f();
|
| %OptimizeFunctionOnNextCall(f);
|
| -assertTrue(f());
|
| +assertEquals(1, f()[1].x);
|
|
|