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

Unified Diff: src/symbol.js

Issue 12296026: ES6 symbols: Implement Symbol intrinsic and basic functionality (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/stub-cache.cc ('k') | src/type-info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/symbol.js
diff --git a/test/mjsunit/regress/regress-171641.js b/src/symbol.js
similarity index 86%
copy from test/mjsunit/regress/regress-171641.js
copy to src/symbol.js
index 8db6781821325f8f6253eb2df4abb2b362b001c0..b7f9dc9496aac589e89e2d2761ebe6431a36008e 100644
--- a/test/mjsunit/regress/regress-171641.js
+++ b/src/symbol.js
@@ -25,16 +25,15 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
+"use strict";
-function foo(k, p) {
- for (var i = 0; i < 1; i++) {
- p = Math.min(p, i);
- }
- m = Math.floor((k | 0) / p);
+var $Symbol = function() { return %CreateSymbol() }
+global.Symbol = $Symbol
+
+// Symbols only have a toString method and no prototype.
+var SymbolDelegate = {
+ __proto__: null,
+ toString: $Object.prototype.toString
}
-foo(0, 1);
-foo(0, 1);
-%OptimizeFunctionOnNextCall(foo);
-foo(0, 1);
+$Object.freeze(SymbolDelegate)
« no previous file with comments | « src/stub-cache.cc ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698