OLD | NEW |
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 Loading... |
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 %SetProperty($Date.prototype, "constructor", $Date, DONT_ENUM); | 766 %DefineProperty($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 Loading... |
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(); |
OLD | NEW |