summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/shared-function-info.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/shared-function-info.h')
-rw-r--r--deps/v8/src/objects/shared-function-info.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/deps/v8/src/objects/shared-function-info.h b/deps/v8/src/objects/shared-function-info.h
index 1081481d7a..fd19f90165 100644
--- a/deps/v8/src/objects/shared-function-info.h
+++ b/deps/v8/src/objects/shared-function-info.h
@@ -141,22 +141,17 @@ class UncompiledDataWithPreparseData
TQ_OBJECT_CONSTRUCTORS(UncompiledDataWithPreparseData)
};
-class InterpreterData : public Struct {
+class InterpreterData
+ : public TorqueGeneratedInterpreterData<InterpreterData, Struct> {
public:
- DECL_ACCESSORS(bytecode_array, BytecodeArray)
DECL_ACCESSORS(interpreter_trampoline, Code)
- DEFINE_FIELD_OFFSET_CONSTANTS(Struct::kHeaderSize,
- TORQUE_GENERATED_INTERPRETER_DATA_FIELDS)
-
- DECL_CAST(InterpreterData)
DECL_PRINTER(InterpreterData)
- DECL_VERIFIER(InterpreterData)
private:
DECL_ACCESSORS(raw_interpreter_trampoline, CodeT)
- OBJECT_CONSTRUCTORS(InterpreterData, Struct);
+ TQ_OBJECT_CONSTRUCTORS(InterpreterData)
};
class BaselineData : public TorqueGeneratedBaselineData<BaselineData, Struct> {
@@ -220,6 +215,8 @@ class SharedFunctionInfo
static const int kNotFound = -1;
+ DECL_ACQUIRE_GETTER(scope_info, ScopeInfo)
+ // Deprecated, use the ACQUIRE version instead.
DECL_GETTER(scope_info, ScopeInfo)
// Set scope_info without moving the existing name onto the ScopeInfo.
@@ -245,6 +242,7 @@ class SharedFunctionInfo
// [outer scope info | feedback metadata] Shared storage for outer scope info
// (on uncompiled functions) and feedback metadata (on compiled functions).
DECL_ACCESSORS(raw_outer_scope_info_or_feedback_metadata, HeapObject)
+ DECL_ACQUIRE_GETTER(raw_outer_scope_info_or_feedback_metadata, HeapObject)
private:
using TorqueGeneratedSharedFunctionInfo::
outer_scope_info_or_feedback_metadata;
@@ -259,7 +257,9 @@ class SharedFunctionInfo
// [feedback metadata] Metadata template for feedback vectors of instances of
// this function.
inline bool HasFeedbackMetadata() const;
- DECL_ACCESSORS(feedback_metadata, FeedbackMetadata)
+ inline bool HasFeedbackMetadata(AcquireLoadTag tag) const;
+ inline FeedbackMetadata feedback_metadata() const;
+ DECL_RELEASE_ACQUIRE_ACCESSORS(feedback_metadata, FeedbackMetadata)
// Returns if this function has been compiled yet. Note: with bytecode
// flushing, any GC after this call is made could cause the function
@@ -534,7 +534,7 @@ class SharedFunctionInfo
// Returns true if the function has old bytecode that could be flushed. This
// function shouldn't access any flags as it is used by concurrent marker.
// Hence it takes the mode as an argument.
- inline bool ShouldFlushBytecode(BytecodeFlushMode mode);
+ inline bool ShouldFlushCode(base::EnumSet<CodeFlushMode> code_flush_mode);
enum Inlineability {
kIsInlineable,
@@ -575,6 +575,7 @@ class SharedFunctionInfo
void SetFunctionTokenPosition(int function_token_position,
int start_position);
+ inline bool CanCollectSourcePosition(Isolate* isolate);
static void EnsureSourcePositionsAvailable(
Isolate* isolate, Handle<SharedFunctionInfo> shared_info);
@@ -696,12 +697,12 @@ class V8_NODISCARD IsCompiledScope {
inline IsCompiledScope(const SharedFunctionInfo shared, Isolate* isolate);
inline IsCompiledScope(const SharedFunctionInfo shared,
LocalIsolate* isolate);
- inline IsCompiledScope() : retain_bytecode_(), is_compiled_(false) {}
+ inline IsCompiledScope() : retain_code_(), is_compiled_(false) {}
inline bool is_compiled() const { return is_compiled_; }
private:
- MaybeHandle<BytecodeArray> retain_bytecode_;
+ MaybeHandle<HeapObject> retain_code_;
bool is_compiled_;
};