nodejs/deps/v8/test/mjsunit/regress/regress-350884.js

16 lines
335 B
JavaScript
Raw Permalink Normal View History

2014-03-13 20:45:44 +04:00
// 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.
2014-03-18 00:33:01 +04:00
var obj = new Array(1);
obj[0] = 0;
obj[1] = 0;
function foo(flag_index) {
obj[flag_index]++;
2014-03-13 20:45:44 +04:00
}
2014-03-18 00:33:01 +04:00
// Force dictionary properties on obj.
obj[-8] = 3;
foo(1);
foo(2);