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

Side by Side Diff: src/date.js

Issue 7830036: Optimize isFinite and isNaN. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Made the change general by moving putting it in the NUMBER_IS_FINITE macro. Created 9 years, 3 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/ast.cc ('k') | src/extensions/externalize-string-extension.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 // Reset the date cache: 1041 // Reset the date cache:
1042 cache = Date_cache; 1042 cache = Date_cache;
1043 cache.time = $NaN; 1043 cache.time = $NaN;
1044 cache.year = $NaN; 1044 cache.year = $NaN;
1045 cache.string = null; 1045 cache.string = null;
1046 } 1046 }
1047 1047
1048 1048
1049 // ------------------------------------------------------------------- 1049 // -------------------------------------------------------------------
1050 1050
1051 function SetUpDate() { 1051 function SetupDate() {
1052 %CheckIsBootstrapping(); 1052 // Setup non-enumerable properties of the Date object itself.
1053 // Set up non-enumerable properties of the Date object itself.
1054 InstallFunctions($Date, DONT_ENUM, $Array( 1053 InstallFunctions($Date, DONT_ENUM, $Array(
1055 "UTC", DateUTC, 1054 "UTC", DateUTC,
1056 "parse", DateParse, 1055 "parse", DateParse,
1057 "now", DateNow 1056 "now", DateNow
1058 )); 1057 ));
1059 1058
1060 // Set up non-enumerable constructor property of the Date prototype object. 1059 // Setup non-enumerable constructor property of the Date prototype object.
1061 %SetProperty($Date.prototype, "constructor", $Date, DONT_ENUM); 1060 %SetProperty($Date.prototype, "constructor", $Date, DONT_ENUM);
1062 1061
1063 // Set up non-enumerable functions of the Date prototype object and 1062 // Setup non-enumerable functions of the Date prototype object and
1064 // set their names. 1063 // set their names.
1065 InstallFunctionsOnHiddenPrototype($Date.prototype, DONT_ENUM, $Array( 1064 InstallFunctionsOnHiddenPrototype($Date.prototype, DONT_ENUM, $Array(
1066 "toString", DateToString, 1065 "toString", DateToString,
1067 "toDateString", DateToDateString, 1066 "toDateString", DateToDateString,
1068 "toTimeString", DateToTimeString, 1067 "toTimeString", DateToTimeString,
1069 "toLocaleString", DateToLocaleString, 1068 "toLocaleString", DateToLocaleString,
1070 "toLocaleDateString", DateToLocaleDateString, 1069 "toLocaleDateString", DateToLocaleDateString,
1071 "toLocaleTimeString", DateToLocaleTimeString, 1070 "toLocaleTimeString", DateToLocaleTimeString,
1072 "valueOf", DateValueOf, 1071 "valueOf", DateValueOf,
1073 "getTime", DateGetTime, 1072 "getTime", DateGetTime,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 "setUTCFullYear", DateSetUTCFullYear, 1104 "setUTCFullYear", DateSetUTCFullYear,
1106 "toGMTString", DateToGMTString, 1105 "toGMTString", DateToGMTString,
1107 "toUTCString", DateToUTCString, 1106 "toUTCString", DateToUTCString,
1108 "getYear", DateGetYear, 1107 "getYear", DateGetYear,
1109 "setYear", DateSetYear, 1108 "setYear", DateSetYear,
1110 "toISOString", DateToISOString, 1109 "toISOString", DateToISOString,
1111 "toJSON", DateToJSON 1110 "toJSON", DateToJSON
1112 )); 1111 ));
1113 } 1112 }
1114 1113
1115 SetUpDate(); 1114 SetupDate();
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/extensions/externalize-string-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698