Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/heap.cc

Issue 3134027: Reapplying r5147 (caching maps for slow case objects).... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/heap.h ('k') | src/ic.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 }; 564 };
565 565
566 566
567 void Heap::ClearJSFunctionResultCaches() { 567 void Heap::ClearJSFunctionResultCaches() {
568 if (Bootstrapper::IsActive()) return; 568 if (Bootstrapper::IsActive()) return;
569 ClearThreadJSFunctionResultCachesVisitor visitor; 569 ClearThreadJSFunctionResultCachesVisitor visitor;
570 ThreadManager::IterateArchivedThreads(&visitor); 570 ThreadManager::IterateArchivedThreads(&visitor);
571 } 571 }
572 572
573 573
574 class ClearThreadNormalizedMapCachesVisitor: public ThreadVisitor {
575 virtual void VisitThread(ThreadLocalTop* top) {
576 Context* context = top->context_;
577 if (context == NULL) return;
578 context->global()->global_context()->normalized_map_cache()->Clear();
579 }
580 };
581
582
583 void Heap::ClearNormalizedMapCaches() {
584 if (Bootstrapper::IsActive()) return;
585 ClearThreadNormalizedMapCachesVisitor visitor;
586 ThreadManager::IterateArchivedThreads(&visitor);
587 }
588
589
574 #ifdef DEBUG 590 #ifdef DEBUG
575 591
576 enum PageWatermarkValidity { 592 enum PageWatermarkValidity {
577 ALL_VALID, 593 ALL_VALID,
578 ALL_INVALID 594 ALL_INVALID
579 }; 595 };
580 596
581 static void VerifyPageWatermarkValidity(PagedSpace* space, 597 static void VerifyPageWatermarkValidity(PagedSpace* space,
582 PageWatermarkValidity validity) { 598 PageWatermarkValidity validity) {
583 PageIterator it(space, PageIterator::PAGES_IN_USE); 599 PageIterator it(space, PageIterator::PAGES_IN_USE);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 DescriptorLookupCache::Clear(); 764 DescriptorLookupCache::Clear();
749 765
750 CompilationCache::MarkCompactPrologue(); 766 CompilationCache::MarkCompactPrologue();
751 767
752 Top::MarkCompactPrologue(is_compacting); 768 Top::MarkCompactPrologue(is_compacting);
753 ThreadManager::MarkCompactPrologue(is_compacting); 769 ThreadManager::MarkCompactPrologue(is_compacting);
754 770
755 CompletelyClearInstanceofCache(); 771 CompletelyClearInstanceofCache();
756 772
757 if (is_compacting) FlushNumberStringCache(); 773 if (is_compacting) FlushNumberStringCache();
774
775 ClearNormalizedMapCaches();
758 } 776 }
759 777
760 778
761 void Heap::MarkCompactEpilogue(bool is_compacting) { 779 void Heap::MarkCompactEpilogue(bool is_compacting) {
762 Top::MarkCompactEpilogue(is_compacting); 780 Top::MarkCompactEpilogue(is_compacting);
763 ThreadManager::MarkCompactEpilogue(is_compacting); 781 ThreadManager::MarkCompactEpilogue(is_compacting);
764 } 782 }
765 783
766 784
767 Object* Heap::FindCodeObject(Address a) { 785 Object* Heap::FindCodeObject(Address a) {
(...skipping 4091 matching lines...) Expand 10 before | Expand all | Expand 10 after
4859 void ExternalStringTable::TearDown() { 4877 void ExternalStringTable::TearDown() {
4860 new_space_strings_.Free(); 4878 new_space_strings_.Free();
4861 old_space_strings_.Free(); 4879 old_space_strings_.Free();
4862 } 4880 }
4863 4881
4864 4882
4865 List<Object*> ExternalStringTable::new_space_strings_; 4883 List<Object*> ExternalStringTable::new_space_strings_;
4866 List<Object*> ExternalStringTable::old_space_strings_; 4884 List<Object*> ExternalStringTable::old_space_strings_;
4867 4885
4868 } } // namespace v8::internal 4886 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698