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 2978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2989 set_instanceof_cache_map(Smi::FromInt(0)); | 2989 set_instanceof_cache_map(Smi::FromInt(0)); |
2990 set_instanceof_cache_answer(Smi::FromInt(0)); | 2990 set_instanceof_cache_answer(Smi::FromInt(0)); |
2991 | 2991 |
2992 CreateFixedStubs(); | 2992 CreateFixedStubs(); |
2993 | 2993 |
2994 // Allocate the dictionary of intrinsic function names. | 2994 // Allocate the dictionary of intrinsic function names. |
2995 { MaybeObject* maybe_obj = | 2995 { MaybeObject* maybe_obj = |
2996 NameDictionary::Allocate(this, Runtime::kNumFunctions); | 2996 NameDictionary::Allocate(this, Runtime::kNumFunctions); |
2997 if (!maybe_obj->ToObject(&obj)) return false; | 2997 if (!maybe_obj->ToObject(&obj)) return false; |
2998 } | 2998 } |
2999 { MaybeObject* maybe_obj = Runtime::InitializeIntrinsicFunctionNames(this, | |
3000 obj); | |
3001 if (!maybe_obj->ToObject(&obj)) return false; | |
3002 } | |
3003 set_intrinsic_function_names(NameDictionary::cast(obj)); | 2999 set_intrinsic_function_names(NameDictionary::cast(obj)); |
3004 | 3000 |
3005 { MaybeObject* maybe_obj = AllocateInitialNumberStringCache(); | 3001 { MaybeObject* maybe_obj = AllocateInitialNumberStringCache(); |
3006 if (!maybe_obj->ToObject(&obj)) return false; | 3002 if (!maybe_obj->ToObject(&obj)) return false; |
3007 } | 3003 } |
3008 set_number_string_cache(FixedArray::cast(obj)); | 3004 set_number_string_cache(FixedArray::cast(obj)); |
3009 | 3005 |
3010 // Allocate cache for single character one byte strings. | 3006 // Allocate cache for single character one byte strings. |
3011 { MaybeObject* maybe_obj = | 3007 { MaybeObject* maybe_obj = |
3012 AllocateFixedArray(String::kMaxOneByteCharCode + 1, TENURED); | 3008 AllocateFixedArray(String::kMaxOneByteCharCode + 1, TENURED); |
(...skipping 3160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6173 if (!CreateInitialMaps()) return false; | 6169 if (!CreateInitialMaps()) return false; |
6174 if (!CreateApiObjects()) return false; | 6170 if (!CreateApiObjects()) return false; |
6175 | 6171 |
6176 // Create initial objects | 6172 // Create initial objects |
6177 if (!CreateInitialObjects()) return false; | 6173 if (!CreateInitialObjects()) return false; |
6178 | 6174 |
6179 native_contexts_list_ = undefined_value(); | 6175 native_contexts_list_ = undefined_value(); |
6180 array_buffers_list_ = undefined_value(); | 6176 array_buffers_list_ = undefined_value(); |
6181 allocation_sites_list_ = undefined_value(); | 6177 allocation_sites_list_ = undefined_value(); |
6182 weak_object_to_code_table_ = undefined_value(); | 6178 weak_object_to_code_table_ = undefined_value(); |
| 6179 |
| 6180 HandleScope scope(isolate()); |
| 6181 Runtime::InitializeIntrinsicFunctionNames( |
| 6182 isolate(), handle(intrinsic_function_names(), isolate())); |
| 6183 |
6183 return true; | 6184 return true; |
6184 } | 6185 } |
6185 | 6186 |
6186 | 6187 |
6187 void Heap::SetStackLimits() { | 6188 void Heap::SetStackLimits() { |
6188 ASSERT(isolate_ != NULL); | 6189 ASSERT(isolate_ != NULL); |
6189 ASSERT(isolate_ == isolate()); | 6190 ASSERT(isolate_ == isolate()); |
6190 // On 64 bit machines, pointers are generally out of range of Smis. We write | 6191 // On 64 bit machines, pointers are generally out of range of Smis. We write |
6191 // something that looks like an out of range Smi to the GC. | 6192 // something that looks like an out of range Smi to the GC. |
6192 | 6193 |
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7356 static_cast<int>(object_sizes_last_time_[index])); | 7357 static_cast<int>(object_sizes_last_time_[index])); |
7357 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7358 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
7358 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7359 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7359 | 7360 |
7360 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7361 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7361 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7362 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7362 ClearObjectStats(); | 7363 ClearObjectStats(); |
7363 } | 7364 } |
7364 | 7365 |
7365 } } // namespace v8::internal | 7366 } } // namespace v8::internal |
OLD | NEW |