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 // 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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 if (date_cache_version_holder[0] == date_cache_version) { | 756 if (date_cache_version_holder[0] == date_cache_version) { |
757 return; | 757 return; |
758 } | 758 } |
759 date_cache_version = date_cache_version_holder[0]; | 759 date_cache_version = date_cache_version_holder[0]; |
760 | 760 |
761 // Reset the timezone cache: | 761 // Reset the timezone cache: |
762 timezone_cache_time = NAN; | 762 timezone_cache_time = NAN; |
763 timezone_cache_timezone = UNDEFINED; | 763 timezone_cache_timezone = UNDEFINED; |
764 | 764 |
765 // Reset the date cache: | 765 // Reset the date cache: |
766 cache = Date_cache; | 766 Date_cache.time = NAN; |
767 cache.time = NAN; | 767 Date_cache.string = null; |
768 cache.string = null; | |
769 } | 768 } |
770 | 769 |
771 | 770 |
772 // ------------------------------------------------------------------- | 771 // ------------------------------------------------------------------- |
773 | 772 |
774 function SetUpDate() { | 773 function SetUpDate() { |
775 %CheckIsBootstrapping(); | 774 %CheckIsBootstrapping(); |
776 | 775 |
777 %SetCode($Date, DateConstructor); | 776 %SetCode($Date, DateConstructor); |
778 %FunctionSetPrototype($Date, new $Date(NAN)); | 777 %FunctionSetPrototype($Date, new $Date(NAN)); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 "toGMTString", DateToGMTString, | 832 "toGMTString", DateToGMTString, |
834 "toUTCString", DateToUTCString, | 833 "toUTCString", DateToUTCString, |
835 "getYear", DateGetYear, | 834 "getYear", DateGetYear, |
836 "setYear", DateSetYear, | 835 "setYear", DateSetYear, |
837 "toISOString", DateToISOString, | 836 "toISOString", DateToISOString, |
838 "toJSON", DateToJSON | 837 "toJSON", DateToJSON |
839 )); | 838 )); |
840 } | 839 } |
841 | 840 |
842 SetUpDate(); | 841 SetUpDate(); |
OLD | NEW |