| Index: test/mjsunit/transition-elements-kind.js
|
| diff --git a/test/mjsunit/regress/regress-polymorphic-store.js b/test/mjsunit/transition-elements-kind.js
|
| similarity index 78%
|
| copy from test/mjsunit/regress/regress-polymorphic-store.js
|
| copy to test/mjsunit/transition-elements-kind.js
|
| index 4723a7f4343bb79daf5283325ee5c1082abefa79..ba05c950d98a1f0a490e2f3c1a123060e2f8fb50 100644
|
| --- a/test/mjsunit/regress/regress-polymorphic-store.js
|
| +++ b/test/mjsunit/transition-elements-kind.js
|
| @@ -25,24 +25,24 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -// Flags: --allow-natives-syntax
|
| +// Flags: --allow-natives-syntax --compiled-transitions
|
| +// Flags: --track-allocation-sites
|
|
|
| -var o1 = {};
|
| -o1.f1 = function() { return 10; };
|
| -o1.x = 5;
|
| -o1.y = 2;
|
| -var o2 = {};
|
| -o2.x = 5;
|
| -o2.y = 5;
|
| -
|
| -function store(o, v) {
|
| - o.y = v;
|
| +// Allocation site for empty double arrays.
|
| +function foo() {
|
| + return new Array();
|
| }
|
| +var a = foo();
|
| +a[0] = 1.1;
|
|
|
| -store(o2, 0);
|
| -store(o1, 0);
|
| -store(o2, 0);
|
| +// Emit a TransitionElementsKindStub which transitions from double to object.
|
| +function store(a,x) {
|
| + a[0] = x;
|
| +}
|
| +store([1.1], 'a');
|
| +store([1.1], 1.1);
|
| %OptimizeFunctionOnNextCall(store);
|
| -store(o1, 10);
|
| -assertEquals(5, o1.x);
|
| -assertEquals(10, o1.y);
|
| +
|
| +// Use the TransitionElementsKindStub to transition from double to object.
|
| +var b = foo();
|
| +store(b, 'a');
|
|
|