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 2861017: [Isolates] Make statics from BootstrapperActive to be instance members (Closed)
Patch Set: Created 10 years, 6 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
« no previous file with comments | « src/execution.cc ('k') | src/ia32/codegen-ia32.cc » ('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 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 context->global()->global_context()->jsfunction_result_caches(); 539 context->global()->global_context()->jsfunction_result_caches();
540 int length = caches->length(); 540 int length = caches->length();
541 for (int i = 0; i < length; i++) { 541 for (int i = 0; i < length; i++) {
542 JSFunctionResultCache::cast(caches->get(i))->Clear(); 542 JSFunctionResultCache::cast(caches->get(i))->Clear();
543 } 543 }
544 } 544 }
545 }; 545 };
546 546
547 547
548 void Heap::ClearJSFunctionResultCaches() { 548 void Heap::ClearJSFunctionResultCaches() {
549 if (Bootstrapper::IsActive()) return; 549 if (isolate_->bootstrapper()->IsActive()) return;
550 ClearThreadJSFunctionResultCachesVisitor visitor; 550 ClearThreadJSFunctionResultCachesVisitor visitor;
551 ThreadManager::IterateArchivedThreads(&visitor); 551 ThreadManager::IterateArchivedThreads(&visitor);
552 } 552 }
553 553
554 554
555 #ifdef DEBUG 555 #ifdef DEBUG
556 556
557 enum PageWatermarkValidity { 557 enum PageWatermarkValidity {
558 ALL_VALID, 558 ALL_VALID,
559 ALL_INVALID 559 ALL_INVALID
(...skipping 4124 matching lines...) Expand 10 before | Expand all | Expand 10 after
4684 4684
4685 4685
4686 void DescriptorLookupCache::Clear() { 4686 void DescriptorLookupCache::Clear() {
4687 for (int index = 0; index < kLength; index++) keys_[index].array = NULL; 4687 for (int index = 0; index < kLength; index++) keys_[index].array = NULL;
4688 } 4688 }
4689 4689
4690 4690
4691 #ifdef DEBUG 4691 #ifdef DEBUG
4692 bool Heap::GarbageCollectionGreedyCheck() { 4692 bool Heap::GarbageCollectionGreedyCheck() {
4693 ASSERT(FLAG_gc_greedy); 4693 ASSERT(FLAG_gc_greedy);
4694 if (Bootstrapper::IsActive()) return true; 4694 if (isolate_->bootstrapper()->IsActive()) return true;
4695 if (disallow_allocation_failure()) return true; 4695 if (disallow_allocation_failure()) return true;
4696 return CollectGarbage(0, NEW_SPACE); 4696 return CollectGarbage(0, NEW_SPACE);
4697 } 4697 }
4698 #endif 4698 #endif
4699 4699
4700 4700
4701 TranscendentalCache::SubCache::SubCache(Type t) 4701 TranscendentalCache::SubCache::SubCache(Type t)
4702 : type_(t), 4702 : type_(t),
4703 heap_(HEAP) { 4703 heap_(HEAP) {
4704 uint32_t in0 = 0xffffffffu; // Bit-pattern for a NaN that isn't 4704 uint32_t in0 = 0xffffffffu; // Bit-pattern for a NaN that isn't
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
4746 void ExternalStringTable::TearDown() { 4746 void ExternalStringTable::TearDown() {
4747 new_space_strings_.Free(); 4747 new_space_strings_.Free();
4748 old_space_strings_.Free(); 4748 old_space_strings_.Free();
4749 } 4749 }
4750 4750
4751 4751
4752 List<Object*> ExternalStringTable::new_space_strings_; 4752 List<Object*> ExternalStringTable::new_space_strings_;
4753 List<Object*> ExternalStringTable::old_space_strings_; 4753 List<Object*> ExternalStringTable::old_space_strings_;
4754 4754
4755 } } // namespace v8::internal 4755 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698