OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2242 ThreadManager::IterateArchivedThreads(&threadvisitor); | 2242 ThreadManager::IterateArchivedThreads(&threadvisitor); |
2243 if (threadvisitor.FoundCode()) return; | 2243 if (threadvisitor.FoundCode()) return; |
2244 | 2244 |
2245 HandleScope scope; | 2245 HandleScope scope; |
2246 // Compute the lazy compilable version of the code. | 2246 // Compute the lazy compilable version of the code. |
2247 function_info->set_code(*ComputeLazyCompile(function_info->length())); | 2247 function_info->set_code(*ComputeLazyCompile(function_info->length())); |
2248 } | 2248 } |
2249 | 2249 |
2250 | 2250 |
2251 void Heap::FlushCode() { | 2251 void Heap::FlushCode() { |
| 2252 #ifdef ENABLE_DEBUGGER_SUPPORT |
2252 // Do not flush code if the debugger is loaded or there are breakpoints. | 2253 // Do not flush code if the debugger is loaded or there are breakpoints. |
2253 if (Debug::IsLoaded() || Debug::has_break_points()) return; | 2254 if (Debug::IsLoaded() || Debug::has_break_points()) return; |
| 2255 #endif |
2254 HeapObjectIterator it(old_pointer_space()); | 2256 HeapObjectIterator it(old_pointer_space()); |
2255 for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) { | 2257 for (HeapObject* obj = it.next(); obj != NULL; obj = it.next()) { |
2256 if (obj->IsJSFunction()) { | 2258 if (obj->IsJSFunction()) { |
2257 JSFunction* jsfunction = JSFunction::cast(obj); | 2259 JSFunction* jsfunction = JSFunction::cast(obj); |
2258 | 2260 |
2259 // The function must have a valid context and not be a builtin. | 2261 // The function must have a valid context and not be a builtin. |
2260 if (jsfunction->unchecked_context()->IsContext() && | 2262 if (jsfunction->unchecked_context()->IsContext() && |
2261 !jsfunction->IsBuiltin()) { | 2263 !jsfunction->IsBuiltin()) { |
2262 FlushCodeForFunction(jsfunction->shared()); | 2264 FlushCodeForFunction(jsfunction->shared()); |
2263 } | 2265 } |
(...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4736 void ExternalStringTable::TearDown() { | 4738 void ExternalStringTable::TearDown() { |
4737 new_space_strings_.Free(); | 4739 new_space_strings_.Free(); |
4738 old_space_strings_.Free(); | 4740 old_space_strings_.Free(); |
4739 } | 4741 } |
4740 | 4742 |
4741 | 4743 |
4742 List<Object*> ExternalStringTable::new_space_strings_; | 4744 List<Object*> ExternalStringTable::new_space_strings_; |
4743 List<Object*> ExternalStringTable::old_space_strings_; | 4745 List<Object*> ExternalStringTable::old_space_strings_; |
4744 | 4746 |
4745 } } // namespace v8::internal | 4747 } } // namespace v8::internal |
OLD | NEW |