v8/test/mjsunit/regress/regress-368243.js
ulan@chromium.org 8999a006be Fix index register assignment in LoadFieldByIndex for arm, arm64, and mips.
This instruciton clobbers the index register.

BUG=368243
LOG=N
TEST=mjsunit/regress/regress-368243
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/269273003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-05-08 08:51:51 +00:00

26 lines
481 B
JavaScript

// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function foo(a, c){
for(var f in c) {
if ("object" === typeof c[f]) {
a[f] = c[f];
foo(a[f], c[f]);
}
}
};
c = {
"one" : { x : 1},
"two" : { x : 2},
"thr" : { x : 3, z : 4},
};
foo({}, c);
foo({}, c);
%OptimizeFunctionOnNextCall(foo);
foo({}, c);