Commit e2b6fa84 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

Rename SYNCHRONIZED_ACCESSORS* to RELEASE_ACQUIRE_ACCESSORS*

... so that they match the corresponding DECL_* macros.

Change-Id: Idb26901eeb1219945a1e701dd7c28a58ce978bf9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2449977Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70322}
parent 6e621f84
...@@ -177,18 +177,18 @@ INT_ACCESSORS(Code, code_comments_offset, kCodeCommentsOffsetOffset) ...@@ -177,18 +177,18 @@ INT_ACCESSORS(Code, code_comments_offset, kCodeCommentsOffsetOffset)
#define CODE_ACCESSORS(name, type, offset) \ #define CODE_ACCESSORS(name, type, offset) \
ACCESSORS_CHECKED2(Code, name, type, offset, true, \ ACCESSORS_CHECKED2(Code, name, type, offset, true, \
!ObjectInYoungGeneration(value)) !ObjectInYoungGeneration(value))
#define SYNCHRONIZED_CODE_ACCESSORS(name, type, offset) \ #define RELEASE_ACQUIRE_CODE_ACCESSORS(name, type, offset) \
SYNCHRONIZED_ACCESSORS_CHECKED2(Code, name, type, offset, true, \ RELEASE_ACQUIRE_ACCESSORS_CHECKED2(Code, name, type, offset, true, \
!ObjectInYoungGeneration(value)) !ObjectInYoungGeneration(value))
CODE_ACCESSORS(relocation_info, ByteArray, kRelocationInfoOffset) CODE_ACCESSORS(relocation_info, ByteArray, kRelocationInfoOffset)
CODE_ACCESSORS(deoptimization_data, FixedArray, kDeoptimizationDataOffset) CODE_ACCESSORS(deoptimization_data, FixedArray, kDeoptimizationDataOffset)
CODE_ACCESSORS(source_position_table, Object, kSourcePositionTableOffset) CODE_ACCESSORS(source_position_table, Object, kSourcePositionTableOffset)
// Concurrent marker needs to access kind specific flags in code data container. // Concurrent marker needs to access kind specific flags in code data container.
SYNCHRONIZED_CODE_ACCESSORS(code_data_container, CodeDataContainer, RELEASE_ACQUIRE_CODE_ACCESSORS(code_data_container, CodeDataContainer,
kCodeDataContainerOffset) kCodeDataContainerOffset)
#undef CODE_ACCESSORS #undef CODE_ACCESSORS
#undef SYNCHRONIZED_CODE_ACCESSORS #undef RELEASE_ACQUIRE_CODE_ACCESSORS
void Code::WipeOutHeader() { void Code::WipeOutHeader() {
WRITE_FIELD(*this, kRelocationInfoOffset, Smi::FromInt(0)); WRITE_FIELD(*this, kRelocationInfoOffset, Smi::FromInt(0));
...@@ -701,8 +701,8 @@ int32_t BytecodeArray::parameter_count() const { ...@@ -701,8 +701,8 @@ int32_t BytecodeArray::parameter_count() const {
ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset) ACCESSORS(BytecodeArray, constant_pool, FixedArray, kConstantPoolOffset)
ACCESSORS(BytecodeArray, handler_table, ByteArray, kHandlerTableOffset) ACCESSORS(BytecodeArray, handler_table, ByteArray, kHandlerTableOffset)
SYNCHRONIZED_ACCESSORS(BytecodeArray, source_position_table, Object, RELEASE_ACQUIRE_ACCESSORS(BytecodeArray, source_position_table, Object,
kSourcePositionTableOffset) kSourcePositionTableOffset)
void BytecodeArray::clear_padding() { void BytecodeArray::clear_padding() {
int data_size = kHeaderSize + length(); int data_size = kHeaderSize + length();
......
...@@ -34,16 +34,16 @@ CAST_ACCESSOR(Map) ...@@ -34,16 +34,16 @@ CAST_ACCESSOR(Map)
RELAXED_ACCESSORS(Map, instance_descriptors, DescriptorArray, RELAXED_ACCESSORS(Map, instance_descriptors, DescriptorArray,
kInstanceDescriptorsOffset) kInstanceDescriptorsOffset)
SYNCHRONIZED_ACCESSORS(Map, instance_descriptors, DescriptorArray, RELEASE_ACQUIRE_ACCESSORS(Map, instance_descriptors, DescriptorArray,
kInstanceDescriptorsOffset) kInstanceDescriptorsOffset)
// A freshly allocated layout descriptor can be set on an existing map. // A freshly allocated layout descriptor can be set on an existing map.
// We need to use release-store and acquire-load accessor pairs to ensure // We need to use release-store and acquire-load accessor pairs to ensure
// that the concurrent marking thread observes initializing stores of the // that the concurrent marking thread observes initializing stores of the
// layout descriptor. // layout descriptor.
SYNCHRONIZED_ACCESSORS_CHECKED(Map, layout_descriptor, LayoutDescriptor, RELEASE_ACQUIRE_ACCESSORS_CHECKED(Map, layout_descriptor, LayoutDescriptor,
kLayoutDescriptorOffset, kLayoutDescriptorOffset,
FLAG_unbox_double_fields) FLAG_unbox_double_fields)
SYNCHRONIZED_WEAK_ACCESSORS(Map, raw_transitions, SYNCHRONIZED_WEAK_ACCESSORS(Map, raw_transitions,
kTransitionsOrPrototypeInfoOffset) kTransitionsOrPrototypeInfoOffset)
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
#undef ACCESSORS_CHECKED2 #undef ACCESSORS_CHECKED2
#undef ACCESSORS_CHECKED #undef ACCESSORS_CHECKED
#undef ACCESSORS #undef ACCESSORS
#undef SYNCHRONIZED_ACCESSORS_CHECKED2 #undef RELEASE_ACQUIRE_ACCESSORS_CHECKED2
#undef SYNCHRONIZED_ACCESSORS_CHECKED #undef RELEASE_ACQUIRE_ACCESSORS_CHECKED
#undef SYNCHRONIZED_ACCESSORS #undef RELEASE_ACQUIRE_ACCESSORS
#undef WEAK_ACCESSORS_CHECKED2 #undef WEAK_ACCESSORS_CHECKED2
#undef WEAK_ACCESSORS_CHECKED #undef WEAK_ACCESSORS_CHECKED
#undef WEAK_ACCESSORS #undef WEAK_ACCESSORS
......
...@@ -196,8 +196,8 @@ ...@@ -196,8 +196,8 @@
#define RELAXED_ACCESSORS(holder, name, type, offset) \ #define RELAXED_ACCESSORS(holder, name, type, offset) \
RELAXED_ACCESSORS_CHECKED(holder, name, type, offset, true) RELAXED_ACCESSORS_CHECKED(holder, name, type, offset, true)
#define SYNCHRONIZED_ACCESSORS_CHECKED2(holder, name, type, offset, \ #define RELEASE_ACQUIRE_ACCESSORS_CHECKED2(holder, name, type, offset, \
get_condition, set_condition) \ get_condition, set_condition) \
type holder::name(AcquireLoadTag tag) const { \ type holder::name(AcquireLoadTag tag) const { \
const Isolate* isolate = GetIsolateForPtrCompr(*this); \ const Isolate* isolate = GetIsolateForPtrCompr(*this); \
return holder::name(isolate, tag); \ return holder::name(isolate, tag); \
...@@ -214,12 +214,13 @@ ...@@ -214,12 +214,13 @@
CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode); \ CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode); \
} }
#define SYNCHRONIZED_ACCESSORS_CHECKED(holder, name, type, offset, condition) \ #define RELEASE_ACQUIRE_ACCESSORS_CHECKED(holder, name, type, offset, \
SYNCHRONIZED_ACCESSORS_CHECKED2(holder, name, type, offset, condition, \ condition) \
condition) RELEASE_ACQUIRE_ACCESSORS_CHECKED2(holder, name, type, offset, condition, \
condition)
#define SYNCHRONIZED_ACCESSORS(holder, name, type, offset) \ #define RELEASE_ACQUIRE_ACCESSORS(holder, name, type, offset) \
SYNCHRONIZED_ACCESSORS_CHECKED(holder, name, type, offset, true) RELEASE_ACQUIRE_ACCESSORS_CHECKED(holder, name, type, offset, true)
#define WEAK_ACCESSORS_CHECKED2(holder, name, offset, get_condition, \ #define WEAK_ACCESSORS_CHECKED2(holder, name, offset, get_condition, \
set_condition) \ set_condition) \
......
...@@ -97,8 +97,8 @@ NEVER_READ_ONLY_SPACE_IMPL(SharedFunctionInfo) ...@@ -97,8 +97,8 @@ NEVER_READ_ONLY_SPACE_IMPL(SharedFunctionInfo)
CAST_ACCESSOR(SharedFunctionInfo) CAST_ACCESSOR(SharedFunctionInfo)
DEFINE_DEOPT_ELEMENT_ACCESSORS(SharedFunctionInfo, Object) DEFINE_DEOPT_ELEMENT_ACCESSORS(SharedFunctionInfo, Object)
SYNCHRONIZED_ACCESSORS(SharedFunctionInfo, function_data, Object, RELEASE_ACQUIRE_ACCESSORS(SharedFunctionInfo, function_data, Object,
kFunctionDataOffset) kFunctionDataOffset)
ACCESSORS(SharedFunctionInfo, name_or_scope_info, Object, ACCESSORS(SharedFunctionInfo, name_or_scope_info, Object,
kNameOrScopeInfoOffset) kNameOrScopeInfoOffset)
ACCESSORS(SharedFunctionInfo, script_or_debug_info, HeapObject, ACCESSORS(SharedFunctionInfo, script_or_debug_info, HeapObject,
......
...@@ -36,8 +36,8 @@ BOOL_ACCESSORS(FunctionTemplateInfo, flag, do_not_cache, DoNotCacheBit::kShift) ...@@ -36,8 +36,8 @@ BOOL_ACCESSORS(FunctionTemplateInfo, flag, do_not_cache, DoNotCacheBit::kShift)
BOOL_ACCESSORS(FunctionTemplateInfo, flag, accept_any_receiver, BOOL_ACCESSORS(FunctionTemplateInfo, flag, accept_any_receiver,
AcceptAnyReceiverBit::kShift) AcceptAnyReceiverBit::kShift)
SYNCHRONIZED_ACCESSORS(FunctionTemplateInfo, call_code, HeapObject, RELEASE_ACQUIRE_ACCESSORS(FunctionTemplateInfo, call_code, HeapObject,
kCallCodeOffset) kCallCodeOffset)
// static // static
FunctionTemplateRareData FunctionTemplateInfo::EnsureFunctionTemplateRareData( FunctionTemplateRareData FunctionTemplateInfo::EnsureFunctionTemplateRareData(
......
...@@ -619,7 +619,7 @@ def load_fields_from_file(filename): ...@@ -619,7 +619,7 @@ def load_fields_from_file(filename):
# #
prefixes = [ 'ACCESSORS', 'ACCESSORS2', 'ACCESSORS_GCSAFE', prefixes = [ 'ACCESSORS', 'ACCESSORS2', 'ACCESSORS_GCSAFE',
'SMI_ACCESSORS', 'ACCESSORS_TO_SMI', 'SMI_ACCESSORS', 'ACCESSORS_TO_SMI',
'SYNCHRONIZED_ACCESSORS', 'WEAK_ACCESSORS' ]; 'RELEASE_ACQUIRE_ACCESSORS', 'WEAK_ACCESSORS' ];
prefixes += ([ prefix + "_CHECKED" for prefix in prefixes ] + prefixes += ([ prefix + "_CHECKED" for prefix in prefixes ] +
[ prefix + "_CHECKED2" for prefix in prefixes ]) [ prefix + "_CHECKED2" for prefix in prefixes ])
current = ''; current = '';
......
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