Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(834)

Side by Side Diff: test/mjsunit/own-symbols.js

Issue 1182303004: All private symbols are own symbols (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
rossberg 2015/06/15 12:09:11 This should be merged into harmony/private.js
wingo 2015/06/16 07:09:45 Done.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Flags: --allow-natives-syntax 5 // Flags: --allow-natives-syntax
6 6
7 var s = %CreatePrivateOwnSymbol("s"); 7 var s = %CreatePrivateSymbol("s");
8 var s1 = %CreatePrivateOwnSymbol("s1"); 8 var s1 = %CreatePrivateSymbol("s1");
9 9
10 function TestSimple() { 10 function TestSimple() {
11 var p = {} 11 var p = {}
12 p[s] = "moo"; 12 p[s] = "moo";
13 13
14 var o = Object.create(p); 14 var o = Object.create(p);
15 15
16 assertEquals(undefined, o[s]); 16 assertEquals(undefined, o[s]);
17 assertEquals("moo", p[s]); 17 assertEquals("moo", p[s]);
18 18
(...skipping 27 matching lines...) Expand all
46 // Test non-monomorphic. 46 // Test non-monomorphic.
47 for (var i = 0; i < 1000; i++) { 47 for (var i = 0; i < 1000; i++) {
48 var oNew = Object.create(p); 48 var oNew = Object.create(p);
49 oNew["s" + i] = i; 49 oNew["s" + i] = i;
50 oNew[s1] = "bow-wow"; 50 oNew[s1] = "bow-wow";
51 checkNonOwn(oNew); 51 checkNonOwn(oNew);
52 } 52 }
53 } 53 }
54 54
55 TestICs(); 55 TestICs();
OLDNEW
« test/mjsunit/harmony/private.js ('K') | « test/mjsunit/harmony/private.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698