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 2727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 | 2738 |
2739 | 2739 |
2740 bool Heap::CreateInitialObjects() { | 2740 bool Heap::CreateInitialObjects() { |
2741 Object* obj; | 2741 Object* obj; |
2742 | 2742 |
2743 // The -0 value must be set before NumberFromDouble works. | 2743 // The -0 value must be set before NumberFromDouble works. |
2744 { MaybeObject* maybe_obj = AllocateHeapNumber(-0.0, TENURED); | 2744 { MaybeObject* maybe_obj = AllocateHeapNumber(-0.0, TENURED); |
2745 if (!maybe_obj->ToObject(&obj)) return false; | 2745 if (!maybe_obj->ToObject(&obj)) return false; |
2746 } | 2746 } |
2747 set_minus_zero_value(HeapNumber::cast(obj)); | 2747 set_minus_zero_value(HeapNumber::cast(obj)); |
2748 ASSERT(signbit(minus_zero_value()->Number()) != 0); | 2748 ASSERT(std::signbit(minus_zero_value()->Number()) != 0); |
2749 | 2749 |
2750 { MaybeObject* maybe_obj = AllocateHeapNumber(OS::nan_value(), TENURED); | 2750 { MaybeObject* maybe_obj = AllocateHeapNumber(OS::nan_value(), TENURED); |
2751 if (!maybe_obj->ToObject(&obj)) return false; | 2751 if (!maybe_obj->ToObject(&obj)) return false; |
2752 } | 2752 } |
2753 set_nan_value(HeapNumber::cast(obj)); | 2753 set_nan_value(HeapNumber::cast(obj)); |
2754 | 2754 |
2755 { MaybeObject* maybe_obj = AllocateHeapNumber(V8_INFINITY, TENURED); | 2755 { MaybeObject* maybe_obj = AllocateHeapNumber(V8_INFINITY, TENURED); |
2756 if (!maybe_obj->ToObject(&obj)) return false; | 2756 if (!maybe_obj->ToObject(&obj)) return false; |
2757 } | 2757 } |
2758 set_infinity_value(HeapNumber::cast(obj)); | 2758 set_infinity_value(HeapNumber::cast(obj)); |
(...skipping 5094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7853 static_cast<int>(object_sizes_last_time_[index])); | 7853 static_cast<int>(object_sizes_last_time_[index])); |
7854 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7854 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7855 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7855 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7856 | 7856 |
7857 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7857 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7858 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7858 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7859 ClearObjectStats(); | 7859 ClearObjectStats(); |
7860 } | 7860 } |
7861 | 7861 |
7862 } } // namespace v8::internal | 7862 } } // namespace v8::internal |
OLD | NEW |