OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 WriteToFlat(this, reinterpret_cast<uint8_t*>(buffer), 0, length()); | 753 WriteToFlat(this, reinterpret_cast<uint8_t*>(buffer), 0, length()); |
754 buffer[length()] = 0; | 754 buffer[length()] = 0; |
755 return buffer; | 755 return buffer; |
756 } | 756 } |
757 | 757 |
758 | 758 |
759 static const char* const weekdays[] = { | 759 static const char* const weekdays[] = { |
760 "???", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" | 760 "???", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" |
761 }; | 761 }; |
762 | 762 |
| 763 |
763 void JSDate::JSDatePrint(FILE* out) { | 764 void JSDate::JSDatePrint(FILE* out) { |
764 HeapObject::PrintHeader(out, "JSDate"); | 765 HeapObject::PrintHeader(out, "JSDate"); |
765 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); | 766 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); |
766 PrintF(out, " - value = "); | 767 PrintF(out, " - value = "); |
767 value()->Print(out); | 768 value()->Print(out); |
768 if (!year()->IsSmi()) { | 769 if (!year()->IsSmi()) { |
769 PrintF(out, " - time = NaN\n"); | 770 PrintF(out, " - time = NaN\n"); |
770 } else { | 771 } else { |
771 PrintF(out, " - time = %s %04d/%02d/%02d %02d:%02d:%02d\n", | 772 PrintF(out, " - time = %s %04d/%02d/%02d %02d:%02d:%02d\n", |
772 weekdays[weekday()->IsSmi() ? Smi::cast(weekday())->value() + 1 : 0], | 773 weekdays[weekday()->IsSmi() ? Smi::cast(weekday())->value() + 1 : 0], |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 } | 1241 } |
1241 } | 1242 } |
1242 PrintF(out, "\n"); | 1243 PrintF(out, "\n"); |
1243 } | 1244 } |
1244 | 1245 |
1245 | 1246 |
1246 #endif // OBJECT_PRINT | 1247 #endif // OBJECT_PRINT |
1247 | 1248 |
1248 | 1249 |
1249 } } // namespace v8::internal | 1250 } } // namespace v8::internal |
OLD | NEW |