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

Side by Side Diff: src/date.js

Issue 895053002: Move the contents of api-natives.js to c++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/contexts.h ('k') | src/execution.h » ('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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 // Reset the timezone cache: 740 // Reset the timezone cache:
741 timezone_cache_time = NAN; 741 timezone_cache_time = NAN;
742 timezone_cache_timezone = UNDEFINED; 742 timezone_cache_timezone = UNDEFINED;
743 743
744 // Reset the date cache: 744 // Reset the date cache:
745 Date_cache.time = NAN; 745 Date_cache.time = NAN;
746 Date_cache.string = null; 746 Date_cache.string = null;
747 } 747 }
748 748
749 749
750 function CreateDate(time) {
751 var date = new $Date();
752 date.setTime(time);
753 return date;
754 }
755
750 // ------------------------------------------------------------------- 756 // -------------------------------------------------------------------
751 757
752 function SetUpDate() { 758 function SetUpDate() {
753 %CheckIsBootstrapping(); 759 %CheckIsBootstrapping();
754 760
755 %SetCode($Date, DateConstructor); 761 %SetCode($Date, DateConstructor);
756 %FunctionSetPrototype($Date, new $Date(NAN)); 762 %FunctionSetPrototype($Date, new $Date(NAN));
757 763
758 // Set up non-enumerable properties of the Date object itself. 764 // Set up non-enumerable properties of the Date object itself.
759 InstallFunctions($Date, DONT_ENUM, $Array( 765 InstallFunctions($Date, DONT_ENUM, $Array(
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 "toGMTString", DateToGMTString, 817 "toGMTString", DateToGMTString,
812 "toUTCString", DateToUTCString, 818 "toUTCString", DateToUTCString,
813 "getYear", DateGetYear, 819 "getYear", DateGetYear,
814 "setYear", DateSetYear, 820 "setYear", DateSetYear,
815 "toISOString", DateToISOString, 821 "toISOString", DateToISOString,
816 "toJSON", DateToJSON 822 "toJSON", DateToJSON
817 )); 823 ));
818 } 824 }
819 825
820 SetUpDate(); 826 SetUpDate();
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698