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

Side by Side Diff: test/mjsunit/value-wrapper-accessor.js

Issue 407953002: Support setting named properties on non-JSObjects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/runtime.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
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 function strict(s) { 71 function strict(s) {
72 return s.strict = 10; 72 return s.strict = 10;
73 } 73 }
74 74
75 nonstrict(object); 75 nonstrict(object);
76 nonstrict(object); 76 nonstrict(object);
77 %OptimizeFunctionOnNextCall(nonstrict); 77 %OptimizeFunctionOnNextCall(nonstrict);
78 result = undefined; 78 result = undefined;
79 nonstrict(object); 79 nonstrict(object);
80 // TODO(1475): Support storing to primitive values. 80 assertEquals("object", typeof result);
81 // This should return "object" once storing to primitive values is
82 // supported.
83 assertEquals("undefined", typeof result);
84 81
85 strict(object); 82 strict(object);
86 strict(object); 83 strict(object);
87 %OptimizeFunctionOnNextCall(strict); 84 %OptimizeFunctionOnNextCall(strict);
88 result = undefined; 85 result = undefined;
89 strict(object); 86 strict(object);
90 // TODO(1475): Support storing to primitive values. 87 assertEquals(object, result);
91 // This should return "object" once storing to primitive values is
92 // supported.
93 assertEquals("undefined", typeof result);
94 })(); 88 })();
95 } 89 }
96 90
97 test(1, Number.prototype); 91 test(1, Number.prototype);
98 test("string", String.prototype); 92 test("string", String.prototype);
99 test(true, Boolean.prototype); 93 test(true, Boolean.prototype);
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698