| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 }; | 599 }; |
| 600 | 600 |
| 601 | 601 |
| 602 void Heap::ClearJSFunctionResultCaches() { | 602 void Heap::ClearJSFunctionResultCaches() { |
| 603 if (Bootstrapper::IsActive()) return; | 603 if (Bootstrapper::IsActive()) return; |
| 604 ClearThreadJSFunctionResultCachesVisitor visitor; | 604 ClearThreadJSFunctionResultCachesVisitor visitor; |
| 605 ThreadManager::IterateArchivedThreads(&visitor); | 605 ThreadManager::IterateArchivedThreads(&visitor); |
| 606 } | 606 } |
| 607 | 607 |
| 608 | 608 |
| 609 class ClearThreadNormalizedMapCachesVisitor: public ThreadVisitor { | |
| 610 virtual void VisitThread(ThreadLocalTop* top) { | |
| 611 Context* context = top->context_; | |
| 612 if (context == NULL) return; | |
| 613 context->global()->global_context()->normalized_map_cache()->Clear(); | |
| 614 } | |
| 615 }; | |
| 616 | |
| 617 | |
| 618 void Heap::ClearNormalizedMapCaches() { | 609 void Heap::ClearNormalizedMapCaches() { |
| 619 if (Bootstrapper::IsActive()) return; | 610 if (Bootstrapper::IsActive()) return; |
| 620 ClearThreadNormalizedMapCachesVisitor visitor; | 611 |
| 621 ThreadManager::IterateArchivedThreads(&visitor); | 612 Object* context = global_contexts_list_; |
| 613 while (!context->IsUndefined()) { |
| 614 Context::cast(context)->normalized_map_cache()->Clear(); |
| 615 context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK); |
| 616 } |
| 622 } | 617 } |
| 623 | 618 |
| 624 | 619 |
| 625 #ifdef DEBUG | 620 #ifdef DEBUG |
| 626 | 621 |
| 627 enum PageWatermarkValidity { | 622 enum PageWatermarkValidity { |
| 628 ALL_VALID, | 623 ALL_VALID, |
| 629 ALL_INVALID | 624 ALL_INVALID |
| 630 }; | 625 }; |
| 631 | 626 |
| (...skipping 4394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5026 void ExternalStringTable::TearDown() { | 5021 void ExternalStringTable::TearDown() { |
| 5027 new_space_strings_.Free(); | 5022 new_space_strings_.Free(); |
| 5028 old_space_strings_.Free(); | 5023 old_space_strings_.Free(); |
| 5029 } | 5024 } |
| 5030 | 5025 |
| 5031 | 5026 |
| 5032 List<Object*> ExternalStringTable::new_space_strings_; | 5027 List<Object*> ExternalStringTable::new_space_strings_; |
| 5033 List<Object*> ExternalStringTable::old_space_strings_; | 5028 List<Object*> ExternalStringTable::old_space_strings_; |
| 5034 | 5029 |
| 5035 } } // namespace v8::internal | 5030 } } // namespace v8::internal |
| OLD | NEW |