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
JSModule Class Reference

#include <objects.h>

Inheritance diagram for JSModule:
Collaboration diagram for JSModule:

Static Public Member Functions

static JSModulecast (Object *obj)
 
- Static Public Member Functions inherited from JSObject
static Handle< ObjectSetLocalPropertyIgnoreAttributes (Handle< JSObject > object, Handle< String > key, Handle< Object > value, PropertyAttributes attributes)
 
static bool TryTransitionToField (Handle< JSObject > object, Handle< String > key)
 
static void AddFastPropertyUsingMap (Handle< JSObject > object, Handle< Map > map)
 
static Handle< ObjectSetNormalizedProperty (Handle< JSObject > object, Handle< String > key, Handle< Object > value, PropertyDetails details)
 
static void DefineAccessor (Handle< JSObject > object, Handle< String > name, Handle< Object > getter, Handle< Object > setter, PropertyAttributes attributes)
 
static Handle< ObjectSetHiddenProperty (Handle< JSObject > obj, Handle< String > key, Handle< Object > value)
 
static int GetIdentityHash (Handle< JSObject > obj)
 
static Handle< ObjectDeleteProperty (Handle< JSObject > obj, Handle< String > name)
 
static Handle< ObjectDeleteElement (Handle< JSObject > obj, uint32_t index)
 
static int NewElementsCapacity (int old_capacity)
 
static Handle< ObjectSetOwnElement (Handle< JSObject > object, uint32_t index, Handle< Object > value, StrictModeFlag strict_mode)
 
static MUST_USE_RESULT Handle
< Object
SetElement (Handle< JSObject > object, uint32_t index, Handle< Object > value, PropertyAttributes attr, StrictModeFlag strict_mode, SetPropertyMode set_mode=SET_PROPERTY)
 
static Handle< MapGetElementsTransitionMap (Handle< JSObject > object, ElementsKind to_kind)
 
static Handle< ObjectTransitionElementsKind (Handle< JSObject > object, ElementsKind to_kind)
 
static void NormalizeProperties (Handle< JSObject > object, PropertyNormalizationMode mode, int expected_additional_properties)
 
static Handle
< SeededNumberDictionary
NormalizeElements (Handle< JSObject > object)
 
static void UpdateMapCodeCache (Handle< JSObject > object, Handle< String > name, Handle< Code > code)
 
static void TransformToFastProperties (Handle< JSObject > object, int unused_property_fields)
 
static JSObjectcast (Object *obj)
 
static Handle< ObjectPreventExtensions (Handle< JSObject > object)
 
- Static Public Member Functions inherited from JSReceiver
static JSReceivercast (Object *obj)
 
static Handle< ObjectSetProperty (Handle< JSReceiver > object, Handle< String > key, Handle< Object > value, PropertyAttributes attributes, StrictModeFlag strict_mode)
 
- Static Public Member Functions inherited from HeapObject
static HeapObjectFromAddress (Address address)
 
static Object ** RawField (HeapObject *obj, int offset)
 
static HeapObjectcast (Object *obj)
 
- Static Public Member Functions inherited from Object
static Handle< ObjectGetProperty (Handle< Object > object, Handle< Object > receiver, LookupResult *result, Handle< String > key, PropertyAttributes *attributes)
 
static Handle< ObjectGetElement (Handle< Object > object, uint32_t index)
 
static Objectcast (Object *value)
 

Static Public Attributes

static const int kContextOffset = JSObject::kHeaderSize
 
static const int kScopeInfoOffset = kContextOffset + kPointerSize
 
static const int kSize = kScopeInfoOffset + kPointerSize
 
- Static Public Attributes inherited from JSObject
static const uint32_t kMaxElementCount = 0xffffffffu
 
static const uint32_t kMaxGap = 1024
 
static const int kMaxUncheckedFastElementsLength = 5000
 
static const int kMaxUncheckedOldFastElementsLength = 500
 
static const int kInitialMaxFastElementArray = 100000
 
static const int kFastPropertiesSoftLimit = 12
 
static const int kMaxFastProperties = 64
 
static const int kMaxInstanceSize = 255 * kPointerSize
 
static const int kFieldsAdded = 3
 
static const int kPropertiesOffset = HeapObject::kHeaderSize
 
static const int kElementsOffset = kPropertiesOffset + kPointerSize
 
static const int kHeaderSize = kElementsOffset + kPointerSize
 
- Static Public Attributes inherited from HeapObject
static const int kMapOffset = Object::kHeaderSize
 
static const int kHeaderSize = kMapOffset + kPointerSize
 
- Static Public Attributes inherited from Object
static const int kHeaderSize = 0
 

Additional Inherited Members

- Public Types inherited from JSObject
enum  LocalElementType {
  UNDEFINED_ELEMENT, INTERCEPTED_ELEMENT, STRING_CHARACTER_ELEMENT, FAST_ELEMENT,
  DICTIONARY_ELEMENT
}
 
enum  SetFastElementsCapacitySmiMode { kAllowSmiElements, kForceSmiElements, kDontAllowSmiElements }
 
- Public Types inherited from JSReceiver
enum  DeleteMode { NORMAL_DELETION, STRICT_DELETION, FORCE_DELETION }
 
enum  StoreFromKeyed { MAY_BE_STORE_FROM_KEYED, CERTAINLY_NOT_STORE_FROM_KEYED }
 
enum  ExtensibilityCheck { PERFORM_EXTENSIBILITY_CHECK, OMIT_EXTENSIBILITY_CHECK }
 
- Public Member Functions inherited from JSObject
 DECL_ACCESSORS (properties, FixedArray) inline void initialize_properties()
 
bool HasFastProperties ()
 
StringDictionaryproperty_dictionary ()
 
void initialize_elements ()
 
MUST_USE_RESULT MaybeObject * ResetElements ()
 
ElementsKind GetElementsKind ()
 
ElementsAccessorGetElementsAccessor ()
 
bool HasFastSmiElements ()
 
bool HasFastObjectElements ()
 
bool HasFastSmiOrObjectElements ()
 
bool HasFastDoubleElements ()
 
bool HasFastHoleyElements ()
 
bool HasNonStrictArgumentsElements ()
 
bool HasDictionaryElements ()
 
bool HasExternalPixelElements ()
 
bool HasExternalArrayElements ()
 
bool HasExternalByteElements ()
 
bool HasExternalUnsignedByteElements ()
 
bool HasExternalShortElements ()
 
bool HasExternalUnsignedShortElements ()
 
bool HasExternalIntElements ()
 
bool HasExternalUnsignedIntElements ()
 
bool HasExternalFloatElements ()
 
bool HasExternalDoubleElements ()
 
bool HasFastArgumentsElements ()
 
bool HasDictionaryArgumentsElements ()
 
SeededNumberDictionaryelement_dictionary ()
 
void set_map_and_elements (Map *map, FixedArrayBase *value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
MUST_USE_RESULT MaybeObject * EnsureWritableFastElements ()
 
MUST_USE_RESULT MaybeObject * PrepareElementsForSort (uint32_t limit)
 
MUST_USE_RESULT MaybeObject * PrepareSlowElementsForSort (uint32_t limit)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithCallback (Object *receiver, Object *structure, String *name)
 
MUST_USE_RESULT MaybeObject * SetPropertyForResult (LookupResult *result, String *key, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, StoreFromKeyed store_mode)
 
MUST_USE_RESULT MaybeObject * SetPropertyWithFailedAccessCheck (LookupResult *result, String *name, Object *value, bool check_prototype, StrictModeFlag strict_mode)
 
MUST_USE_RESULT MaybeObject * SetPropertyWithCallback (Object *structure, String *name, Object *value, JSObject *holder, StrictModeFlag strict_mode)
 
MUST_USE_RESULT MaybeObject * SetPropertyWithInterceptor (String *name, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode)
 
MUST_USE_RESULT MaybeObject * SetPropertyPostInterceptor (String *name, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, ExtensibilityCheck extensibility_check)
 
int LastAddedFieldIndex ()
 
MUST_USE_RESULT MaybeObject * AddFastPropertyUsingMap (Map *map)
 
MUST_USE_RESULT MaybeObject * SetLocalPropertyIgnoreAttributes (String *key, Object *value, PropertyAttributes attributes)
 
ObjectGetNormalizedProperty (LookupResult *result)
 
ObjectSetNormalizedProperty (LookupResult *result, Object *value)
 
MUST_USE_RESULT MaybeObject * SetNormalizedProperty (String *name, Object *value, PropertyDetails details)
 
MUST_USE_RESULT MaybeObject * DeleteNormalizedProperty (String *name, DeleteMode mode)
 
MUST_USE_RESULT MaybeObject * OptimizeAsPrototype ()
 
InterceptorInfoGetNamedInterceptor ()
 
InterceptorInfoGetIndexedInterceptor ()
 
PropertyAttributes GetPropertyAttributePostInterceptor (JSObject *receiver, String *name, bool continue_search)
 
PropertyAttributes GetPropertyAttributeWithInterceptor (JSObject *receiver, String *name, bool continue_search)
 
PropertyAttributes GetPropertyAttributeWithFailedAccessCheck (Object *receiver, LookupResult *result, String *name, bool continue_search)
 
MUST_USE_RESULT MaybeObject * DefineAccessor (String *name, Object *getter, Object *setter, PropertyAttributes attributes)
 
MUST_USE_RESULT MaybeObject * DefineFastAccessor (String *name, AccessorComponent component, Object *accessor, PropertyAttributes attributes)
 
ObjectLookupAccessor (String *name, AccessorComponent component)
 
MUST_USE_RESULT MaybeObject * DefineAccessor (AccessorInfo *info)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithFailedAccessCheck (Object *receiver, LookupResult *result, String *name, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithInterceptor (Object *receiver, String *name, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyPostInterceptor (Object *receiver, String *name, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetLocalPropertyPostInterceptor (Object *receiver, String *name, PropertyAttributes *attributes)
 
bool IsDirty ()
 
ObjectBypassGlobalProxy ()
 
MUST_USE_RESULT MaybeObject * SetHiddenProperty (String *key, Object *value)
 
ObjectGetHiddenProperty (String *key)
 
void DeleteHiddenProperty (String *key)
 
bool HasHiddenProperties ()
 
MUST_USE_RESULT MaybeObject * GetIdentityHash (CreationFlag flag)
 
MUST_USE_RESULT MaybeObject * SetIdentityHash (Smi *hash, CreationFlag flag)
 
MUST_USE_RESULT MaybeObject * DeleteProperty (String *name, DeleteMode mode)
 
MUST_USE_RESULT MaybeObject * DeleteElement (uint32_t index, DeleteMode mode)
 
void ValidateElements ()
 
MUST_USE_RESULT MaybeObject * EnsureCanContainHeapObjectElements ()
 
MUST_USE_RESULT MaybeObject * EnsureCanContainElements (Object **elements, uint32_t count, EnsureElementsMode mode)
 
MUST_USE_RESULT MaybeObject * EnsureCanContainElements (FixedArrayBase *elements, uint32_t length, EnsureElementsMode mode)
 
MUST_USE_RESULT MaybeObject * EnsureCanContainElements (Arguments *arguments, uint32_t first_arg, uint32_t arg_count, EnsureElementsMode mode)
 
bool ShouldConvertToSlowElements (int new_capacity)
 
bool ShouldConvertToFastElements ()
 
bool ShouldConvertToFastDoubleElements (bool *has_smi_only_elements)
 
bool HasElementWithReceiver (JSReceiver *receiver, uint32_t index)
 
LocalElementType HasLocalElement (uint32_t index)
 
bool HasElementWithInterceptor (JSReceiver *receiver, uint32_t index)
 
MUST_USE_RESULT MaybeObject * SetFastElement (uint32_t index, Object *value, StrictModeFlag strict_mode, bool check_prototype)
 
MUST_USE_RESULT MaybeObject * SetDictionaryElement (uint32_t index, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, bool check_prototype, SetPropertyMode set_mode=SET_PROPERTY)
 
MUST_USE_RESULT MaybeObject * SetFastDoubleElement (uint32_t index, Object *value, StrictModeFlag strict_mode, bool check_prototype=true)
 
MUST_USE_RESULT MaybeObject * SetElement (uint32_t index, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, bool check_prototype=true, SetPropertyMode set_mode=SET_PROPERTY)
 
MUST_USE_RESULT MaybeObject * GetElementWithInterceptor (Object *receiver, uint32_t index)
 
MUST_USE_RESULT MaybeObject * SetFastElementsCapacityAndLength (int capacity, int length, SetFastElementsCapacitySmiMode smi_mode)
 
MUST_USE_RESULT MaybeObject * SetFastDoubleElementsCapacityAndLength (int capacity, int length)
 
bool HasNamedInterceptor ()
 
bool HasIndexedInterceptor ()
 
bool HasRealNamedProperty (String *key)
 
bool HasRealElementProperty (uint32_t index)
 
bool HasRealNamedCallbackProperty (String *key)
 
int GetHeaderSize ()
 
int GetInternalFieldCount ()
 
int GetInternalFieldOffset (int index)
 
ObjectGetInternalField (int index)
 
void SetInternalField (int index, Object *value)
 
void SetInternalField (int index, Smi *value)
 
void LocalLookupRealNamedProperty (String *name, LookupResult *result)
 
void LookupRealNamedProperty (String *name, LookupResult *result)
 
void LookupRealNamedPropertyInPrototypes (String *name, LookupResult *result)
 
MUST_USE_RESULT MaybeObject * SetElementWithCallbackSetterInPrototypes (uint32_t index, Object *value, bool *found, StrictModeFlag strict_mode)
 
void LookupCallbackProperty (String *name, LookupResult *result)
 
int NumberOfLocalProperties (PropertyAttributes filter=NONE)
 
void GetLocalPropertyNames (FixedArray *storage, int index)
 
int NumberOfLocalElements (PropertyAttributes filter)
 
int NumberOfEnumElements ()
 
int GetLocalElementKeys (FixedArray *storage, PropertyAttributes filter)
 
int GetEnumElementKeys (FixedArray *storage)
 
MUST_USE_RESULT MaybeObject * AddFastPropertyUsingMap (Map *new_map, String *name, Object *value, int field_index)
 
MUST_USE_RESULT MaybeObject * AddConstantFunctionProperty (String *name, JSFunction *function, PropertyAttributes attributes)
 
MUST_USE_RESULT MaybeObject * ReplaceSlowProperty (String *name, Object *value, PropertyAttributes attributes)
 
MUST_USE_RESULT MaybeObject * GetElementsTransitionMap (Isolate *isolate, ElementsKind elements_kind)
 
MUST_USE_RESULT MaybeObject * GetElementsTransitionMapSlow (ElementsKind elements_kind)
 
MUST_USE_RESULT MaybeObject * TransitionElementsKind (ElementsKind to_kind)
 
MUST_USE_RESULT MaybeObject * ConvertTransitionToMapTransition (int transition_index, String *name, Object *new_value, PropertyAttributes attributes)
 
MUST_USE_RESULT MaybeObject * ConvertDescriptorToField (String *name, Object *new_value, PropertyAttributes attributes)
 
MUST_USE_RESULT MaybeObject * AddFastProperty (String *name, Object *value, PropertyAttributes attributes, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED)
 
MUST_USE_RESULT MaybeObject * AddSlowProperty (String *name, Object *value, PropertyAttributes attributes)
 
MUST_USE_RESULT MaybeObject * AddProperty (String *name, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED, ExtensibilityCheck extensibility_check=PERFORM_EXTENSIBILITY_CHECK)
 
MUST_USE_RESULT MaybeObject * NormalizeProperties (PropertyNormalizationMode mode, int expected_additional_properties)
 
MUST_USE_RESULT MaybeObject * NormalizeElements ()
 
MUST_USE_RESULT MaybeObject * UpdateMapCodeCache (String *name, Code *code)
 
MUST_USE_RESULT MaybeObject * TransformToFastProperties (int unused_property_fields)
 
ObjectFastPropertyAt (int index)
 
ObjectFastPropertyAtPut (int index, Object *value)
 
int GetInObjectPropertyOffset (int index)
 
ObjectInObjectPropertyAt (int index)
 
ObjectInObjectPropertyAtPut (int index, Object *value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
void InitializeBody (Map *map, Object *pre_allocated_value, Object *filler_value)
 
bool ReferencesObject (Object *obj)
 
MUST_USE_RESULT MaybeObject * PreventExtensions ()
 
void JSObjectShortPrint (StringStream *accumulator)
 
void PrintElementsTransition (FILE *file, ElementsKind from_kind, FixedArrayBase *from_elements, ElementsKind to_kind, FixedArrayBase *to_elements)
 
ObjectSlowReverseLookup (Object *value)
 
bool TooManyFastProperties (int properties, StoreFromKeyed store_mode)
 
 STATIC_CHECK (kHeaderSize==Internals::kJSObjectHeaderSize)
 
- Public Member Functions inherited from JSReceiver
MUST_USE_RESULT MaybeObject * SetProperty (String *key, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, StoreFromKeyed store_from_keyed=MAY_BE_STORE_FROM_KEYED)
 
MUST_USE_RESULT MaybeObject * SetProperty (LookupResult *result, String *key, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, StoreFromKeyed store_from_keyed=MAY_BE_STORE_FROM_KEYED)
 
MUST_USE_RESULT MaybeObject * SetPropertyWithDefinedSetter (JSReceiver *setter, Object *value)
 
MUST_USE_RESULT MaybeObject * DeleteProperty (String *name, DeleteMode mode)
 
MUST_USE_RESULT MaybeObject * DeleteElement (uint32_t index, DeleteMode mode)
 
MUST_USE_RESULT MaybeObject * SetElement (uint32_t index, Object *value, PropertyAttributes attributes, StrictModeFlag strict_mode, bool check_prototype)
 
bool IsSimpleEnum ()
 
Stringclass_name ()
 
Stringconstructor_name ()
 
PropertyAttributes GetPropertyAttribute (String *name)
 
PropertyAttributes GetPropertyAttributeWithReceiver (JSReceiver *receiver, String *name)
 
PropertyAttributes GetLocalPropertyAttribute (String *name)
 
bool HasProperty (String *name)
 
bool HasLocalProperty (String *name)
 
bool HasElement (uint32_t index)
 
ObjectGetPrototype ()
 
ObjectGetConstructor ()
 
MUST_USE_RESULT MaybeObject * SetPrototype (Object *value, bool skip_hidden_prototypes)
 
MUST_USE_RESULT MaybeObject * GetIdentityHash (CreationFlag flag)
 
void LocalLookup (String *name, LookupResult *result)
 
void Lookup (String *name, LookupResult *result)
 
- Public Member Functions inherited from HeapObject
Mapmap ()
 
void set_map (Map *value)
 
void set_map_no_write_barrier (Map *value)
 
MapWord map_word ()
 
void set_map_word (MapWord map_word)
 
HeapGetHeap ()
 
IsolateGetIsolate ()
 
Address address ()
 
void Iterate (ObjectVisitor *v)
 
void IterateBody (InstanceType type, int object_size, ObjectVisitor *v)
 
int Size ()
 
int SizeFromMap (Map *map)
 
WriteBarrierMode GetWriteBarrierMode (const AssertNoAllocation &)
 
void HeapObjectShortPrint (StringStream *accumulator)
 
 STATIC_CHECK (kMapOffset==Internals::kHeapObjectMapOffset)
 
- Public Member Functions inherited from Object
bool IsObject ()
 
bool IsFixedArrayBase ()
 
bool IsInstanceOf (FunctionTemplateInfo *type)
 
bool IsStruct ()
 
 INLINE (bool IsSpecObject())
 
 INLINE (bool IsSpecFunction())
 
 INLINE (bool IsUndefined())
 
 INLINE (bool IsNull())
 
 INLINE (bool IsTheHole())
 
 INLINE (bool IsTrue())
 
 INLINE (bool IsFalse())
 
bool IsArgumentsMarker ()
 
bool NonFailureIsHeapObject ()
 
bool IsFiller ()
 
double Number ()
 
bool IsNaN ()
 
bool HasValidElements ()
 
bool HasSpecificClassOf (String *name)
 
MUST_USE_RESULT MaybeObject * ToObject ()
 
ObjectToBoolean ()
 
MUST_USE_RESULT MaybeObject * ToObject (Context *native_context)
 
MUST_USE_RESULT MaybeObject * ToSmi ()
 
void Lookup (String *name, LookupResult *result)
 
MUST_USE_RESULT MaybeObject * GetProperty (String *key)
 
MUST_USE_RESULT MaybeObject * GetProperty (String *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithReceiver (Object *receiver, String *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetProperty (Object *receiver, LookupResult *result, String *key, PropertyAttributes *attributes)
 
MUST_USE_RESULT MaybeObject * GetPropertyWithDefinedGetter (Object *receiver, JSReceiver *getter)
 
MUST_USE_RESULT MaybeObject * GetElement (uint32_t index)
 
ObjectGetElementNoExceptionThrown (uint32_t index)
 
MUST_USE_RESULT MaybeObject * GetElementWithReceiver (Object *receiver, uint32_t index)
 
ObjectGetPrototype ()
 
MUST_USE_RESULT MaybeObject * GetHash (CreationFlag flag)
 
bool SameValue (Object *other)
 
bool ToArrayIndex (uint32_t *index)
 
bool IsStringObjectWithCharacterAt (uint32_t index)
 
void VerifyApiCallResultType ()
 
void ShortPrint ()
 
void ShortPrint (FILE *out)
 
void ShortPrint (StringStream *accumulator)
 
- Protected Member Functions inherited from JSReceiver
SmiGenerateIdentityHash ()
 
- Protected Member Functions inherited from HeapObject
void IteratePointers (ObjectVisitor *v, int start, int end)
 
void IteratePointer (ObjectVisitor *v, int offset)
 

Detailed Description

Definition at line 5993 of file objects.h.

Member Function Documentation

JSModule * cast ( Object obj)
inlinestatic

Definition at line 4590 of file objects-inl.h.

References ASSERT, HeapObject::cast(), JSModule::kSize, and HeapObject::Size().

Referenced by Context::module().

Field Documentation

const int kContextOffset = JSObject::kHeaderSize
static

Definition at line 6014 of file objects.h.

const int kScopeInfoOffset = kContextOffset + kPointerSize
static

Definition at line 6015 of file objects.h.

const int kSize = kScopeInfoOffset + kPointerSize
static

Definition at line 6016 of file objects.h.

Referenced by Heap::AllocateJSModule(), JSModule::cast(), and JSObject::GetHeaderSize().


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