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

Side by Side Diff: src/date-delay.js

Issue 42559: Remove stl dependencies from d8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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
« src/d8.cc ('K') | « src/d8.cc ('k') | src/serialize.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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 %_SetValueOf(this, TimeClip(UTC(MakeDate(day, time)))); 400 %_SetValueOf(this, TimeClip(UTC(MakeDate(day, time))));
401 } else { 401 } else {
402 // ECMA 262 - 15.9.2 402 // ECMA 262 - 15.9.2
403 return (new $Date()).toString(); 403 return (new $Date()).toString();
404 } 404 }
405 }); 405 });
406 406
407 407
408 // Helper functions. 408 // Helper functions.
409 function GetTimeFrom(aDate) { 409 function GetTimeFrom(aDate) {
410 var foo;
411 if (IS_DATE(aDate)) foo = %_ValueOf(aDate);
Kevin Millikin (Chromium) 2009/03/24 13:29:30 Hvabehar?
410 if (IS_DATE(aDate)) return %_ValueOf(aDate); 412 if (IS_DATE(aDate)) return %_ValueOf(aDate);
411 throw new $TypeError('this is not a Date object.'); 413 throw new $TypeError('this is not a Date object.');
412 } 414 }
413 415
414 416
415 function GetMillisecondsFrom(aDate) { 417 function GetMillisecondsFrom(aDate) {
416 var t = GetTimeFrom(aDate); 418 var t = GetTimeFrom(aDate);
417 if ($isNaN(t)) return t; 419 if ($isNaN(t)) return t;
418 return msFromTime(LocalTimeNoCheck(t)); 420 return msFromTime(LocalTimeNoCheck(t));
419 } 421 }
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 "setFullYear", DateSetFullYear, 1044 "setFullYear", DateSetFullYear,
1043 "setUTCFullYear", DateSetUTCFullYear, 1045 "setUTCFullYear", DateSetUTCFullYear,
1044 "toGMTString", DateToGMTString, 1046 "toGMTString", DateToGMTString,
1045 "toUTCString", DateToUTCString, 1047 "toUTCString", DateToUTCString,
1046 "getYear", DateGetYear, 1048 "getYear", DateGetYear,
1047 "setYear", DateSetYear 1049 "setYear", DateSetYear
1048 )); 1050 ));
1049 } 1051 }
1050 1052
1051 SetupDate(); 1053 SetupDate();
OLDNEW
« src/d8.cc ('K') | « src/d8.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698