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

Side by Side Diff: src/date.js

Issue 1266013006: [stubs] Unify (and optimize) implementation of ToObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add missing support for %_ToObject in TurboFan and Crankshaft. Created 5 years, 4 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/deoptimizer.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 var $createDate; 5 var $createDate;
6 6
7 // ------------------------------------------------------------------- 7 // -------------------------------------------------------------------
8 8
9 (function(global, utils) { 9 (function(global, utils) {
10 10
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 '-' + PadInt(UTC_DAY(this), 2) + 768 '-' + PadInt(UTC_DAY(this), 2) +
769 'T' + PadInt(UTC_HOUR(this), 2) + 769 'T' + PadInt(UTC_HOUR(this), 2) +
770 ':' + PadInt(UTC_MIN(this), 2) + 770 ':' + PadInt(UTC_MIN(this), 2) +
771 ':' + PadInt(UTC_SEC(this), 2) + 771 ':' + PadInt(UTC_SEC(this), 2) +
772 '.' + PadInt(UTC_MS(this), 3) + 772 '.' + PadInt(UTC_MS(this), 3) +
773 'Z'; 773 'Z';
774 } 774 }
775 775
776 776
777 function DateToJSON(key) { 777 function DateToJSON(key) {
778 var o = $toObject(this); 778 var o = TO_OBJECT(this);
779 var tv = $defaultNumber(o); 779 var tv = $defaultNumber(o);
780 if (IS_NUMBER(tv) && !NUMBER_IS_FINITE(tv)) { 780 if (IS_NUMBER(tv) && !NUMBER_IS_FINITE(tv)) {
781 return null; 781 return null;
782 } 782 }
783 return o.toISOString(); 783 return o.toISOString();
784 } 784 }
785 785
786 786
787 var date_cache_version_holder; 787 var date_cache_version_holder;
788 var date_cache_version = NAN; 788 var date_cache_version = NAN;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 "getYear", DateGetYear, 877 "getYear", DateGetYear,
878 "setYear", DateSetYear, 878 "setYear", DateSetYear,
879 "toISOString", DateToISOString, 879 "toISOString", DateToISOString,
880 "toJSON", DateToJSON 880 "toJSON", DateToJSON
881 ]); 881 ]);
882 882
883 // Expose to the global scope. 883 // Expose to the global scope.
884 $createDate = CreateDate; 884 $createDate = CreateDate;
885 885
886 }) 886 })
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698