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

Side by Side Diff: src/v8natives.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, 9 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/v8globals.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 %SetProperty($Boolean.prototype, "constructor", $Boolean, DONT_ENUM); 225 %SetProperty($Boolean.prototype, "constructor", $Boolean, DONT_ENUM);
226 226
227 // ---------------------------------------------------------------------------- 227 // ----------------------------------------------------------------------------
228 // Object 228 // Object
229 229
230 $Object.prototype.constructor = $Object; 230 $Object.prototype.constructor = $Object;
231 231
232 // ECMA-262 - 15.2.4.2 232 // ECMA-262 - 15.2.4.2
233 function ObjectToString() { 233 function ObjectToString() {
234 if (IS_UNDEFINED(this) && !IS_UNDETECTABLE(this)) { 234 if (IS_UNDEFINED(this) && !IS_UNDETECTABLE(this)) return "[object Undefined]";
235 return '[object Undefined]'; 235 if (IS_NULL(this)) return "[object Null]";
236 } 236 if (IS_SYMBOL(this)) return "[object Symbol]";
237 if (IS_NULL(this)) return '[object Null]';
238 return "[object " + %_ClassOf(ToObject(this)) + "]"; 237 return "[object " + %_ClassOf(ToObject(this)) + "]";
239 } 238 }
240 239
241 240
242 // ECMA-262 - 15.2.4.3 241 // ECMA-262 - 15.2.4.3
243 function ObjectToLocaleString() { 242 function ObjectToLocaleString() {
244 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) { 243 if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) {
245 throw MakeTypeError("called_on_null_or_undefined", 244 throw MakeTypeError("called_on_null_or_undefined",
246 ["Object.prototype.toLocaleString"]); 245 ["Object.prototype.toLocaleString"]);
247 } 246 }
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after
1718 1717
1719 function SetUpFunction() { 1718 function SetUpFunction() {
1720 %CheckIsBootstrapping(); 1719 %CheckIsBootstrapping();
1721 InstallFunctions($Function.prototype, DONT_ENUM, $Array( 1720 InstallFunctions($Function.prototype, DONT_ENUM, $Array(
1722 "bind", FunctionBind, 1721 "bind", FunctionBind,
1723 "toString", FunctionToString 1722 "toString", FunctionToString
1724 )); 1723 ));
1725 } 1724 }
1726 1725
1727 SetUpFunction(); 1726 SetUpFunction();
OLDNEW
« no previous file with comments | « src/v8globals.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698