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 3271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3282 { MaybeObject* maybe_obj = AllocateFixedArray(Natives::GetBuiltinsCount()); | 3282 { MaybeObject* maybe_obj = AllocateFixedArray(Natives::GetBuiltinsCount()); |
3283 if (!maybe_obj->ToObject(&obj)) return false; | 3283 if (!maybe_obj->ToObject(&obj)) return false; |
3284 } | 3284 } |
3285 set_natives_source_cache(FixedArray::cast(obj)); | 3285 set_natives_source_cache(FixedArray::cast(obj)); |
3286 | 3286 |
3287 { MaybeObject* maybe_obj = AllocateCell(undefined_value()); | 3287 { MaybeObject* maybe_obj = AllocateCell(undefined_value()); |
3288 if (!maybe_obj->ToObject(&obj)) return false; | 3288 if (!maybe_obj->ToObject(&obj)) return false; |
3289 } | 3289 } |
3290 set_undefined_cell(Cell::cast(obj)); | 3290 set_undefined_cell(Cell::cast(obj)); |
3291 | 3291 |
| 3292 // Allocate objects to hold symbol registry. |
| 3293 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
| 3294 if (!maybe_obj->ToObject(&obj)) return false; |
| 3295 maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); |
| 3296 if (!maybe_obj->ToObject(&obj)) return false; |
| 3297 } |
| 3298 set_symbol_registry(JSObject::cast(obj)); |
| 3299 |
3292 // Allocate object to hold object observation state. | 3300 // Allocate object to hold object observation state. |
3293 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); | 3301 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
3294 if (!maybe_obj->ToObject(&obj)) return false; | 3302 if (!maybe_obj->ToObject(&obj)) return false; |
3295 } | 3303 } |
3296 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); | 3304 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); |
3297 if (!maybe_obj->ToObject(&obj)) return false; | 3305 if (!maybe_obj->ToObject(&obj)) return false; |
3298 } | 3306 } |
3299 set_observation_state(JSObject::cast(obj)); | 3307 set_observation_state(JSObject::cast(obj)); |
3300 | 3308 |
3301 // Allocate object to hold object microtask state. | 3309 // Allocate object to hold object microtask state. |
(...skipping 4448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7750 static_cast<int>(object_sizes_last_time_[index])); | 7758 static_cast<int>(object_sizes_last_time_[index])); |
7751 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7759 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
7752 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7760 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7753 | 7761 |
7754 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7762 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7755 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7763 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7756 ClearObjectStats(); | 7764 ClearObjectStats(); |
7757 } | 7765 } |
7758 | 7766 |
7759 } } // namespace v8::internal | 7767 } } // namespace v8::internal |
OLD | NEW |