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

Change-Id: Ic8fe43e65fddec16b3c5c029acebda5ba1805e08
Reviewed-on: https://chromium-review.googlesource.com/c/1275812
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Florian Sattler <sattlerf@google.com>
Cr-Commit-Position: refs/heads/master@{#56671}
This commit is contained in:
Florian Sattler 2018-10-15 10:41:39 +02:00 committed by Commit Bot
parent 16f1d16c5c
commit 6b0bdcdb33
16 changed files with 25 additions and 17 deletions

View File

@ -112,6 +112,11 @@ typedef PerThreadAssertScopeDebugOnly<HANDLE_ALLOCATION_ASSERT, true>
// Scope to document where we do not expect any allocation and GC.
typedef PerThreadAssertScopeDebugOnly<HEAP_ALLOCATION_ASSERT, false>
DisallowHeapAllocation;
#ifdef DEBUG
#define DISALLOW_HEAP_ALLOCATION(name) DisallowHeapAllocation name
#else
#define DISALLOW_HEAP_ALLOCATION(name)
#endif
// Scope to introduce an exception to DisallowHeapAllocation.
typedef PerThreadAssertScopeDebugOnly<HEAP_ALLOCATION_ASSERT, true>

View File

@ -110,7 +110,7 @@ class V8_EXPORT_PRIVATE HandlerTable {
// the GC heap (either {ByteArray} or {Code}) and hence would become stale
// during a collection. Hence we disallow any allocation.
Address raw_encoded_data_;
DisallowHeapAllocation no_gc_;
DISALLOW_HEAP_ALLOCATION(no_gc_);
// Layout description for handler table based on ranges.
static const int kRangeStartIndex = 0;

View File

@ -5036,8 +5036,7 @@ class UnreachableObjectsFilter : public HeapObjectsFilter {
HeapIterator::HeapIterator(Heap* heap,
HeapIterator::HeapObjectsFiltering filtering)
: no_heap_allocation_(),
heap_(heap),
: heap_(heap),
filtering_(filtering),
filter_(nullptr),
space_iterator_(nullptr),

View File

@ -2130,7 +2130,7 @@ class CodePageMemoryModificationScope {
// Disallow any GCs inside this scope, as a relocation of the underlying
// 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
@ -2221,7 +2221,7 @@ class HeapIterator {
private:
HeapObject* NextObject();
DisallowHeapAllocation no_heap_allocation_;
DISALLOW_HEAP_ALLOCATION(no_heap_allocation_);
Heap* heap_;
HeapObjectsFiltering filtering_;

View File

@ -364,7 +364,7 @@ class Code : public HeapObject, public NeverReadOnlySpaceObject {
Code* current_code_;
Isolate* isolate_;
DisallowHeapAllocation no_gc;
DISALLOW_HEAP_ALLOCATION(no_gc);
DISALLOW_COPY_AND_ASSIGN(OptimizedCodeIterator)
};

View File

@ -568,7 +568,7 @@ class SharedFunctionInfo : public HeapObject, public NeverReadOnlySpaceObject {
Script::Iterator script_iterator_;
WeakArrayList::Iterator noscript_sfi_iterator_;
SharedFunctionInfo::ScriptIterator sfi_iterator_;
DisallowHeapAllocation no_gc_;
DISALLOW_HEAP_ALLOCATION(no_gc_);
DISALLOW_COPY_AND_ASSIGN(GlobalIterator);
};

View File

@ -85,7 +85,7 @@ class BaseConsumedPreParsedScopeData : public ConsumedPreParsedScopeData {
private:
ByteData* consumed_data_;
DisallowHeapAllocation no_gc;
DISALLOW_HEAP_ALLOCATION(no_gc);
};
void SetPosition(int position) { index_ = position; }

View File

@ -154,7 +154,7 @@ class SafepointTable {
static void PrintBits(std::ostream& os, // NOLINT
uint8_t byte, int digits);
DisallowHeapAllocation no_allocation_;
DISALLOW_HEAP_ALLOCATION(no_allocation_);
Address instruction_start_;
uint32_t stack_slots_;
unsigned length_;

View File

@ -79,7 +79,7 @@ class CodeSerializer : public Serializer<> {
bool SerializeReadOnlyObject(HeapObject* obj, HowToCode how_to_code,
WhereToPoint where_to_point, int skip);
DisallowHeapAllocation no_gc_;
DISALLOW_HEAP_ALLOCATION(no_gc_);
uint32_t source_hash_;
std::vector<uint32_t> stub_keys_;
DISALLOW_COPY_AND_ASSIGN(CodeSerializer);

View File

@ -190,7 +190,7 @@ class StringTableInsertionKey : public StringTableKey {
uint32_t ComputeHashField(String* string);
String* string_;
DisallowHeapAllocation no_gc;
DISALLOW_HEAP_ALLOCATION(no_gc);
};
} // namespace internal

View File

@ -156,7 +156,7 @@ class SerializerReferenceMap
public:
typedef base::TemplateHashMapEntry<uintptr_t, SerializerReference> Entry;
SerializerReferenceMap() : no_allocation_(), attached_reference_index_(0) {}
SerializerReferenceMap() : attached_reference_index_(0) {}
SerializerReference LookupReference(void* value) const {
uintptr_t key = Key(value);
@ -186,7 +186,7 @@ class SerializerReferenceMap
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_;
DISALLOW_COPY_AND_ASSIGN(SerializerReferenceMap);
};

View File

@ -612,7 +612,7 @@ class UnlinkWeakNextScope {
private:
HeapObject* object_;
Object* next_;
DisallowHeapAllocation no_gc_;
DISALLOW_HEAP_ALLOCATION(no_gc_);
};
template <class AllocatorT>

View File

@ -57,7 +57,7 @@ class StartupSerializer : public Serializer<> {
}
private:
DisallowHeapAllocation no_allocation_;
DISALLOW_HEAP_ALLOCATION(no_allocation_);
HeapObjectToIndexHashMap map_;
int next_index_;

View File

@ -198,16 +198,20 @@ SourcePositionTableIterator::SourcePositionTableIterator(
Handle<ByteArray> byte_array)
: table_(byte_array) {
Advance();
#ifdef DEBUG
// We can enable allocation because we keep the table in a handle.
no_gc.Release();
#endif // DEBUG
}
SourcePositionTableIterator::SourcePositionTableIterator(
Vector<const byte> bytes)
: raw_table_(bytes) {
Advance();
#ifdef DEBUG
// We can enable allocation because the underlying vector does not move.
no_gc.Release();
#endif // DEBUG
}
void SourcePositionTableIterator::Advance() {

View File

@ -111,7 +111,7 @@ class V8_EXPORT_PRIVATE SourcePositionTableIterator {
Handle<ByteArray> table_;
int index_ = 0;
PositionTableEntry current_;
DisallowHeapAllocation no_gc;
DISALLOW_HEAP_ALLOCATION(no_gc);
};
} // namespace internal

View File

@ -205,7 +205,7 @@ class IncrementalStringBuilder {
private:
DestChar* start_;
DestChar* cursor_;
DisallowHeapAllocation no_gc_;
DISALLOW_HEAP_ALLOCATION(no_gc_);
};
template <typename DestChar>