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 18 matching lines...) Expand all Loading... |
29 | 29 |
30 #include "v8.h" | 30 #include "v8.h" |
31 | 31 |
32 #include "objects.h" | 32 #include "objects.h" |
33 #include "objects-inl.h" | 33 #include "objects-inl.h" |
34 | 34 |
35 namespace v8 { | 35 namespace v8 { |
36 namespace internal { | 36 namespace internal { |
37 | 37 |
38 | 38 |
39 static const int kDays4Years[] = {0, 365, 2 * 365, 3 * 365 + 1}; | |
40 static const int kDaysIn4Years = 4 * 365 + 1; | 39 static const int kDaysIn4Years = 4 * 365 + 1; |
41 static const int kDaysIn100Years = 25 * kDaysIn4Years - 1; | 40 static const int kDaysIn100Years = 25 * kDaysIn4Years - 1; |
42 static const int kDaysIn400Years = 4 * kDaysIn100Years + 1; | 41 static const int kDaysIn400Years = 4 * kDaysIn100Years + 1; |
43 static const int kDays1970to2000 = 30 * 365 + 7; | 42 static const int kDays1970to2000 = 30 * 365 + 7; |
44 static const int kDaysOffset = 1000 * kDaysIn400Years + 5 * kDaysIn400Years - | 43 static const int kDaysOffset = 1000 * kDaysIn400Years + 5 * kDaysIn400Years - |
45 kDays1970to2000; | 44 kDays1970to2000; |
46 static const int kYearsOffset = 400000; | 45 static const int kYearsOffset = 400000; |
47 static const char kDaysInMonths[] = | 46 static const char kDaysInMonths[] = |
48 {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; | 47 {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; |
49 | 48 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 if (&dst_[i] == skip) continue; | 374 if (&dst_[i] == skip) continue; |
376 if (result == NULL || result->last_used > dst_[i].last_used) { | 375 if (result == NULL || result->last_used > dst_[i].last_used) { |
377 result = &dst_[i]; | 376 result = &dst_[i]; |
378 } | 377 } |
379 } | 378 } |
380 ClearSegment(result); | 379 ClearSegment(result); |
381 return result; | 380 return result; |
382 } | 381 } |
383 | 382 |
384 } } // namespace v8::internal | 383 } } // namespace v8::internal |
OLD | NEW |