Commit 6b0bdcdb authored by Florian Sattler's avatar Florian Sattler Committed by Commit Bot

[gc] Remove empty no track gc members for release builds.

Change-Id: Ic8fe43e65fddec16b3c5c029acebda5ba1805e08
Reviewed-on: https://chromium-review.googlesource.com/c/1275812Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#56671}
parent 16f1d16c
...@@ -112,6 +112,11 @@ typedef PerThreadAssertScopeDebugOnly<HANDLE_ALLOCATION_ASSERT, true> ...@@ -112,6 +112,11 @@ typedef PerThreadAssertScopeDebugOnly<HANDLE_ALLOCATION_ASSERT, true>
// Scope to document where we do not expect any allocation and GC. // Scope to document where we do not expect any allocation and GC.
typedef PerThreadAssertScopeDebugOnly<HEAP_ALLOCATION_ASSERT, false> typedef PerThreadAssertScopeDebugOnly<HEAP_ALLOCATION_ASSERT, false>
DisallowHeapAllocation; DisallowHeapAllocation;
#ifdef DEBUG
#define DISALLOW_HEAP_ALLOCATION(name) DisallowHeapAllocation name
#else
#define DISALLOW_HEAP_ALLOCATION(name)
#endif
// Scope to introduce an exception to DisallowHeapAllocation. // Scope to introduce an exception to DisallowHeapAllocation.
typedef PerThreadAssertScopeDebugOnly<HEAP_ALLOCATION_ASSERT, true> typedef PerThreadAssertScopeDebugOnly<HEAP_ALLOCATION_ASSERT, true>
......
...@@ -110,7 +110,7 @@ class V8_EXPORT_PRIVATE HandlerTable { ...@@ -110,7 +110,7 @@ class V8_EXPORT_PRIVATE HandlerTable {
// the GC heap (either {ByteArray} or {Code}) and hence would become stale // the GC heap (either {ByteArray} or {Code}) and hence would become stale
// during a collection. Hence we disallow any allocation. // during a collection. Hence we disallow any allocation.
Address raw_encoded_data_; Address raw_encoded_data_;
DisallowHeapAllocation no_gc_; DISALLOW_HEAP_ALLOCATION(no_gc_);
// Layout description for handler table based on ranges. // Layout description for handler table based on ranges.
static const int kRangeStartIndex = 0; static const int kRangeStartIndex = 0;
......
...@@ -5036,8 +5036,7 @@ class UnreachableObjectsFilter : public HeapObjectsFilter { ...@@ -5036,8 +5036,7 @@ class UnreachableObjectsFilter : public HeapObjectsFilter {
HeapIterator::HeapIterator(Heap* heap, HeapIterator::HeapIterator(Heap* heap,
HeapIterator::HeapObjectsFiltering filtering) HeapIterator::HeapObjectsFiltering filtering)
: no_heap_allocation_(), : heap_(heap),
heap_(heap),
filtering_(filtering), filtering_(filtering),
filter_(nullptr), filter_(nullptr),
space_iterator_(nullptr), space_iterator_(nullptr),
......
...@@ -2130,7 +2130,7 @@ class CodePageMemoryModificationScope { ...@@ -2130,7 +2130,7 @@ class CodePageMemoryModificationScope {
// Disallow any GCs inside this scope, as a relocation of the underlying // Disallow any GCs inside this scope, as a relocation of the underlying
// object would change the {MemoryChunk} that this scope targets. // object would change the {MemoryChunk} that this scope targets.
DisallowHeapAllocation no_heap_allocation_; DISALLOW_HEAP_ALLOCATION(no_heap_allocation_);
}; };
// Visitor class to verify interior pointers in spaces that do not contain // Visitor class to verify interior pointers in spaces that do not contain
...@@ -2221,7 +2221,7 @@ class HeapIterator { ...@@ -2221,7 +2221,7 @@ class HeapIterator {
private: private:
HeapObject* NextObject(); HeapObject* NextObject();
DisallowHeapAllocation no_heap_allocation_; DISALLOW_HEAP_ALLOCATION(no_heap_allocation_);
Heap* heap_; Heap* heap_;
HeapObjectsFiltering filtering_; HeapObjectsFiltering filtering_;
......
...@@ -364,7 +364,7 @@ class Code : public HeapObject, public NeverReadOnlySpaceObject { ...@@ -364,7 +364,7 @@ class Code : public HeapObject, public NeverReadOnlySpaceObject {
Code* current_code_; Code* current_code_;
Isolate* isolate_; Isolate* isolate_;
DisallowHeapAllocation no_gc; DISALLOW_HEAP_ALLOCATION(no_gc);
DISALLOW_COPY_AND_ASSIGN(OptimizedCodeIterator) DISALLOW_COPY_AND_ASSIGN(OptimizedCodeIterator)
}; };
......
...@@ -568,7 +568,7 @@ class SharedFunctionInfo : public HeapObject, public NeverReadOnlySpaceObject { ...@@ -568,7 +568,7 @@ class SharedFunctionInfo : public HeapObject, public NeverReadOnlySpaceObject {
Script::Iterator script_iterator_; Script::Iterator script_iterator_;
WeakArrayList::Iterator noscript_sfi_iterator_; WeakArrayList::Iterator noscript_sfi_iterator_;
SharedFunctionInfo::ScriptIterator sfi_iterator_; SharedFunctionInfo::ScriptIterator sfi_iterator_;
DisallowHeapAllocation no_gc_; DISALLOW_HEAP_ALLOCATION(no_gc_);
DISALLOW_COPY_AND_ASSIGN(GlobalIterator); DISALLOW_COPY_AND_ASSIGN(GlobalIterator);
}; };
......
...@@ -85,7 +85,7 @@ class BaseConsumedPreParsedScopeData : public ConsumedPreParsedScopeData { ...@@ -85,7 +85,7 @@ class BaseConsumedPreParsedScopeData : public ConsumedPreParsedScopeData {
private: private:
ByteData* consumed_data_; ByteData* consumed_data_;
DisallowHeapAllocation no_gc; DISALLOW_HEAP_ALLOCATION(no_gc);
}; };
void SetPosition(int position) { index_ = position; } void SetPosition(int position) { index_ = position; }
......
...@@ -154,7 +154,7 @@ class SafepointTable { ...@@ -154,7 +154,7 @@ class SafepointTable {
static void PrintBits(std::ostream& os, // NOLINT static void PrintBits(std::ostream& os, // NOLINT
uint8_t byte, int digits); uint8_t byte, int digits);
DisallowHeapAllocation no_allocation_; DISALLOW_HEAP_ALLOCATION(no_allocation_);
Address instruction_start_; Address instruction_start_;
uint32_t stack_slots_; uint32_t stack_slots_;
unsigned length_; unsigned length_;
......
...@@ -79,7 +79,7 @@ class CodeSerializer : public Serializer<> { ...@@ -79,7 +79,7 @@ class CodeSerializer : public Serializer<> {
bool SerializeReadOnlyObject(HeapObject* obj, HowToCode how_to_code, bool SerializeReadOnlyObject(HeapObject* obj, HowToCode how_to_code,
WhereToPoint where_to_point, int skip); WhereToPoint where_to_point, int skip);
DisallowHeapAllocation no_gc_; DISALLOW_HEAP_ALLOCATION(no_gc_);
uint32_t source_hash_; uint32_t source_hash_;
std::vector<uint32_t> stub_keys_; std::vector<uint32_t> stub_keys_;
DISALLOW_COPY_AND_ASSIGN(CodeSerializer); DISALLOW_COPY_AND_ASSIGN(CodeSerializer);
......
...@@ -190,7 +190,7 @@ class StringTableInsertionKey : public StringTableKey { ...@@ -190,7 +190,7 @@ class StringTableInsertionKey : public StringTableKey {
uint32_t ComputeHashField(String* string); uint32_t ComputeHashField(String* string);
String* string_; String* string_;
DisallowHeapAllocation no_gc; DISALLOW_HEAP_ALLOCATION(no_gc);
}; };
} // namespace internal } // namespace internal
......
...@@ -156,7 +156,7 @@ class SerializerReferenceMap ...@@ -156,7 +156,7 @@ class SerializerReferenceMap
public: public:
typedef base::TemplateHashMapEntry<uintptr_t, SerializerReference> Entry; typedef base::TemplateHashMapEntry<uintptr_t, SerializerReference> Entry;
SerializerReferenceMap() : no_allocation_(), attached_reference_index_(0) {} SerializerReferenceMap() : attached_reference_index_(0) {}
SerializerReference LookupReference(void* value) const { SerializerReference LookupReference(void* value) const {
uintptr_t key = Key(value); uintptr_t key = Key(value);
...@@ -186,7 +186,7 @@ class SerializerReferenceMap ...@@ -186,7 +186,7 @@ class SerializerReferenceMap
static uint32_t Hash(uintptr_t key) { return static_cast<uint32_t>(key); } static uint32_t Hash(uintptr_t key) { return static_cast<uint32_t>(key); }
DisallowHeapAllocation no_allocation_; DISALLOW_HEAP_ALLOCATION(no_allocation_);
int attached_reference_index_; int attached_reference_index_;
DISALLOW_COPY_AND_ASSIGN(SerializerReferenceMap); DISALLOW_COPY_AND_ASSIGN(SerializerReferenceMap);
}; };
......
...@@ -612,7 +612,7 @@ class UnlinkWeakNextScope { ...@@ -612,7 +612,7 @@ class UnlinkWeakNextScope {
private: private:
HeapObject* object_; HeapObject* object_;
Object* next_; Object* next_;
DisallowHeapAllocation no_gc_; DISALLOW_HEAP_ALLOCATION(no_gc_);
}; };
template <class AllocatorT> template <class AllocatorT>
......
...@@ -57,7 +57,7 @@ class StartupSerializer : public Serializer<> { ...@@ -57,7 +57,7 @@ class StartupSerializer : public Serializer<> {
} }
private: private:
DisallowHeapAllocation no_allocation_; DISALLOW_HEAP_ALLOCATION(no_allocation_);
HeapObjectToIndexHashMap map_; HeapObjectToIndexHashMap map_;
int next_index_; int next_index_;
......
...@@ -198,16 +198,20 @@ SourcePositionTableIterator::SourcePositionTableIterator( ...@@ -198,16 +198,20 @@ SourcePositionTableIterator::SourcePositionTableIterator(
Handle<ByteArray> byte_array) Handle<ByteArray> byte_array)
: table_(byte_array) { : table_(byte_array) {
Advance(); Advance();
#ifdef DEBUG
// We can enable allocation because we keep the table in a handle. // We can enable allocation because we keep the table in a handle.
no_gc.Release(); no_gc.Release();
#endif // DEBUG
} }
SourcePositionTableIterator::SourcePositionTableIterator( SourcePositionTableIterator::SourcePositionTableIterator(
Vector<const byte> bytes) Vector<const byte> bytes)
: raw_table_(bytes) { : raw_table_(bytes) {
Advance(); Advance();
#ifdef DEBUG
// We can enable allocation because the underlying vector does not move. // We can enable allocation because the underlying vector does not move.
no_gc.Release(); no_gc.Release();
#endif // DEBUG
} }
void SourcePositionTableIterator::Advance() { void SourcePositionTableIterator::Advance() {
......
...@@ -111,7 +111,7 @@ class V8_EXPORT_PRIVATE SourcePositionTableIterator { ...@@ -111,7 +111,7 @@ class V8_EXPORT_PRIVATE SourcePositionTableIterator {
Handle<ByteArray> table_; Handle<ByteArray> table_;
int index_ = 0; int index_ = 0;
PositionTableEntry current_; PositionTableEntry current_;
DisallowHeapAllocation no_gc; DISALLOW_HEAP_ALLOCATION(no_gc);
}; };
} // namespace internal } // namespace internal
......
...@@ -205,7 +205,7 @@ class IncrementalStringBuilder { ...@@ -205,7 +205,7 @@ class IncrementalStringBuilder {
private: private:
DestChar* start_; DestChar* start_;
DestChar* cursor_; DestChar* cursor_;
DisallowHeapAllocation no_gc_; DISALLOW_HEAP_ALLOCATION(no_gc_);
}; };
template <typename DestChar> template <typename DestChar>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment