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

Side by Side Diff: src/heap-inl.h

Issue 104023011: Introduce kGCCallbackForced flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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
OLDNEW
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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 515
516 UpdateAllocationSiteFeedback(object); 516 UpdateAllocationSiteFeedback(object);
517 517
518 // AllocationMementos are unrooted and shouldn't survive a scavenge 518 // AllocationMementos are unrooted and shouldn't survive a scavenge
519 ASSERT(object->map() != object->GetHeap()->allocation_memento_map()); 519 ASSERT(object->map() != object->GetHeap()->allocation_memento_map());
520 // Call the slow part of scavenge object. 520 // Call the slow part of scavenge object.
521 return ScavengeObjectSlow(p, object); 521 return ScavengeObjectSlow(p, object);
522 } 522 }
523 523
524 524
525 bool Heap::CollectGarbage(AllocationSpace space, const char* gc_reason) { 525 bool Heap::CollectGarbage(AllocationSpace space,
526 const char* gc_reason,
527 const v8::GCCallbackFlags callbackFlags) {
526 const char* collector_reason = NULL; 528 const char* collector_reason = NULL;
527 GarbageCollector collector = SelectGarbageCollector(space, &collector_reason); 529 GarbageCollector collector = SelectGarbageCollector(space, &collector_reason);
528 return CollectGarbage(space, collector, gc_reason, collector_reason); 530 return CollectGarbage(
531 space, collector, gc_reason, collector_reason, callbackFlags);
529 } 532 }
530 533
531 534
532 MaybeObject* Heap::PrepareForCompare(String* str) { 535 MaybeObject* Heap::PrepareForCompare(String* str) {
533 // Always flatten small strings and force flattening of long strings 536 // Always flatten small strings and force flattening of long strings
534 // after we have accumulated a certain amount we failed to flatten. 537 // after we have accumulated a certain amount we failed to flatten.
535 static const int kMaxAlwaysFlattenLength = 32; 538 static const int kMaxAlwaysFlattenLength = 32;
536 static const int kFlattenLongThreshold = 16*KB; 539 static const int kFlattenLongThreshold = 16*KB;
537 540
538 const int length = str->length(); 541 const int length = str->length();
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 #ifdef DEBUG 861 #ifdef DEBUG
859 Isolate* isolate = Isolate::Current(); 862 Isolate* isolate = Isolate::Current();
860 isolate->heap()->disallow_allocation_failure_ = old_state_; 863 isolate->heap()->disallow_allocation_failure_ = old_state_;
861 #endif 864 #endif
862 } 865 }
863 866
864 867
865 } } // namespace v8::internal 868 } } // namespace v8::internal
866 869
867 #endif // V8_HEAP_INL_H_ 870 #endif // V8_HEAP_INL_H_
OLDNEW
« include/v8.h ('K') | « src/heap.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698