| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 // Allocate cache for single character strings. | 1231 // Allocate cache for single character strings. |
| 1232 obj = AllocateFixedArray(String::kMaxAsciiCharCode+1); | 1232 obj = AllocateFixedArray(String::kMaxAsciiCharCode+1); |
| 1233 if (obj->IsFailure()) return false; | 1233 if (obj->IsFailure()) return false; |
| 1234 single_character_string_cache_ = FixedArray::cast(obj); | 1234 single_character_string_cache_ = FixedArray::cast(obj); |
| 1235 | 1235 |
| 1236 // Allocate cache for external strings pointing to native source code. | 1236 // Allocate cache for external strings pointing to native source code. |
| 1237 obj = AllocateFixedArray(Natives::GetBuiltinsCount()); | 1237 obj = AllocateFixedArray(Natives::GetBuiltinsCount()); |
| 1238 if (obj->IsFailure()) return false; | 1238 if (obj->IsFailure()) return false; |
| 1239 natives_source_cache_ = FixedArray::cast(obj); | 1239 natives_source_cache_ = FixedArray::cast(obj); |
| 1240 | 1240 |
| 1241 // Handling of script id generation is in Factory::NewScript. |
| 1242 last_script_id_ = undefined_value(); |
| 1243 |
| 1241 // Initialize keyed lookup cache. | 1244 // Initialize keyed lookup cache. |
| 1242 ClearKeyedLookupCache(); | 1245 ClearKeyedLookupCache(); |
| 1243 | 1246 |
| 1244 // Initialize compilation cache. | 1247 // Initialize compilation cache. |
| 1245 CompilationCache::Clear(); | 1248 CompilationCache::Clear(); |
| 1246 | 1249 |
| 1247 return true; | 1250 return true; |
| 1248 } | 1251 } |
| 1249 | 1252 |
| 1250 | 1253 |
| (...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3330 #ifdef DEBUG | 3333 #ifdef DEBUG |
| 3331 bool Heap::GarbageCollectionGreedyCheck() { | 3334 bool Heap::GarbageCollectionGreedyCheck() { |
| 3332 ASSERT(FLAG_gc_greedy); | 3335 ASSERT(FLAG_gc_greedy); |
| 3333 if (Bootstrapper::IsActive()) return true; | 3336 if (Bootstrapper::IsActive()) return true; |
| 3334 if (disallow_allocation_failure()) return true; | 3337 if (disallow_allocation_failure()) return true; |
| 3335 return CollectGarbage(0, NEW_SPACE); | 3338 return CollectGarbage(0, NEW_SPACE); |
| 3336 } | 3339 } |
| 3337 #endif | 3340 #endif |
| 3338 | 3341 |
| 3339 } } // namespace v8::internal | 3342 } } // namespace v8::internal |
| OLD | NEW |