V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
v8::internal::Script Class Reference
Inheritance diagram for v8::internal::Script:
v8::internal::Struct v8::internal::NeverReadOnlySpaceObject v8::internal::HeapObject v8::internal::Object

Classes

class  Iterator
 
struct  PositionInfo
 

Public Types

enum  Type {
  TYPE_NATIVE = 0, TYPE_EXTENSION = 1, TYPE_NORMAL = 2, TYPE_WASM = 3,
  TYPE_INSPECTOR = 4
}
 
enum  CompilationType { COMPILATION_TYPE_HOST = 0, COMPILATION_TYPE_EVAL = 1 }
 
enum  CompilationState { COMPILATION_STATE_INITIAL = 0, COMPILATION_STATE_COMPILED = 1 }
 
enum  OffsetFlag { NO_OFFSET = 0, WITH_OFFSET = 1 }
 
- Public Types inherited from v8::internal::Object
enum  Conversion { kToNumber, kToNumeric }
 

Public Member Functions

bool is_wrapped () const
 
bool has_eval_from_shared () const
 
CompilationType compilation_type ()
 
void set_compilation_type (CompilationType type)
 
CompilationState compilation_state ()
 
void set_compilation_state (CompilationState state)
 
v8::ScriptOriginOptions origin_options ()
 
void set_origin_options (ScriptOriginOptions origin_options)
 
bool HasValidSource ()
 
ObjectGetNameOrSourceURL ()
 
int GetEvalPosition ()
 
bool ContainsAsmModule ()
 
bool GetPositionInfo (int position, PositionInfo *info, OffsetFlag offset_flag) const
 
bool IsUserJavaScript ()
 
int GetColumnNumber (int code_pos) const
 
int GetLineNumber (int code_pos) const
 
MaybeHandle< SharedFunctionInfoFindSharedFunctionInfo (Isolate *isolate, const FunctionLiteral *fun)
 
- Public Member Functions inherited from v8::internal::Struct
void InitializeBody (int object_size)
 
void BriefPrintDetails (std::ostream &os)
 
- Public Member Functions inherited from v8::internal::HeapObject
Map map () const
 
void set_map (Map value)
 
ObjectSlot map_slot ()
 
void set_map_no_write_barrier (Map value)
 
Map synchronized_map () const
 
MapWord synchronized_map_word () const
 
void synchronized_set_map (Map value)
 
void synchronized_set_map_word (MapWord map_word)
 
void set_map_after_allocation (Map value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
MapWord map_word () const
 
void set_map_word (MapWord map_word)
 
ReadOnlyRoots GetReadOnlyRoots () const
 
V8_INLINE bool IsExternal (Isolate *isolate) const
 
V8_INLINE bool IsNullOrUndefined (Isolate *isolate) const
 
V8_INLINE bool IsNullOrUndefined (ReadOnlyRoots roots) const
 
V8_INLINE bool IsNullOrUndefined () const
 
Address address () const
 
void Iterate (ObjectVisitor *v)
 
template<typename ObjectVisitor >
void IterateFast (ObjectVisitor *v)
 
void IterateBody (ObjectVisitor *v)
 
void IterateBody (Map map, int object_size, ObjectVisitor *v)
 
template<typename ObjectVisitor >
void IterateBodyFast (ObjectVisitor *v)
 
template<typename ObjectVisitor >
void IterateBodyFast (Map map, int object_size, ObjectVisitor *v)
 
bool IsValidSlot (Map map, int offset)
 
int Size () const
 
int SizeFromMap (Map map) const
 
ObjectSlot RawField (int byte_offset) const
 
MaybeObjectSlot RawMaybeWeakField (int byte_offset) const
 
WriteBarrierMode GetWriteBarrierMode (const DisallowHeapAllocation &promise)
 
void HeapObjectShortPrint (std::ostream &os)
 
bool NeedsRehashing () const
 
bool CanBeRehashed () const
 
void RehashBasedOnMap (Isolate *isolate)
 
 STATIC_ASSERT (kMapOffset==Internals::kHeapObjectMapOffset)
 
Address GetFieldAddress (int field_offset) const
 
- Public Member Functions inherited from v8::internal::Object
bool IsObject () const
 
Address ptr () const
 
V8_INLINE bool IsExternal (Isolate *isolate) const
 
V8_INLINE bool IsNullOrUndefined (Isolate *isolate) const
 
V8_INLINE bool IsNullOrUndefined (ReadOnlyRoots roots) const
 
V8_INLINE bool IsNullOrUndefined () const
 
V8_INLINE bool IsSmallOrderedHashTable () const
 
double Number () const
 
V8_INLINE bool IsNaN () const
 
V8_INLINE bool IsMinusZero () const
 
V8_EXPORT_PRIVATE bool ToInt32 (int32_t *value)
 
bool ToUint32 (uint32_t *value) const
 
Representation OptimalRepresentation ()
 
ElementsKind OptimalElementsKind ()
 
bool FitsRepresentation (Representation representation)
 
bool KeyEquals (Object *other)
 
bool FilterKey (PropertyFilter filter)
 
Handle< FieldTypeOptimalType (Isolate *isolate, Representation representation)
 
bool HasValidElements ()
 
bool BooleanValue (Isolate *isolate)
 
bool StrictEquals (Object *that)
 
ObjectGetHash ()
 
Smi GetOrCreateHash (Isolate *isolate)
 
V8_EXPORT_PRIVATE bool SameValue (Object *other)
 
bool SameValueZero (Object *other)
 
bool ToArrayLength (uint32_t *index) const
 
V8_WARN_UNUSED_RESULT bool ToArrayIndex (uint32_t *index) const
 
bool IterationHasObservableEffects ()
 
void VerifyApiCallResultType ()
 
void ShortPrint (FILE *out=stdout)
 
void ShortPrint (StringStream *accumulator)
 
void ShortPrint (std::ostream &os)
 
void Print ()
 
void Print (std::ostream &os)
 
- Public Member Functions inherited from v8::internal::NeverReadOnlySpaceObject
HeapGetHeap () const
 
IsolateGetIsolate () const
 

Static Public Member Functions

static void InitLineEnds (Handle< Script > script)
 
static bool GetPositionInfo (Handle< Script > script, int position, PositionInfo *info, OffsetFlag offset_flag)
 
static int GetColumnNumber (Handle< Script > script, int code_offset)
 
static int GetLineNumber (Handle< Script > script, int code_offset)
 
- Static Public Member Functions inherited from v8::internal::HeapObject
static HeapObjectFromAddress (Address address)
 
static ObjectSlot RawField (const HeapObject *obj, int offset)
 
static MaybeObjectSlot RawMaybeWeakField (HeapObject *obj, int offset)
 
static AllocationAlignment RequiredAlignment (Map map)
 
- Static Public Member Functions inherited from v8::internal::Object
V8_INLINE static V8_WARN_UNUSED_RESULT Maybe< boolIsArray (Handle< Object > object)
 
static Handle< ObjectNewStorageFor (Isolate *isolate, Handle< Object > object, Representation representation)
 
static Handle< ObjectWrapForRead (Isolate *isolate, Handle< Object > object, Representation representation)
 
static V8_WARN_UNUSED_RESULT Maybe< ComparisonResult > Compare (Isolate *isolate, Handle< Object > x, Handle< Object > y)
 
static V8_WARN_UNUSED_RESULT Maybe< boolEquals (Isolate *isolate, Handle< Object > x, Handle< Object > y)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< JSReceiverToObject (Isolate *isolate, Handle< Object > object, const char *method_name=nullptr)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< JSReceiverToObject (Isolate *isolate, Handle< Object > object, Handle< Context > native_context, const char *method_name=nullptr)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< JSReceiverConvertReceiver (Isolate *isolate, Handle< Object > object)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< NameToName (Isolate *isolate, Handle< Object > input)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectToPrimitive (Handle< Object > input, ToPrimitiveHint hint=ToPrimitiveHint::kDefault)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectToNumber (Isolate *isolate, Handle< Object > input)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectToNumeric (Isolate *isolate, Handle< Object > input)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectToInteger (Isolate *isolate, Handle< Object > input)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectToInt32 (Isolate *isolate, Handle< Object > input)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectToUint32 (Isolate *isolate, Handle< Object > input)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< StringToString (Isolate *isolate, Handle< Object > input)
 
static Handle< StringNoSideEffectsToString (Isolate *isolate, Handle< Object > input)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectToPropertyKey (Isolate *isolate, Handle< Object > value)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectToLength (Isolate *isolate, Handle< Object > input)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectToIndex (Isolate *isolate, Handle< Object > input, MessageTemplate error_index)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectGetMethod (Handle< JSReceiver > receiver, Handle< Name > name)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< FixedArrayCreateListFromArrayLike (Isolate *isolate, Handle< Object > object, ElementTypes element_types)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectGetLengthFromArrayLike (Isolate *isolate, Handle< JSReceiver > object)
 
static Handle< StringTypeOf (Isolate *isolate, Handle< Object > object)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectAdd (Isolate *isolate, Handle< Object > lhs, Handle< Object > rhs)
 
static V8_WARN_UNUSED_RESULT Maybe< boolGreaterThan (Isolate *isolate, Handle< Object > x, Handle< Object > y)
 
static V8_WARN_UNUSED_RESULT Maybe< boolGreaterThanOrEqual (Isolate *isolate, Handle< Object > x, Handle< Object > y)
 
static V8_WARN_UNUSED_RESULT Maybe< boolLessThan (Isolate *isolate, Handle< Object > x, Handle< Object > y)
 
static V8_WARN_UNUSED_RESULT Maybe< boolLessThanOrEqual (Isolate *isolate, Handle< Object > x, Handle< Object > y)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectOrdinaryHasInstance (Isolate *isolate, Handle< Object > callable, Handle< Object > object)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectInstanceOf (Isolate *isolate, Handle< Object > object, Handle< Object > callable)
 
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectGetProperty (LookupIterator *it, OnNonExistent on_non_existent=OnNonExistent::kReturnUndefined)
 
static V8_WARN_UNUSED_RESULT Maybe< boolSetProperty (LookupIterator *it, Handle< Object > value, LanguageMode language_mode, StoreOrigin store_origin)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectSetProperty (Isolate *isolate, Handle< Object > object, Handle< Name > name, Handle< Object > value, LanguageMode language_mode, StoreOrigin store_origin=StoreOrigin::kMaybeKeyed)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectSetPropertyOrElement (Isolate *isolate, Handle< Object > object, Handle< Name > name, Handle< Object > value, LanguageMode language_mode, StoreOrigin store_origin=StoreOrigin::kMaybeKeyed)
 
static V8_WARN_UNUSED_RESULT Maybe< boolSetSuperProperty (LookupIterator *it, Handle< Object > value, LanguageMode language_mode, StoreOrigin store_origin)
 
static V8_WARN_UNUSED_RESULT Maybe< boolCannotCreateProperty (Isolate *isolate, Handle< Object > receiver, Handle< Object > name, Handle< Object > value, ShouldThrow should_throw)
 
static V8_WARN_UNUSED_RESULT Maybe< boolWriteToReadOnlyProperty (LookupIterator *it, Handle< Object > value, ShouldThrow should_throw)
 
static V8_WARN_UNUSED_RESULT Maybe< boolWriteToReadOnlyProperty (Isolate *isolate, Handle< Object > receiver, Handle< Object > name, Handle< Object > value, ShouldThrow should_throw)
 
static V8_WARN_UNUSED_RESULT Maybe< boolRedefineIncompatibleProperty (Isolate *isolate, Handle< Object > name, Handle< Object > value, ShouldThrow should_throw)
 
static V8_WARN_UNUSED_RESULT Maybe< boolSetDataProperty (LookupIterator *it, Handle< Object > value)
 
static V8_WARN_UNUSED_RESULT Maybe< boolAddDataProperty (LookupIterator *it, Handle< Object > value, PropertyAttributes attributes, ShouldThrow should_throw, StoreOrigin store_origin)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectGetPropertyOrElement (Isolate *isolate, Handle< Object > object, Handle< Name > name)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectGetPropertyOrElement (Handle< Object > receiver, Handle< Name > name, Handle< JSReceiver > holder)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectGetProperty (Isolate *isolate, Handle< Object > object, Handle< Name > name)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectGetPropertyWithAccessor (LookupIterator *it)
 
static V8_WARN_UNUSED_RESULT Maybe< boolSetPropertyWithAccessor (LookupIterator *it, Handle< Object > value, ShouldThrow should_throw)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectGetPropertyWithDefinedGetter (Handle< Object > receiver, Handle< JSReceiver > getter)
 
static V8_WARN_UNUSED_RESULT Maybe< boolSetPropertyWithDefinedSetter (Handle< Object > receiver, Handle< JSReceiver > setter, Handle< Object > value, ShouldThrow should_throw)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectGetElement (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectSetElement (Isolate *isolate, Handle< Object > object, uint32_t index, Handle< Object > value, LanguageMode language_mode)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectArraySpeciesConstructor (Isolate *isolate, Handle< Object > original_array)
 
static V8_WARN_UNUSED_RESULT MaybeHandle< ObjectSpeciesConstructor (Isolate *isolate, Handle< JSReceiver > recv, Handle< JSFunction > default_ctor)
 

Static Public Attributes

static const int kSourceOffset = HeapObject::kHeaderSize
 
static const int kNameOffset = kSourceOffset + kPointerSize
 
static const int kLineOffsetOffset = kNameOffset + kPointerSize
 
static const int kColumnOffsetOffset = kLineOffsetOffset + kPointerSize
 
static const int kContextOffset = kColumnOffsetOffset + kPointerSize
 
static const int kTypeOffset = kContextOffset + kPointerSize
 
static const int kLineEndsOffset = kTypeOffset + kPointerSize
 
static const int kIdOffset = kLineEndsOffset + kPointerSize
 
static const int kEvalFromSharedOrWrappedArgumentsOffset
 
static const int kEvalFromPositionOffset
 
static const int kSharedFunctionInfosOffset
 
static const int kFlagsOffset = kSharedFunctionInfosOffset + kPointerSize
 
static const int kSourceUrlOffset = kFlagsOffset + kPointerSize
 
static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize
 
static const int kHostDefinedOptionsOffset
 
static const int kSize = kHostDefinedOptionsOffset + kPointerSize
 
- Static Public Attributes inherited from v8::internal::HeapObject
static const int kMapOffset = Object::kHeaderSize
 
static const int kHeaderSize = kMapOffset + kPointerSize
 
- Static Public Attributes inherited from v8::internal::Object
static const int kHeaderSize = 0
 

Detailed Description

Definition at line 18 of file script.h.

Member Data Documentation

◆ kEvalFromPositionOffset

const int v8::internal::Script::kEvalFromPositionOffset
static
Initial value:
=
kEvalFromSharedOrWrappedArgumentsOffset + kPointerSize

Definition at line 200 of file script.h.

◆ kEvalFromSharedOrWrappedArgumentsOffset

const int v8::internal::Script::kEvalFromSharedOrWrappedArgumentsOffset
static
Initial value:
=
kIdOffset + kPointerSize

Definition at line 198 of file script.h.

◆ kHostDefinedOptionsOffset

const int v8::internal::Script::kHostDefinedOptionsOffset
static
Initial value:
=
kSourceMappingUrlOffset + kPointerSize

Definition at line 207 of file script.h.

◆ kSharedFunctionInfosOffset

const int v8::internal::Script::kSharedFunctionInfosOffset
static
Initial value:
=
kEvalFromPositionOffset + kPointerSize

Definition at line 202 of file script.h.


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