v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Function Class Reference

#include <v8.h>

Inheritance diagram for Function:
Collaboration diagram for Function:

Public Member Functions

V8EXPORT Local< ObjectNewInstance () const
 
V8EXPORT Local< ObjectNewInstance (int argc, Handle< Value > argv[]) const
 
V8EXPORT Local< ValueCall (Handle< Object > recv, int argc, Handle< Value > argv[])
 
V8EXPORT void SetName (Handle< String > name)
 
V8EXPORT Handle< ValueGetName () const
 
V8EXPORT Handle< ValueGetInferredName () const
 
V8EXPORT int GetScriptLineNumber () const
 
V8EXPORT int GetScriptColumnNumber () const
 
V8EXPORT Handle< ValueGetScriptId () const
 
V8EXPORT ScriptOrigin GetScriptOrigin () const
 
- Public Member Functions inherited from Object
V8EXPORT bool Set (Handle< Value > key, Handle< Value > value, PropertyAttribute attribs=None)
 
V8EXPORT bool Set (uint32_t index, Handle< Value > value)
 
V8EXPORT bool ForceSet (Handle< Value > key, Handle< Value > value, PropertyAttribute attribs=None)
 
V8EXPORT Local< ValueGet (Handle< Value > key)
 
V8EXPORT Local< ValueGet (uint32_t index)
 
V8EXPORT PropertyAttribute GetPropertyAttributes (Handle< Value > key)
 
V8EXPORT bool Has (Handle< String > key)
 
V8EXPORT bool Delete (Handle< String > key)
 
V8EXPORT bool ForceDelete (Handle< Value > key)
 
V8EXPORT bool Has (uint32_t index)
 
V8EXPORT bool Delete (uint32_t index)
 
V8EXPORT bool SetAccessor (Handle< String > name, AccessorGetter getter, AccessorSetter setter=0, Handle< Value > data=Handle< Value >(), AccessControl settings=DEFAULT, PropertyAttribute attribute=None)
 
V8EXPORT Local< ArrayGetPropertyNames ()
 
V8EXPORT Local< ArrayGetOwnPropertyNames ()
 
V8EXPORT Local< ValueGetPrototype ()
 
V8EXPORT bool SetPrototype (Handle< Value > prototype)
 
V8EXPORT Local< ObjectFindInstanceInPrototypeChain (Handle< FunctionTemplate > tmpl)
 
V8EXPORT Local< StringObjectProtoToString ()
 
V8EXPORT Local< ValueGetConstructor ()
 
V8EXPORT Local< StringGetConstructorName ()
 
V8EXPORT int InternalFieldCount ()
 
Local< ValueGetInternalField (int index)
 
V8EXPORT void SetInternalField (int index, Handle< Value > value)
 
void * GetPointerFromInternalField (int index)
 
V8EXPORT void SetPointerInInternalField (int index, void *value)
 
V8EXPORT bool HasOwnProperty (Handle< String > key)
 
V8EXPORT bool HasRealNamedProperty (Handle< String > key)
 
V8EXPORT bool HasRealIndexedProperty (uint32_t index)
 
V8EXPORT bool HasRealNamedCallbackProperty (Handle< String > key)
 
V8EXPORT Local< ValueGetRealNamedPropertyInPrototypeChain (Handle< String > key)
 
V8EXPORT Local< ValueGetRealNamedProperty (Handle< String > key)
 
V8EXPORT bool HasNamedLookupInterceptor ()
 
V8EXPORT bool HasIndexedLookupInterceptor ()
 
V8EXPORT void TurnOnAccessCheck ()
 
V8EXPORT int GetIdentityHash ()
 
V8EXPORT bool SetHiddenValue (Handle< String > key, Handle< Value > value)
 
V8EXPORT Local< ValueGetHiddenValue (Handle< String > key)
 
V8EXPORT bool DeleteHiddenValue (Handle< String > key)
 
V8EXPORT bool IsDirty ()
 
V8EXPORT Local< ObjectClone ()
 
V8EXPORT Local< ContextCreationContext ()
 
V8EXPORT void SetIndexedPropertiesToPixelData (uint8_t *data, int length)
 
V8EXPORT bool HasIndexedPropertiesInPixelData ()
 
V8EXPORT uint8_t * GetIndexedPropertiesPixelData ()
 
V8EXPORT int GetIndexedPropertiesPixelDataLength ()
 
V8EXPORT void SetIndexedPropertiesToExternalArrayData (void *data, ExternalArrayType array_type, int number_of_elements)
 
V8EXPORT bool HasIndexedPropertiesInExternalArrayData ()
 
V8EXPORT void * GetIndexedPropertiesExternalArrayData ()
 
V8EXPORT ExternalArrayType GetIndexedPropertiesExternalArrayDataType ()
 
V8EXPORT int GetIndexedPropertiesExternalArrayDataLength ()
 
V8EXPORT bool IsCallable ()
 
V8EXPORT Local< ValueCallAsFunction (Handle< Object > recv, int argc, Handle< Value > argv[])
 
V8EXPORT Local< ValueCallAsConstructor (int argc, Handle< Value > argv[])
 
- Public Member Functions inherited from Value
bool IsUndefined () const
 
bool IsNull () const
 
V8EXPORT bool IsTrue () const
 
V8EXPORT bool IsFalse () const
 
bool IsString () const
 
V8EXPORT bool IsFunction () const
 
V8EXPORT bool IsArray () const
 
V8EXPORT bool IsObject () const
 
V8EXPORT bool IsBoolean () const
 
V8EXPORT bool IsNumber () const
 
V8EXPORT bool IsExternal () const
 
V8EXPORT bool IsInt32 () const
 
V8EXPORT bool IsUint32 () const
 
V8EXPORT bool IsDate () const
 
V8EXPORT bool IsBooleanObject () const
 
V8EXPORT bool IsNumberObject () const
 
V8EXPORT bool IsStringObject () const
 
V8EXPORT bool IsNativeError () const
 
V8EXPORT bool IsRegExp () const
 
V8EXPORT Local< BooleanToBoolean () const
 
V8EXPORT Local< NumberToNumber () const
 
V8EXPORT Local< StringToString () const
 
V8EXPORT Local< StringToDetailString () const
 
V8EXPORT Local< ObjectToObject () const
 
V8EXPORT Local< IntegerToInteger () const
 
V8EXPORT Local< Uint32ToUint32 () const
 
V8EXPORT Local< Int32ToInt32 () const
 
V8EXPORT Local< Uint32ToArrayIndex () const
 
V8EXPORT bool BooleanValue () const
 
V8EXPORT double NumberValue () const
 
V8EXPORT int64_t IntegerValue () const
 
V8EXPORT uint32_t Uint32Value () const
 
V8EXPORT int32_t Int32Value () const
 
V8EXPORT bool Equals (Handle< Value > that) const
 
V8EXPORT bool StrictEquals (Handle< Value > that) const
 

Static Public Member Functions

static FunctionCast (Value *obj)
 
- Static Public Member Functions inherited from Object
static V8EXPORT Local< ObjectNew ()
 
static ObjectCast (Value *obj)
 

Static Public Attributes

static V8EXPORT const int kLineOffsetNotFound = -1
 

Detailed Description

A JavaScript function object (ECMA-262, 15.3).

Definition at line 1770 of file v8.h.

Member Function Documentation

Local< v8::Value > Call ( Handle< Object recv,
int  argc,
Handle< Value argv[] 
)
Function * Cast ( v8::Value value)
inlinestatic

Definition at line 4597 of file v8.h.

Handle< Value > GetInferredName ( ) const

Name inferred from variable or property assignment of this function. Used to facilitate debugging and profiling of JavaScript code written in an OO style, where many functions are anonymous but are assigned to object properties.

Definition at line 3691 of file api.cc.

References Utils::ToLocal().

Referenced by THREADED_TEST().

Handle< Value > GetName ( ) const

Definition at line 3685 of file api.cc.

References Utils::ToLocal().

int GetScriptColumnNumber ( ) const

Returns zero based column number of function body and kLineOffsetNotFound if no information available.

Definition at line 3724 of file api.cc.

References Script::cast(), v8::internal::GetScriptColumnNumber(), and Function::kLineOffsetNotFound.

Referenced by THREADED_TEST().

Handle< Value > GetScriptId ( ) const

Definition at line 3733 of file api.cc.

References Script::cast(), Utils::ToLocal(), and v8::Undefined().

Referenced by THREADED_TEST().

int GetScriptLineNumber ( ) const

Returns zero based line number of function body and kLineOffsetNotFound if no information available.

Definition at line 3714 of file api.cc.

References Script::cast(), v8::internal::GetScriptLineNumber(), and Function::kLineOffsetNotFound.

Referenced by TEST(), and THREADED_TEST().

ScriptOrigin GetScriptOrigin ( ) const

Definition at line 3697 of file api.cc.

References Script::cast(), Integer::New(), and Utils::ToLocal().

Referenced by THREADED_TEST().

Local< v8::Object > NewInstance ( ) const

Definition at line 3628 of file api.cc.

References NULL.

Referenced by THREADED_TEST().

void SetName ( Handle< String name)

Definition at line 3676 of file api.cc.

References ENTER_V8, and v8::internal::USE().

Field Documentation

const int kLineOffsetNotFound = -1
static

Definition at line 1801 of file v8.h.

Referenced by Function::GetScriptColumnNumber(), and Function::GetScriptLineNumber().


The documentation for this class was generated from the following files: