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 3245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3256 }; | 3256 }; |
3257 | 3257 |
3258 for (unsigned int i = 0; i < ARRAY_SIZE(writable_roots); i++) { | 3258 for (unsigned int i = 0; i < ARRAY_SIZE(writable_roots); i++) { |
3259 if (root_index == writable_roots[i]) | 3259 if (root_index == writable_roots[i]) |
3260 return true; | 3260 return true; |
3261 } | 3261 } |
3262 return false; | 3262 return false; |
3263 } | 3263 } |
3264 | 3264 |
3265 | 3265 |
| 3266 bool Heap::RootCanBeTreatedAsConstant(RootListIndex root_index) { |
| 3267 return !RootCanBeWrittenAfterInitialization(root_index) && |
| 3268 !InNewSpace(roots_array_start()[root_index]); |
| 3269 } |
| 3270 |
| 3271 |
3266 Object* RegExpResultsCache::Lookup(Heap* heap, | 3272 Object* RegExpResultsCache::Lookup(Heap* heap, |
3267 String* key_string, | 3273 String* key_string, |
3268 Object* key_pattern, | 3274 Object* key_pattern, |
3269 ResultsCacheType type) { | 3275 ResultsCacheType type) { |
3270 FixedArray* cache; | 3276 FixedArray* cache; |
3271 if (!key_string->IsInternalizedString()) return Smi::FromInt(0); | 3277 if (!key_string->IsInternalizedString()) return Smi::FromInt(0); |
3272 if (type == STRING_SPLIT_SUBSTRINGS) { | 3278 if (type == STRING_SPLIT_SUBSTRINGS) { |
3273 ASSERT(key_pattern->IsString()); | 3279 ASSERT(key_pattern->IsString()); |
3274 if (!key_pattern->IsInternalizedString()) return Smi::FromInt(0); | 3280 if (!key_pattern->IsInternalizedString()) return Smi::FromInt(0); |
3275 cache = heap->string_split_cache(); | 3281 cache = heap->string_split_cache(); |
(...skipping 4763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8039 if (FLAG_parallel_recompilation) { | 8045 if (FLAG_parallel_recompilation) { |
8040 heap_->relocation_mutex_->Lock(); | 8046 heap_->relocation_mutex_->Lock(); |
8041 #ifdef DEBUG | 8047 #ifdef DEBUG |
8042 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 8048 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
8043 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 8049 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
8044 #endif // DEBUG | 8050 #endif // DEBUG |
8045 } | 8051 } |
8046 } | 8052 } |
8047 | 8053 |
8048 } } // namespace v8::internal | 8054 } } // namespace v8::internal |
OLD | NEW |