V8 Project
v8::internal::JSRegExp Class Reference

#include <objects.h>

+ Inheritance diagram for v8::internal::JSRegExp:
+ Collaboration diagram for v8::internal::JSRegExp:

Classes

class  Flags
 

Public Types

enum  Type { NOT_COMPILED , ATOM , IRREGEXP }
 
enum  Flag {
  NONE = 0 , GLOBAL = 1 , IGNORE_CASE = 2 , MULTILINE = 4 ,
  STICKY = 8
}
 
- Public Types inherited from v8::internal::JSObject
enum  ExecutableAccessorInfoHandling { DEFAULT_HANDLING , DONT_FORCE_FIELD }
 
enum  SetFastElementsCapacitySmiMode { kAllowSmiElements , kForceSmiElements , kDontAllowSmiElements }
 
enum  DeepCopyHints { kNoHints = 0 , kObjectIsShallow = 1 }
 
- Public Types inherited from v8::internal::JSReceiver
enum  DeleteMode { NORMAL_DELETION , STRICT_DELETION , FORCE_DELETION }
 
enum  KeyCollectionType { OWN_ONLY , INCLUDE_PROTOS }
 
- Public Types inherited from v8::internal::Object
enum  StoreFromKeyed { MAY_BE_STORE_FROM_KEYED , CERTAINLY_NOT_STORE_FROM_KEYED }
 
enum  StorePropertyMode { NORMAL_PROPERTY , SUPER_PROPERTY }
 

Public Member Functions

Type TypeTag ()
 
int CaptureCount ()
 
Flags GetFlags ()
 
StringPattern ()
 
ObjectDataAt (int index)
 
void SetDataAt (int index, Object *value)
 
- Public Member Functions inherited from v8::internal::JSObject
 DECL_ACCESSORS (properties, FixedArray) inline void initialize_properties()
 
bool HasFastProperties ()
 
NameDictionaryproperty_dictionary ()
 
void initialize_elements ()
 
ElementsKind GetElementsKind ()
 
ElementsAccessorGetElementsAccessor ()
 
bool HasFastSmiElements ()
 
bool HasFastObjectElements ()
 
bool HasFastSmiOrObjectElements ()
 
bool HasFastElements ()
 
bool HasFastDoubleElements ()
 
bool HasFastHoleyElements ()
 
bool HasSloppyArgumentsElements ()
 
bool HasDictionaryElements ()
 
bool HasExternalUint8ClampedElements ()
 
bool HasExternalArrayElements ()
 
bool HasExternalInt8Elements ()
 
bool HasExternalUint8Elements ()
 
bool HasExternalInt16Elements ()
 
bool HasExternalUint16Elements ()
 
bool HasExternalInt32Elements ()
 
bool HasExternalUint32Elements ()
 
bool HasExternalFloat32Elements ()
 
bool HasExternalFloat64Elements ()
 
bool HasFixedTypedArrayElements ()
 
bool HasFixedUint8ClampedElements ()
 
bool HasFixedArrayElements ()
 
bool HasFixedInt8Elements ()
 
bool HasFixedUint8Elements ()
 
bool HasFixedInt16Elements ()
 
bool HasFixedUint16Elements ()
 
bool HasFixedInt32Elements ()
 
bool HasFixedUint32Elements ()
 
bool HasFixedFloat32Elements ()
 
bool HasFixedFloat64Elements ()
 
bool HasFastArgumentsElements ()
 
bool HasDictionaryArgumentsElements ()
 
SeededNumberDictionaryelement_dictionary ()
 
InterceptorInfoGetNamedInterceptor ()
 
InterceptorInfoGetIndexedInterceptor ()
 
bool IsDirty ()
 
ObjectGetHiddenProperty (Handle< Name > key)
 
bool WouldConvertToSlowElements (Handle< Object > key)
 
bool ShouldConvertToSlowElements (int new_capacity)
 
bool ShouldConvertToFastElements ()
 
bool ShouldConvertToFastDoubleElements (bool *has_smi_only_elements)
 
bool HasNamedInterceptor ()
 
bool HasIndexedInterceptor ()
 
int GetHeaderSize ()
 
int GetInternalFieldCount ()
 
int GetInternalFieldOffset (int index)
 
ObjectGetInternalField (int index)
 
void SetInternalField (int index, Object *value)
 
void SetInternalField (int index, Smi *value)
 
int NumberOfOwnProperties (PropertyAttributes filter=NONE)
 
void GetOwnPropertyNames (FixedArray *storage, int index, PropertyAttributes filter=NONE)
 
int NumberOfOwnElements (PropertyAttributes filter)
 
int NumberOfEnumElements ()
 
int GetOwnElementKeys (FixedArray *storage, PropertyAttributes filter)
 
int GetEnumElementKeys (FixedArray *storage)
 
ObjectRawFastPropertyAt (FieldIndex index)
 
void FastPropertyAtPut (FieldIndex index, Object *value)
 
void WriteToField (int descriptor, 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)
 
void JSObjectShortPrint (StringStream *accumulator)
 
void PrintInstanceMigration (FILE *file, Map *original_map, Map *new_map)
 
ObjectSlowReverseLookup (Object *value)
 
 STATIC_ASSERT (kHeaderSize==Internals::kJSObjectHeaderSize)
 
ContextGetCreationContext ()
 
- Public Member Functions inherited from v8::internal::JSReceiver
bool IsSimpleEnum ()
 
Stringclass_name ()
 
Stringconstructor_name ()
 
ObjectGetConstructor ()
 
ObjectGetIdentityHash ()
 
- Public Member Functions inherited from v8::internal::HeapObject
Mapmap () const
 
void set_map (Map *value)
 
void set_map_no_write_barrier (Map *value)
 
Mapsynchronized_map ()
 
MapWord synchronized_map_word () const
 
void synchronized_set_map (Map *value)
 
void synchronized_set_map_no_write_barrier (Map *value)
 
void synchronized_set_map_word (MapWord map_word)
 
MapWord map_word () const
 
void set_map_word (MapWord map_word)
 
HeapGetHeap () const
 
IsolateGetIsolate () const
 
Address address ()
 
void Iterate (ObjectVisitor *v)
 
void IterateBody (InstanceType type, int object_size, ObjectVisitor *v)
 
int Size ()
 
bool MayContainRawValues ()
 
int SizeFromMap (Map *map)
 
WriteBarrierMode GetWriteBarrierMode (const DisallowHeapAllocation &promise)
 
void HeapObjectShortPrint (OStream &os)
 
 STATIC_ASSERT (kMapOffset==Internals::kHeapObjectMapOffset)
 
- Public Member Functions inherited from v8::internal::Object
bool IsObject () const
 
 INLINE (bool IsFixedArrayBase() const)
 
 INLINE (bool IsExternal() const)
 
 INLINE (bool IsAccessorInfo() const)
 
 INLINE (bool IsStruct() const)
 
 INLINE (bool IsSpecObject()) const
 
 INLINE (bool IsSpecFunction()) const
 
 INLINE (bool IsTemplateInfo()) const
 
 INLINE (bool IsNameDictionary() const)
 
 INLINE (bool IsSeededNumberDictionary() const)
 
 INLINE (bool IsUnseededNumberDictionary() const)
 
 INLINE (bool IsOrderedHashSet() const)
 
 INLINE (bool IsOrderedHashMap() const)
 
bool IsCallable () const
 
 INLINE (bool IsUndefined() const)
 
 INLINE (bool IsNull() const)
 
 INLINE (bool IsTheHole() const)
 
 INLINE (bool IsException() const)
 
 INLINE (bool IsUninitialized() const)
 
 INLINE (bool IsTrue() const)
 
 INLINE (bool IsFalse() const)
 
 INLINE (bool IsArgumentsMarker() const)
 
 INLINE (bool IsFiller() const)
 
double Number ()
 
 INLINE (bool IsNaN() const)
 
 INLINE (bool IsMinusZero() const)
 
bool ToInt32 (int32_t *value)
 
bool ToUint32 (uint32_t *value)
 
Representation OptimalRepresentation ()
 
bool FitsRepresentation (Representation representation)
 
Handle< HeapTypeOptimalType (Isolate *isolate, Representation representation)
 
bool HasValidElements ()
 
bool HasSpecificClassOf (String *name)
 
bool BooleanValue ()
 
ObjectGetHash ()
 
bool SameValue (Object *other)
 
bool SameValueZero (Object *other)
 
bool ToArrayIndex (uint32_t *index)
 
bool IsStringObjectWithCharacterAt (uint32_t index)
 
void VerifyApiCallResultType ()
 
void ShortPrint (FILE *out=stdout)
 
void ShortPrint (StringStream *accumulator)
 

Static Public Member Functions

static int code_index (bool is_latin1)
 
static int saved_code_index (bool is_latin1)
 
- Static Public Member Functions inherited from v8::internal::JSObject
static void ResetElements (Handle< JSObject > object)
 
static void SetMapAndElements (Handle< JSObject > object, Handle< Map > map, Handle< FixedArrayBase > elements)
 
static Handle< FixedArrayEnsureWritableFastElements (Handle< JSObject > object)
 
static Handle< ObjectPrepareElementsForSort (Handle< JSObject > object, uint32_t limit)
 
static Handle< ObjectPrepareSlowElementsForSort (Handle< JSObject > object, uint32_t limit)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetPropertyWithInterceptor (LookupIterator *it, Handle< Object > value)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetOwnPropertyIgnoreAttributes (Handle< JSObject > object, Handle< Name > key, Handle< Object > value, PropertyAttributes attributes, ExecutableAccessorInfoHandling handling=DEFAULT_HANDLING)
 
static void AddProperty (Handle< JSObject > object, Handle< Name > key, Handle< Object > value, PropertyAttributes attributes)
 
static void AllocateStorageForMap (Handle< JSObject > object, Handle< Map > map)
 
static void MigrateInstance (Handle< JSObject > instance)
 
static bool TryMigrateInstance (Handle< JSObject > instance)
 
static void SetNormalizedProperty (Handle< JSObject > object, Handle< Name > key, Handle< Object > value, PropertyDetails details)
 
static void OptimizeAsPrototype (Handle< JSObject > object, PrototypeOptimizationMode mode)
 
static void ReoptimizeIfPrototype (Handle< JSObject > object)
 
static MUST_USE_RESULT Maybe< PropertyAttributesGetPropertyAttributesWithInterceptor (Handle< JSObject > holder, Handle< Object > receiver, Handle< Name > name)
 
static MUST_USE_RESULT Maybe< PropertyAttributesGetPropertyAttributesWithFailedAccessCheck (LookupIterator *it)
 
static MUST_USE_RESULT Maybe< PropertyAttributesGetElementAttributeWithReceiver (Handle< JSObject > object, Handle< JSReceiver > receiver, uint32_t index, bool check_prototype)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetAccessor (Handle< JSObject > object, Handle< Name > name, AccessorComponent component)
 
static MaybeHandle< ObjectDefineAccessor (Handle< JSObject > object, Handle< Name > name, Handle< Object > getter, Handle< Object > setter, PropertyAttributes attributes)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetAccessor (Handle< JSObject > object, Handle< AccessorInfo > info)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyWithInterceptor (Handle< JSObject > object, Handle< Object > receiver, Handle< Name > name)
 
static Handle< ObjectSetHiddenProperty (Handle< JSObject > object, Handle< Name > key, Handle< Object > value)
 
static void DeleteHiddenProperty (Handle< JSObject > object, Handle< Name > key)
 
static bool HasHiddenProperties (Handle< JSObject > object)
 
static void SetIdentityHash (Handle< JSObject > object, Handle< Smi > hash)
 
static void ValidateElements (Handle< JSObject > object)
 
static void EnsureCanContainHeapObjectElements (Handle< JSObject > obj)
 
static void EnsureCanContainElements (Handle< JSObject > object, Object **elements, uint32_t count, EnsureElementsMode mode)
 
static void EnsureCanContainElements (Handle< JSObject > object, Handle< FixedArrayBase > elements, uint32_t length, EnsureElementsMode mode)
 
static void EnsureCanContainElements (Handle< JSObject > object, Arguments *arguments, uint32_t first_arg, uint32_t arg_count, EnsureElementsMode mode)
 
static int NewElementsCapacity (int old_capacity)
 
static MUST_USE_RESULT MaybeHandle< AccessorPairGetOwnElementAccessorPair (Handle< JSObject > object, uint32_t index)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetFastElement (Handle< JSObject > object, uint32_t index, Handle< Object > value, StrictMode strict_mode, bool check_prototype)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetOwnElement (Handle< JSObject > object, uint32_t index, Handle< Object > value, StrictMode strict_mode)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetElement (Handle< JSObject > object, uint32_t index, Handle< Object > value, PropertyAttributes attributes, StrictMode strict_mode, bool check_prototype=true, SetPropertyMode set_mode=SET_PROPERTY)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetElementWithInterceptor (Handle< JSObject > object, Handle< Object > receiver, uint32_t index)
 
static Handle< FixedArraySetFastElementsCapacityAndLength (Handle< JSObject > object, int capacity, int length, SetFastElementsCapacitySmiMode smi_mode)
 
static void SetFastDoubleElementsCapacityAndLength (Handle< JSObject > object, int capacity, int length)
 
static MUST_USE_RESULT MaybeHandle< JSObjectGetKeysForNamedInterceptor (Handle< JSObject > object, Handle< JSReceiver > receiver)
 
static MUST_USE_RESULT MaybeHandle< JSObjectGetKeysForIndexedInterceptor (Handle< JSObject > object, Handle< JSReceiver > receiver)
 
static MUST_USE_RESULT Maybe< boolHasRealNamedProperty (Handle< JSObject > object, Handle< Name > key)
 
static MUST_USE_RESULT Maybe< boolHasRealElementProperty (Handle< JSObject > object, uint32_t index)
 
static MUST_USE_RESULT Maybe< boolHasRealNamedCallbackProperty (Handle< JSObject > object, Handle< Name > key)
 
static Handle< MapGetElementsTransitionMap (Handle< JSObject > object, ElementsKind to_kind)
 
static void TransitionElementsKind (Handle< JSObject > object, ElementsKind to_kind)
 
static void MigrateToMap (Handle< JSObject > object, Handle< Map > new_map)
 
static void NormalizeProperties (Handle< JSObject > object, PropertyNormalizationMode mode, int expected_additional_properties)
 
static Handle< SeededNumberDictionaryNormalizeElements (Handle< JSObject > object)
 
static void MigrateSlowToFast (Handle< JSObject > object, int unused_property_fields)
 
static Handle< ObjectFastPropertyAt (Handle< JSObject > object, Representation representation, FieldIndex index)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetPrototype (Handle< JSObject > object, Handle< Object > value, bool from_javascript)
 
static MUST_USE_RESULT MaybeHandle< ObjectPreventExtensions (Handle< JSObject > object)
 
static MUST_USE_RESULT MaybeHandle< ObjectFreeze (Handle< JSObject > object)
 
static void SetObserved (Handle< JSObject > object)
 
static Handle< JSObjectCopy (Handle< JSObject > object)
 
static MUST_USE_RESULT MaybeHandle< JSObjectDeepCopy (Handle< JSObject > object, AllocationSiteUsageContext *site_context, DeepCopyHints hints=kNoHints)
 
static MUST_USE_RESULT MaybeHandle< JSObjectDeepWalk (Handle< JSObject > object, AllocationSiteCreationContext *site_context)
 
static Handle< ObjectGetDataProperty (Handle< JSObject > object, Handle< Name > key)
 
static Handle< ObjectGetDataProperty (LookupIterator *it)
 
static void PrintElementsTransition (FILE *file, Handle< JSObject > object, ElementsKind from_kind, Handle< FixedArrayBase > from_elements, ElementsKind to_kind, Handle< FixedArrayBase > to_elements)
 
static void EnqueueChangeRecord (Handle< JSObject > object, const char *type, Handle< Name > name, Handle< Object > old_value)
 
static void MigrateToNewProperty (Handle< JSObject > object, Handle< Map > transition, Handle< Object > value)
 
- Static Public Member Functions inherited from v8::internal::JSReceiver
static MUST_USE_RESULT MaybeHandle< ObjectSetElement (Handle< JSReceiver > object, uint32_t index, Handle< Object > value, PropertyAttributes attributes, StrictMode strict_mode)
 
static MUST_USE_RESULT Maybe< boolHasProperty (Handle< JSReceiver > object, Handle< Name > name)
 
static MUST_USE_RESULT Maybe< boolHasOwnProperty (Handle< JSReceiver >, Handle< Name > name)
 
static MUST_USE_RESULT Maybe< boolHasElement (Handle< JSReceiver > object, uint32_t index)
 
static MUST_USE_RESULT Maybe< boolHasOwnElement (Handle< JSReceiver > object, uint32_t index)
 
static MUST_USE_RESULT MaybeHandle< ObjectDeleteProperty (Handle< JSReceiver > object, Handle< Name > name, DeleteMode mode=NORMAL_DELETION)
 
static MUST_USE_RESULT MaybeHandle< ObjectDeleteElement (Handle< JSReceiver > object, uint32_t index, DeleteMode mode=NORMAL_DELETION)
 
static MUST_USE_RESULT Maybe< PropertyAttributesGetPropertyAttributes (Handle< JSReceiver > object, Handle< Name > name)
 
static MUST_USE_RESULT Maybe< PropertyAttributesGetPropertyAttributes (LookupIterator *it)
 
static MUST_USE_RESULT Maybe< PropertyAttributesGetOwnPropertyAttributes (Handle< JSReceiver > object, Handle< Name > name)
 
static MUST_USE_RESULT Maybe< PropertyAttributesGetElementAttribute (Handle< JSReceiver > object, uint32_t index)
 
static MUST_USE_RESULT Maybe< PropertyAttributesGetOwnElementAttribute (Handle< JSReceiver > object, uint32_t index)
 
static Handle< SmiGetOrCreateIdentityHash (Handle< JSReceiver > object)
 
static MUST_USE_RESULT MaybeHandle< FixedArrayGetKeys (Handle< JSReceiver > object, KeyCollectionType type)
 
- Static Public Member Functions inherited from v8::internal::HeapObject
static HeapObjectFromAddress (Address address)
 
static Object ** RawField (HeapObject *obj, int offset)
 
static void UpdateMapCodeCache (Handle< HeapObject > object, Handle< Name > name, Handle< Code > code)
 
- Static Public Member Functions inherited from v8::internal::Object
static Handle< ObjectNewStorageFor (Isolate *isolate, Handle< Object > object, Representation representation)
 
static Handle< ObjectWrapForRead (Isolate *isolate, Handle< Object > object, Representation representation)
 
static MaybeHandle< JSReceiverToObject (Isolate *isolate, Handle< Object > object)
 
static MaybeHandle< JSReceiverToObject (Isolate *isolate, Handle< Object > object, Handle< Context > context)
 
static MUST_USE_RESULT MaybeHandle< SmiToSmi (Isolate *isolate, Handle< Object > object)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetProperty (LookupIterator *it)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetProperty (Handle< Object > object, Handle< Name > key, Handle< Object > value, StrictMode strict_mode, StoreFromKeyed store_mode=MAY_BE_STORE_FROM_KEYED)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetProperty (LookupIterator *it, Handle< Object > value, StrictMode strict_mode, StoreFromKeyed store_mode, StorePropertyMode data_store_mode=NORMAL_PROPERTY)
 
static MUST_USE_RESULT MaybeHandle< ObjectWriteToReadOnlyProperty (LookupIterator *it, Handle< Object > value, StrictMode strict_mode)
 
static Handle< ObjectSetDataProperty (LookupIterator *it, Handle< Object > value)
 
static MUST_USE_RESULT MaybeHandle< ObjectAddDataProperty (LookupIterator *it, Handle< Object > value, PropertyAttributes attributes, StrictMode strict_mode, StoreFromKeyed store_mode)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyOrElement (Handle< Object > object, Handle< Name > key)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetProperty (Isolate *isolate, Handle< Object > object, const char *key)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetProperty (Handle< Object > object, Handle< Name > key)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyWithAccessor (Handle< Object > receiver, Handle< Name > name, Handle< JSObject > holder, Handle< Object > structure)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetPropertyWithAccessor (Handle< Object > receiver, Handle< Name > name, Handle< Object > value, Handle< JSObject > holder, Handle< Object > structure, StrictMode strict_mode)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetPropertyWithDefinedGetter (Handle< Object > receiver, Handle< JSReceiver > getter)
 
static MUST_USE_RESULT MaybeHandle< ObjectSetPropertyWithDefinedSetter (Handle< Object > receiver, Handle< JSReceiver > setter, Handle< Object > value)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetElement (Isolate *isolate, Handle< Object > object, uint32_t index)
 
static MUST_USE_RESULT MaybeHandle< ObjectGetElementWithReceiver (Isolate *isolate, Handle< Object > object, Handle< Object > receiver, uint32_t index)
 
static Handle< SmiGetOrCreateHash (Isolate *isolate, Handle< Object > object)
 

Static Public Attributes

static const int kDataOffset = JSObject::kHeaderSize
 
static const int kSize = kDataOffset + kPointerSize
 
static const int kTagIndex = 0
 
static const int kSourceIndex = kTagIndex + 1
 
static const int kFlagsIndex = kSourceIndex + 1
 
static const int kDataIndex = kFlagsIndex + 1
 
static const int kAtomPatternIndex = kDataIndex
 
static const int kAtomDataSize = kAtomPatternIndex + 1
 
static const int kIrregexpLatin1CodeIndex = kDataIndex
 
static const int kIrregexpUC16CodeIndex = kDataIndex + 1
 
static const int kIrregexpLatin1CodeSavedIndex = kDataIndex + 2
 
static const int kIrregexpUC16CodeSavedIndex = kDataIndex + 3
 
static const int kIrregexpMaxRegisterCountIndex = kDataIndex + 4
 
static const int kIrregexpCaptureCountIndex = kDataIndex + 5
 
static const int kIrregexpDataSize = kIrregexpCaptureCountIndex + 1
 
static const int kDataTagOffset
 
static const int kDataOneByteCodeOffset
 
static const int kDataUC16CodeOffset
 
static const int kIrregexpCaptureCountOffset
 
static const int kSourceFieldIndex = 0
 
static const int kGlobalFieldIndex = 1
 
static const int kIgnoreCaseFieldIndex = 2
 
static const int kMultilineFieldIndex = 3
 
static const int kLastIndexFieldIndex = 4
 
static const int kInObjectFieldCount = 5
 
static const int kUninitializedValue = -1
 
static const int kCompilationErrorValue = -2
 
static const int kCodeAgeMask = 0xff
 
- Static Public Attributes inherited from v8::internal::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 kInitialGlobalObjectUnusedPropertiesCount = 4
 
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 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
 

Additional Inherited Members

- Protected Member Functions inherited from v8::internal::HeapObject
void IteratePointers (ObjectVisitor *v, int start, int end)
 
void IteratePointer (ObjectVisitor *v, int offset)
 
void IterateNextCodeLink (ObjectVisitor *v, int offset)
 

Detailed Description

Definition at line 7712 of file objects.h.

Member Enumeration Documentation

◆ Flag

Enumerator
NONE 
GLOBAL 
IGNORE_CASE 
MULTILINE 
STICKY 

Definition at line 7720 of file objects.h.

7720  {
7721  NONE = 0,
7722  GLOBAL = 1,
7723  IGNORE_CASE = 2,
7724  MULTILINE = 4,
7725  STICKY = 8
7726  };

◆ Type

Enumerator
NOT_COMPILED 
ATOM 
IRREGEXP 

Definition at line 7719 of file objects.h.

Member Function Documentation

◆ CaptureCount()

int v8::internal::JSRegExp::CaptureCount ( )
inline

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

6276  {
6277  switch (TypeTag()) {
6278  case ATOM:
6279  return 0;
6280  case IRREGEXP:
6281  return Smi::cast(DataAt(kIrregexpCaptureCountIndex))->value();
6282  default:
6283  UNREACHABLE();
6284  return -1;
6285  }
6286 }
static const int kIrregexpCaptureCountIndex
Definition: objects.h:7806
Object * DataAt(int index)
Definition: objects-inl.h:6305
#define UNREACHABLE()
Definition: logging.h:30

References ATOM, DataAt(), IRREGEXP, kIrregexpCaptureCountIndex, TypeTag(), and UNREACHABLE.

+ Here is the call graph for this function:

◆ code_index()

static int v8::internal::JSRegExp::code_index ( bool  is_latin1)
inlinestatic

Definition at line 7750 of file objects.h.

7750  {
7751  if (is_latin1) {
7752  return kIrregexpLatin1CodeIndex;
7753  } else {
7754  return kIrregexpUC16CodeIndex;
7755  }
7756  }
static const int kIrregexpUC16CodeIndex
Definition: objects.h:7793
static const int kIrregexpLatin1CodeIndex
Definition: objects.h:7789

Referenced by v8::internal::RegExpImpl::CompileIrregexp(), v8::internal::RegExpImpl::EnsureCompiledIrregexp(), v8::internal::RegExpImpl::IrregexpByteCode(), v8::internal::RegExpImpl::IrregexpNativeCode(), and v8::internal::MarkCompactMarkingVisitor::UpdateRegExpCodeAgeAndFlush().

+ Here is the caller graph for this function:

◆ DataAt()

Object * v8::internal::JSRegExp::DataAt ( int  index)
inline

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

6305  {
6306  DCHECK(TypeTag() != NOT_COMPILED);
6307  return FixedArray::cast(data())->get(index);
6308 }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, NOT_COMPILED, and TypeTag().

Referenced by CaptureCount(), and v8::internal::MarkCompactMarkingVisitor::UpdateRegExpCodeAgeAndFlush().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFlags()

JSRegExp::Flags v8::internal::JSRegExp::GetFlags ( )
inline

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

6289  {
6290  DCHECK(this->data()->IsFixedArray());
6291  Object* data = this->data();
6292  Smi* smi = Smi::cast(FixedArray::cast(data)->get(kFlagsIndex));
6293  return Flags(smi->value());
6294 }
friend class Object
Definition: objects.h:2219
static const int kFlagsIndex
Definition: objects.h:7777

References DCHECK, kFlagsIndex, and v8::internal::Smi::value().

+ Here is the call graph for this function:

◆ Pattern()

String * v8::internal::JSRegExp::Pattern ( )
inline

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

6297  {
6298  DCHECK(this->data()->IsFixedArray());
6299  Object* data = this->data();
6300  String* pattern= String::cast(FixedArray::cast(data)->get(kSourceIndex));
6301  return pattern;
6302 }
static const int kSourceIndex
Definition: objects.h:7776

References DCHECK, and kSourceIndex.

Referenced by v8::internal::V8HeapExplorer::AddEntry().

+ Here is the caller graph for this function:

◆ saved_code_index()

static int v8::internal::JSRegExp::saved_code_index ( bool  is_latin1)
inlinestatic

Definition at line 7758 of file objects.h.

7758  {
7759  if (is_latin1) {
7761  } else {
7763  }
7764  }
static const int kIrregexpUC16CodeSavedIndex
Definition: objects.h:7800
static const int kIrregexpLatin1CodeSavedIndex
Definition: objects.h:7797

Referenced by v8::internal::RegExpImpl::CompileIrregexp(), v8::internal::RegExpImpl::EnsureCompiledIrregexp(), and v8::internal::MarkCompactMarkingVisitor::UpdateRegExpCodeAgeAndFlush().

+ Here is the caller graph for this function:

◆ SetDataAt()

void v8::internal::JSRegExp::SetDataAt ( int  index,
Object value 
)
inline

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

6311  {
6312  DCHECK(TypeTag() != NOT_COMPILED);
6313  DCHECK(index >= kDataIndex); // Only implementation data can be set this way.
6314  FixedArray::cast(data())->set(index, value);
6315 }
static const int kDataIndex
Definition: objects.h:7778

References DCHECK, kDataIndex, NOT_COMPILED, and TypeTag().

Referenced by v8::internal::MarkCompactMarkingVisitor::UpdateRegExpCodeAgeAndFlush().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ TypeTag()

JSRegExp::Type v8::internal::JSRegExp::TypeTag ( )
inline

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

6268  {
6269  Object* data = this->data();
6270  if (data->IsUndefined()) return JSRegExp::NOT_COMPILED;
6271  Smi* smi = Smi::cast(FixedArray::cast(data)->get(kTagIndex));
6272  return static_cast<JSRegExp::Type>(smi->value());
6273 }
static const int kTagIndex
Definition: objects.h:7775

References NOT_COMPILED, and v8::internal::Smi::value().

Referenced by CaptureCount(), DataAt(), SetDataAt(), and v8::internal::MarkCompactMarkingVisitor::UpdateRegExpCodeAgeAndFlush().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ kAtomDataSize

const int v8::internal::JSRegExp::kAtomDataSize = kAtomPatternIndex + 1
static

Definition at line 7784 of file objects.h.

◆ kAtomPatternIndex

const int v8::internal::JSRegExp::kAtomPatternIndex = kDataIndex
static

◆ kCodeAgeMask

const int v8::internal::JSRegExp::kCodeAgeMask = 0xff
static

Definition at line 7838 of file objects.h.

◆ kCompilationErrorValue

const int v8::internal::JSRegExp::kCompilationErrorValue = -2
static

◆ kDataIndex

const int v8::internal::JSRegExp::kDataIndex = kFlagsIndex + 1
static

Definition at line 7778 of file objects.h.

Referenced by SetDataAt().

◆ kDataOffset

const int v8::internal::JSRegExp::kDataOffset = JSObject::kHeaderSize
static

Definition at line 7771 of file objects.h.

◆ kDataOneByteCodeOffset

const int v8::internal::JSRegExp::kDataOneByteCodeOffset
static
Initial value:

Definition at line 7813 of file objects.h.

◆ kDataTagOffset

const int v8::internal::JSRegExp::kDataTagOffset
static
Initial value:

Definition at line 7811 of file objects.h.

◆ kDataUC16CodeOffset

const int v8::internal::JSRegExp::kDataUC16CodeOffset
static
Initial value:

Definition at line 7815 of file objects.h.

◆ kFlagsIndex

const int v8::internal::JSRegExp::kFlagsIndex = kSourceIndex + 1
static

◆ kGlobalFieldIndex

const int v8::internal::JSRegExp::kGlobalFieldIndex = 1
static

Definition at line 7822 of file objects.h.

Referenced by v8::internal::RUNTIME_FUNCTION().

◆ kIgnoreCaseFieldIndex

const int v8::internal::JSRegExp::kIgnoreCaseFieldIndex = 2
static

Definition at line 7823 of file objects.h.

Referenced by v8::internal::RUNTIME_FUNCTION().

◆ kInObjectFieldCount

const int v8::internal::JSRegExp::kInObjectFieldCount = 5
static

Definition at line 7826 of file objects.h.

◆ kIrregexpCaptureCountIndex

const int v8::internal::JSRegExp::kIrregexpCaptureCountIndex = kDataIndex + 5
static

Definition at line 7806 of file objects.h.

Referenced by CaptureCount(), and v8::internal::RegExpImpl::IrregexpNumberOfCaptures().

◆ kIrregexpCaptureCountOffset

const int v8::internal::JSRegExp::kIrregexpCaptureCountOffset
static
Initial value:

Definition at line 7817 of file objects.h.

◆ kIrregexpDataSize

const int v8::internal::JSRegExp::kIrregexpDataSize = kIrregexpCaptureCountIndex + 1
static

Definition at line 7808 of file objects.h.

◆ kIrregexpLatin1CodeIndex

const int v8::internal::JSRegExp::kIrregexpLatin1CodeIndex = kDataIndex
static

Definition at line 7789 of file objects.h.

◆ kIrregexpLatin1CodeSavedIndex

const int v8::internal::JSRegExp::kIrregexpLatin1CodeSavedIndex = kDataIndex + 2
static

Definition at line 7797 of file objects.h.

◆ kIrregexpMaxRegisterCountIndex

const int v8::internal::JSRegExp::kIrregexpMaxRegisterCountIndex = kDataIndex + 4
static

◆ kIrregexpUC16CodeIndex

const int v8::internal::JSRegExp::kIrregexpUC16CodeIndex = kDataIndex + 1
static

Definition at line 7793 of file objects.h.

◆ kIrregexpUC16CodeSavedIndex

const int v8::internal::JSRegExp::kIrregexpUC16CodeSavedIndex = kDataIndex + 3
static

Definition at line 7800 of file objects.h.

◆ kLastIndexFieldIndex

const int v8::internal::JSRegExp::kLastIndexFieldIndex = 4
static

Definition at line 7825 of file objects.h.

Referenced by v8::internal::RUNTIME_FUNCTION().

◆ kMultilineFieldIndex

const int v8::internal::JSRegExp::kMultilineFieldIndex = 3
static

Definition at line 7824 of file objects.h.

Referenced by v8::internal::RUNTIME_FUNCTION().

◆ kSize

const int v8::internal::JSRegExp::kSize = kDataOffset + kPointerSize
static

Definition at line 7772 of file objects.h.

Referenced by v8::internal::JSObject::GetHeaderSize().

◆ kSourceFieldIndex

const int v8::internal::JSRegExp::kSourceFieldIndex = 0
static

Definition at line 7821 of file objects.h.

Referenced by v8::internal::RUNTIME_FUNCTION().

◆ kSourceIndex

const int v8::internal::JSRegExp::kSourceIndex = kTagIndex + 1
static

◆ kTagIndex

const int v8::internal::JSRegExp::kTagIndex = 0
static

Definition at line 7775 of file objects.h.

◆ kUninitializedValue

const int v8::internal::JSRegExp::kUninitializedValue = -1
static

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