blob: 8e5cd2fd5063e557957521a6542fd5bdc1b4e271 [file] [log] [blame]
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001// Copyright 2014 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: --cache=code --serialize-toplevel
6
7var foo = [];
8foo[0] = "bar";
9assertEquals(["bar"], foo);
10
11var a;
12var b = 1;
13a = [2]; // STORE_IC
14a[0] = a[0] + 1; // KEYED_STORE_IC, KEYED_LOAD_IC, BINARY_OP_IC
15assertTrue(a[0] > b); // CALL_IC, COMPARE_IC
16b = b == null; // COMPARE_NIL_IC
17b = b || Boolean(''); // TO_BOOLEAN_IC
18assertFalse(b);