diff options
Diffstat (limited to 'deps/v8/src/objects/js-function.h')
-rw-r--r-- | deps/v8/src/objects/js-function.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/deps/v8/src/objects/js-function.h b/deps/v8/src/objects/js-function.h index 9d0fc533f4..5277e4e796 100644 --- a/deps/v8/src/objects/js-function.h +++ b/deps/v8/src/objects/js-function.h @@ -24,6 +24,9 @@ class JSFunctionOrBoundFunction : public TorqueGeneratedJSFunctionOrBoundFunction<JSFunctionOrBoundFunction, JSObject> { public: + static const int kLengthDescriptorIndex = 0; + static const int kNameDescriptorIndex = 1; + STATIC_ASSERT(kHeaderSize == JSObject::kHeaderSize); TQ_OBJECT_CONSTRUCTORS(JSFunctionOrBoundFunction) }; @@ -37,8 +40,6 @@ class JSBoundFunction Handle<JSBoundFunction> function); static Maybe<int> GetLength(Isolate* isolate, Handle<JSBoundFunction> function); - static MaybeHandle<NativeContext> GetFunctionRealm( - Handle<JSBoundFunction> function); // Dispatched behavior. DECL_PRINTER(JSBoundFunction) @@ -61,9 +62,6 @@ class JSFunction : public JSFunctionOrBoundFunction { // can be shared by instances. DECL_ACCESSORS(shared, SharedFunctionInfo) - static const int kLengthDescriptorIndex = 0; - static const int kNameDescriptorIndex = 1; - // Fast binding requires length and name accessors. static const int kMinDescriptorsForFastBind = 2; @@ -77,7 +75,6 @@ class JSFunction : public JSFunctionOrBoundFunction { inline int length(); static Handle<Object> GetName(Isolate* isolate, Handle<JSFunction> function); - static Handle<NativeContext> GetFunctionRealm(Handle<JSFunction> function); // [code]: The generated code object for this function. Executed // when the function is invoked, e.g. foo() or new foo(). See @@ -87,10 +84,12 @@ class JSFunction : public JSFunctionOrBoundFunction { // optimized code object, or when reading from the background thread. // Storing a builtin doesn't require release semantics because these objects // are fully initialized. - inline Code code() const; - inline void set_code(Code code); + DECL_ACCESSORS(code, Code) DECL_RELEASE_ACQUIRE_ACCESSORS(code, Code) + // Returns the address of the function code's instruction start. + inline Address code_entry_point() const; + // Get the abstract code associated with the function, which will either be // a Code object or a BytecodeArray. template <typename IsolateT> @@ -313,6 +312,9 @@ class JSFunction : public JSFunctionOrBoundFunction { FieldOffsets::kPrototypeOrInitialMapOffset; private: + DECL_ACCESSORS(raw_code, CodeT) + DECL_RELEASE_ACQUIRE_ACCESSORS(raw_code, CodeT) + // JSFunction doesn't have a fixed header size: // Hide JSFunctionOrBoundFunction::kHeaderSize to avoid confusion. static const int kHeaderSize; |