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

Side by Side Diff: test/mjsunit/getownprivateproperty.js

Issue 458813002: Prototype implementation of GET_OWN_PROPERTY intrinsic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/stub-cache.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Flags: --allow-natives-syntax
2
3
4 var s1 = Symbol("s1");
5 var s2 = Symbol("s2");
6
7 var p = { xBase : 15 };
8 p[s1] = "moo";
9 var o = Object.create(p, { x : { value : 25 }});
10 o[s2] = "bow-wow"
11
12 assertEquals(25, %GET_OWN_PROPERTY(o, "x"));
13 assertEquals(undefined, %GET_OWN_PROPERTY(o, "xBase"));
14 assertEquals(undefined, %GET_OWN_PROPERTY(o, s1));
15 assertEquals("bow-wow", %GET_OWN_PROPERTY(o, s2));
16
17 function checkNonOwn(o) {
18 assertEquals(15, o["xBase"]);
19 assertEquals(undefined, %GET_OWN_PROPERTY(o, "xBase"));
20 assertEquals("moo", o[s1]);
21 assertEquals(undefined, %GET_OWN_PROPERTY(o, s1));
22 }
23
24 checkNonOwn(o);
25 for (var i = 0; i < 1000; i++) {
26 var oNew = Object.create(p);
27 oNew["s" + i] = i;
28 checkNonOwn(oNew);
29 }
30
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698