Commit 4dabba12 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[cleanup] Make SFI::function_data a SYNCHRONIZED_ACCESSOR

We can use existing macros to define this getter/setter rather than hand
writing it -- as a side effect this ends up defining an Isolate overload
of the getter which was otherwise missing.

Bug: v8:10506
Change-Id: I0bc5a3082b5ed0416c8099a94e7d2e32a2bd363f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2199350
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67798}
parent 555324da
...@@ -97,6 +97,8 @@ NEVER_READ_ONLY_SPACE_IMPL(SharedFunctionInfo) ...@@ -97,6 +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,
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,
...@@ -168,15 +170,6 @@ AbstractCode SharedFunctionInfo::abstract_code() { ...@@ -168,15 +170,6 @@ AbstractCode SharedFunctionInfo::abstract_code() {
} }
} }
Object SharedFunctionInfo::function_data() const {
return ACQUIRE_READ_FIELD(*this, kFunctionDataOffset);
}
void SharedFunctionInfo::set_function_data(Object data, WriteBarrierMode mode) {
RELEASE_WRITE_FIELD(*this, kFunctionDataOffset, data);
CONDITIONAL_WRITE_BARRIER(*this, kFunctionDataOffset, data, mode);
}
int SharedFunctionInfo::function_token_position() const { int SharedFunctionInfo::function_token_position() const {
int offset = raw_function_token_offset(); int offset = raw_function_token_offset();
if (offset == kFunctionTokenOutOfRange) { if (offset == kFunctionTokenOutOfRange) {
......
...@@ -223,9 +223,6 @@ consts_misc = [ ...@@ -223,9 +223,6 @@ consts_misc = [
'value': 'SimpleNumberDictionaryShape::kEntrySize' }, 'value': 'SimpleNumberDictionaryShape::kEntrySize' },
{ 'name': 'type_JSError__JS_ERROR_TYPE', 'value': 'JS_ERROR_TYPE' }, { 'name': 'type_JSError__JS_ERROR_TYPE', 'value': 'JS_ERROR_TYPE' },
{ 'name': 'class_SharedFunctionInfo__function_data__Object',
'value': 'SharedFunctionInfo::kFunctionDataOffset' },
]; ];
# #
......
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