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

Side by Side Diff: src/date.js

Issue 384003003: Replace AddProperty by AddNamedProperty to speed up the common case (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/collection-iterator.js ('k') | src/generator.js » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
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 "use strict"; 5 "use strict";
6 6
7 // This file relies on the fact that the following declarations have been made 7 // This file relies on the fact that the following declarations have been made
8 // in v8natives.js: 8 // in v8natives.js:
9 // var $isFinite = GlobalIsFinite; 9 // var $isFinite = GlobalIsFinite;
10 10
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 %FunctionSetPrototype($Date, new $Date(NAN)); 756 %FunctionSetPrototype($Date, new $Date(NAN));
757 757
758 // Set up non-enumerable properties of the Date object itself. 758 // Set up non-enumerable properties of the Date object itself.
759 InstallFunctions($Date, DONT_ENUM, $Array( 759 InstallFunctions($Date, DONT_ENUM, $Array(
760 "UTC", DateUTC, 760 "UTC", DateUTC,
761 "parse", DateParse, 761 "parse", DateParse,
762 "now", DateNow 762 "now", DateNow
763 )); 763 ));
764 764
765 // Set up non-enumerable constructor property of the Date prototype object. 765 // Set up non-enumerable constructor property of the Date prototype object.
766 %AddProperty($Date.prototype, "constructor", $Date, DONT_ENUM); 766 %AddNamedProperty($Date.prototype, "constructor", $Date, DONT_ENUM);
767 767
768 // Set up non-enumerable functions of the Date prototype object and 768 // Set up non-enumerable functions of the Date prototype object and
769 // set their names. 769 // set their names.
770 InstallFunctions($Date.prototype, DONT_ENUM, $Array( 770 InstallFunctions($Date.prototype, DONT_ENUM, $Array(
771 "toString", DateToString, 771 "toString", DateToString,
772 "toDateString", DateToDateString, 772 "toDateString", DateToDateString,
773 "toTimeString", DateToTimeString, 773 "toTimeString", DateToTimeString,
774 "toLocaleString", DateToLocaleString, 774 "toLocaleString", DateToLocaleString,
775 "toLocaleDateString", DateToLocaleDateString, 775 "toLocaleDateString", DateToLocaleDateString,
776 "toLocaleTimeString", DateToLocaleTimeString, 776 "toLocaleTimeString", DateToLocaleTimeString,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 "toGMTString", DateToGMTString, 811 "toGMTString", DateToGMTString,
812 "toUTCString", DateToUTCString, 812 "toUTCString", DateToUTCString,
813 "getYear", DateGetYear, 813 "getYear", DateGetYear,
814 "setYear", DateSetYear, 814 "setYear", DateSetYear,
815 "toISOString", DateToISOString, 815 "toISOString", DateToISOString,
816 "toJSON", DateToJSON 816 "toJSON", DateToJSON
817 )); 817 ));
818 } 818 }
819 819
820 SetUpDate(); 820 SetUpDate();
OLDNEW
« no previous file with comments | « src/collection-iterator.js ('k') | src/generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698