blob: f0c696e14b205c8094bb04f909b43a2677bf4c26 [file] [log] [blame]
Ben Murdoch61f157c2016-09-16 13:49:30 +01001// Copyright 2016 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Flags: --turbo-filter=* --allow-natives-syntax
6
7var v1 = {};
8function g() {
9 v1 = [];
10 for (var i = 0; i < 1; i++) {
11 v1[i]();
12 }
13}
14
15var v2 = {};
16var v3 = {};
17function f() {
18 v3 = v2;
19 g();
20}
21
22assertThrows(g);
23%OptimizeFunctionOnNextCall(f);
24assertThrows(f);