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>
// 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>
......
......@@ -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;
......
......@@ -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),
......
......@@ -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_;
......
......@@ -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)
};
......
......@@ -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);
};
......
......@@ -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; }
......
......@@ -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_;
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
};
......
......@@ -612,7 +612,7 @@ class UnlinkWeakNextScope {
private:
HeapObject* object_;
Object* next_;
DisallowHeapAllocation no_gc_;
DISALLOW_HEAP_ALLOCATION(no_gc_);
};
template <class AllocatorT>
......
......@@ -57,7 +57,7 @@ class StartupSerializer : public Serializer<> {
}
private:
DisallowHeapAllocation no_allocation_;
DISALLOW_HEAP_ALLOCATION(no_allocation_);
HeapObjectToIndexHashMap map_;
int next_index_;
......
......@@ -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() {
......
......@@ -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
......
......@@ -205,7 +205,7 @@ class IncrementalStringBuilder {
private:
DestChar* start_;
DestChar* cursor_;
DisallowHeapAllocation no_gc_;
DISALLOW_HEAP_ALLOCATION(no_gc_);
};
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