1 // 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.
5 // Flags: --allow-natives-syntax
7 var s = %CreatePrivateOwnSymbol("s");
8 var s1 = %CreatePrivateOwnSymbol("s1");
10 function TestSimple() {
14 var o = Object.create(p);
16 assertEquals(undefined, o[s]);
17 assertEquals("moo", p[s]);
20 assertEquals("bow-wow", o[s]);
21 assertEquals("moo", p[s]);
32 var o = Object.create(p);
34 function checkNonOwn(o) {
35 assertEquals(undefined, o[s]);
36 assertEquals("bow-wow", o[s1]);
41 // Test monomorphic/optimized.
42 for (var i = 0; i < 1000; i++) {
46 // Test non-monomorphic.
47 for (var i = 0; i < 1000; i++) {
48 var oNew = Object.create(p);