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

[compiler] Read some JSBoundFunction fields on the background thread

Bug: v8:7790
Change-Id: I1e7448c6583a36b2311474e14f4611935e2aa79f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2748076Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73314}
parent 3b21b6d3
......@@ -637,9 +637,18 @@ class JSBoundFunctionData : public JSObjectData {
bool Serialize(JSHeapBroker* broker);
bool serialized() const { return serialized_; }
ObjectData* bound_target_function() const { return bound_target_function_; }
ObjectData* bound_this() const { return bound_this_; }
ObjectData* bound_arguments() const { return bound_arguments_; }
ObjectData* bound_target_function() const {
DCHECK(!FLAG_turbo_direct_heap_access);
return bound_target_function_;
}
ObjectData* bound_this() const {
DCHECK(!FLAG_turbo_direct_heap_access);
return bound_this_;
}
ObjectData* bound_arguments() const {
DCHECK(!FLAG_turbo_direct_heap_access);
return bound_arguments_;
}
private:
bool serialized_ = false;
......@@ -3431,9 +3440,13 @@ BIMODAL_ACCESSOR(HeapObject, Map, map)
BIMODAL_ACCESSOR_C(HeapNumber, double, value)
BIMODAL_ACCESSOR(JSBoundFunction, JSReceiver, bound_target_function)
BIMODAL_ACCESSOR(JSBoundFunction, Object, bound_this)
BIMODAL_ACCESSOR(JSBoundFunction, FixedArray, bound_arguments)
// These JSBoundFunction fields are immutable after initialization. Moreover,
// as long as JSObjects are still serialized on the main thread, all
// JSBoundFunctionRefs are created at a time when the underlying objects are
// guaranteed to be fully initialized.
BIMODAL_ACCESSOR_WITH_FLAG(JSBoundFunction, JSReceiver, bound_target_function)
BIMODAL_ACCESSOR_WITH_FLAG(JSBoundFunction, Object, bound_this)
BIMODAL_ACCESSOR_WITH_FLAG(JSBoundFunction, FixedArray, bound_arguments)
BIMODAL_ACCESSOR_C(JSDataView, size_t, byte_length)
......
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