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 { ...@@ -637,9 +637,18 @@ class JSBoundFunctionData : public JSObjectData {
bool Serialize(JSHeapBroker* broker); bool Serialize(JSHeapBroker* broker);
bool serialized() const { return serialized_; } bool serialized() const { return serialized_; }
ObjectData* bound_target_function() const { return bound_target_function_; } ObjectData* bound_target_function() const {
ObjectData* bound_this() const { return bound_this_; } DCHECK(!FLAG_turbo_direct_heap_access);
ObjectData* bound_arguments() const { return bound_arguments_; } 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: private:
bool serialized_ = false; bool serialized_ = false;
...@@ -3431,9 +3440,13 @@ BIMODAL_ACCESSOR(HeapObject, Map, map) ...@@ -3431,9 +3440,13 @@ BIMODAL_ACCESSOR(HeapObject, Map, map)
BIMODAL_ACCESSOR_C(HeapNumber, double, value) BIMODAL_ACCESSOR_C(HeapNumber, double, value)
BIMODAL_ACCESSOR(JSBoundFunction, JSReceiver, bound_target_function) // These JSBoundFunction fields are immutable after initialization. Moreover,
BIMODAL_ACCESSOR(JSBoundFunction, Object, bound_this) // as long as JSObjects are still serialized on the main thread, all
BIMODAL_ACCESSOR(JSBoundFunction, FixedArray, bound_arguments) // 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) 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