| 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 2834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2845 if (!maybe_obj->ToObject(&obj)) return false; | 2845 if (!maybe_obj->ToObject(&obj)) return false; |
| 2846 } | 2846 } |
| 2847 set_regexp_multiple_cache(FixedArray::cast(obj)); | 2847 set_regexp_multiple_cache(FixedArray::cast(obj)); |
| 2848 | 2848 |
| 2849 // Allocate cache for external strings pointing to native source code. | 2849 // Allocate cache for external strings pointing to native source code. |
| 2850 { MaybeObject* maybe_obj = AllocateFixedArray(Natives::GetBuiltinsCount()); | 2850 { MaybeObject* maybe_obj = AllocateFixedArray(Natives::GetBuiltinsCount()); |
| 2851 if (!maybe_obj->ToObject(&obj)) return false; | 2851 if (!maybe_obj->ToObject(&obj)) return false; |
| 2852 } | 2852 } |
| 2853 set_natives_source_cache(FixedArray::cast(obj)); | 2853 set_natives_source_cache(FixedArray::cast(obj)); |
| 2854 | 2854 |
| 2855 // Allocate object to hold object observation state. |
| 2856 { MaybeObject* maybe_obj = AllocateMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
| 2857 if (!maybe_obj->ToObject(&obj)) return false; |
| 2858 } |
| 2859 { MaybeObject* maybe_obj = AllocateJSObjectFromMap(Map::cast(obj)); |
| 2860 if (!maybe_obj->ToObject(&obj)) return false; |
| 2861 } |
| 2862 set_observation_state(JSObject::cast(obj)); |
| 2863 |
| 2855 // Handling of script id generation is in FACTORY->NewScript. | 2864 // Handling of script id generation is in FACTORY->NewScript. |
| 2856 set_last_script_id(undefined_value()); | 2865 set_last_script_id(undefined_value()); |
| 2857 | 2866 |
| 2858 // Initialize keyed lookup cache. | 2867 // Initialize keyed lookup cache. |
| 2859 isolate_->keyed_lookup_cache()->Clear(); | 2868 isolate_->keyed_lookup_cache()->Clear(); |
| 2860 | 2869 |
| 2861 // Initialize context slot cache. | 2870 // Initialize context slot cache. |
| 2862 isolate_->context_slot_cache()->Clear(); | 2871 isolate_->context_slot_cache()->Clear(); |
| 2863 | 2872 |
| 2864 // Initialize descriptor cache. | 2873 // Initialize descriptor cache. |
| (...skipping 4548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7413 static_cast<int>(object_sizes_last_time_[index])); | 7422 static_cast<int>(object_sizes_last_time_[index])); |
| 7414 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7423 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7415 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7424 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7416 | 7425 |
| 7417 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7426 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7418 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7427 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7419 ClearObjectStats(); | 7428 ClearObjectStats(); |
| 7420 } | 7429 } |
| 7421 | 7430 |
| 7422 } } // namespace v8::internal | 7431 } } // namespace v8::internal |
| OLD | NEW |