Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
dart::RegExp Class Reference

#include <object.h>

Inheritance diagram for dart::RegExp:
dart::Instance dart::Object

Classes

class  DotAllBit
 
class  FlagsBits
 
class  GlobalBit
 
class  IgnoreCaseBit
 
class  MultiLineBit
 
class  TypeBits
 
class  UnicodeBit
 

Public Types

enum  RegExType { kUninitialized = 0 , kSimple = 1 , kComplex = 2 }
 
enum  { kTypePos = 0 , kTypeSize = 2 , kFlagsPos = 2 , kFlagsSize = 5 }
 
- Public Types inherited from dart::Object
enum  NameVisibility { kInternalName = 0 , kScrubbedName , kUserVisibleName }
 
enum class  NameDisambiguation { kYes , kNo }
 
using UntaggedObjectType = UntaggedObject
 
using ObjectPtrType = ObjectPtr
 

Public Member Functions

bool is_initialized () const
 
bool is_simple () const
 
bool is_complex () const
 
intptr_t num_registers (bool is_one_byte) const
 
StringPtr pattern () const
 
intptr_t num_bracket_expressions () const
 
ArrayPtr capture_name_map () const
 
TypedDataPtr bytecode (bool is_one_byte, bool sticky) const
 
FunctionPtr function (intptr_t cid, bool sticky) const
 
void set_pattern (const String &pattern) const
 
void set_function (intptr_t cid, bool sticky, const Function &value) const
 
void set_bytecode (bool is_one_byte, bool sticky, const TypedData &bytecode) const
 
void set_num_bracket_expressions (SmiPtr value) const
 
void set_num_bracket_expressions (const Smi &value) const
 
void set_num_bracket_expressions (intptr_t value) const
 
void set_capture_name_map (const Array &array) const
 
void set_is_global () const
 
void set_is_ignore_case () const
 
void set_is_multi_line () const
 
void set_is_unicode () const
 
void set_is_dot_all () const
 
void set_is_simple () const
 
void set_is_complex () const
 
void set_num_registers (bool is_one_byte, intptr_t value) const
 
RegExpFlags flags () const
 
void set_flags (RegExpFlags flags) const
 
virtual bool CanonicalizeEquals (const Instance &other) const
 
virtual uint32_t CanonicalizeHash () const
 
- Public Member Functions inherited from dart::Instance
virtual bool OperatorEquals (const Instance &other) const
 
bool IsIdenticalTo (const Instance &other) const
 
virtual bool CanonicalizeEquals (const Instance &other) const
 
virtual uint32_t CanonicalizeHash () const
 
intptr_t SizeFromClass () const
 
InstancePtr Canonicalize (Thread *thread) const
 
virtual InstancePtr CanonicalizeLocked (Thread *thread) const
 
virtual void CanonicalizeFieldsLocked (Thread *thread) const
 
InstancePtr CopyShallowToOldSpace (Thread *thread) const
 
ObjectPtr GetField (const Field &field) const
 
void SetField (const Field &field, const Object &value) const
 
AbstractTypePtr GetType (Heap::Space space) const
 
virtual TypeArgumentsPtr GetTypeArguments () const
 
virtual void SetTypeArguments (const TypeArguments &value) const
 
bool IsInstanceOf (const AbstractType &other, const TypeArguments &other_instantiator_type_arguments, const TypeArguments &other_function_type_arguments) const
 
bool IsAssignableTo (const AbstractType &other, const TypeArguments &other_instantiator_type_arguments, const TypeArguments &other_function_type_arguments) const
 
bool IsValidNativeIndex (int index) const
 
intptr_t * NativeFieldsDataAddr () const
 
intptr_t GetNativeField (int index) const
 
void GetNativeFields (uint16_t num_fields, intptr_t *field_values) const
 
void SetNativeFields (uint16_t num_fields, const intptr_t *field_values) const
 
uint16_t NumNativeFields () const
 
void SetNativeField (int index, intptr_t value) const
 
bool IsCallable (Function *function) const
 
ObjectPtr Invoke (const String &selector, const Array &arguments, const Array &argument_names, bool respect_reflectable=true, bool check_is_entrypoint=false) const
 
ObjectPtr InvokeGetter (const String &selector, bool respect_reflectable=true, bool check_is_entrypoint=false) const
 
ObjectPtr InvokeSetter (const String &selector, const Instance &argument, bool respect_reflectable=true, bool check_is_entrypoint=false) const
 
ObjectPtr EvaluateCompiledExpression (const Class &klass, const ExternalTypedData &kernel_buffer, const Array &type_definitions, const Array &arguments, const TypeArguments &type_arguments) const
 
virtual ObjectPtr HashCode () const
 
IntegerPtr IdentityHashCode (Thread *thread) const
 
virtual bool IsPointer () const
 
- Public Member Functions inherited from dart::Object
virtual ~Object ()
 
ObjectPtr ptr () const
 
void operator= (ObjectPtr value)
 
bool IsCanonical () const
 
void SetCanonical () const
 
void ClearCanonical () const
 
bool IsImmutable () const
 
void SetImmutable () const
 
void ClearImmutable () const
 
intptr_t GetClassId () const
 
ClassPtr clazz () const
 
 CLASS_LIST_FOR_HANDLES (DEFINE_CLASS_TESTER)
 
bool IsNull () const
 
virtual const char * ToCString () const
 
void PrintJSON (JSONStream *stream, bool ref=true) const
 
virtual void PrintJSONImpl (JSONStream *stream, bool ref) const
 
void PrintImplementationFields (JSONStream *stream) const
 
virtual void PrintImplementationFieldsImpl (const JSONArray &jsarr_fields) const
 
virtual const char * JSONType () const
 
virtual StringPtr DictionaryName () const
 
bool IsNew () const
 
bool IsOld () const
 
bool InVMIsolateHeap () const
 
void Print () const
 

Static Public Member Functions

static intptr_t function_offset (intptr_t cid, bool sticky)
 
static intptr_t InstanceSize ()
 
static RegExpPtr New (Zone *zone, Heap::Space space=Heap::kNew)
 
- Static Public Member Functions inherited from dart::Instance
static bool NullIsAssignableTo (const AbstractType &other)
 
static bool NullIsAssignableTo (const AbstractType &other, const TypeArguments &other_instantiator_type_arguments, const TypeArguments &other_function_type_arguments)
 
static ObjectPtr EvaluateCompiledExpression (Thread *thread, const Object &receiver, const Library &library, const Class &klass, const ExternalTypedData &kernel_buffer, const Array &type_definitions, const Array &param_values, const TypeArguments &type_param_values)
 
static intptr_t UnroundedSize ()
 
static intptr_t InstanceSize ()
 
static InstancePtr New (const Class &cls, Heap::Space space=Heap::kNew)
 
static InstancePtr NewAlreadyFinalized (const Class &cls, Heap::Space space=Heap::kNew)
 
static intptr_t DataOffsetFor (intptr_t cid)
 
static intptr_t ElementSizeFor (intptr_t cid)
 
static intptr_t NextFieldOffset ()
 
static intptr_t NativeFieldsOffset ()
 
- Static Public Member Functions inherited from dart::Object
static ObjectPtr RawCast (ObjectPtr obj)
 
static constexpr bool ContainsCompressedPointers ()
 
static intptr_t tags_offset ()
 
static ObjectHandle ()
 
static ObjectHandle (Zone *zone)
 
static ObjectHandle (ObjectPtr ptr)
 
static ObjectHandle (Zone *zone, ObjectPtr ptr)
 
static ObjectZoneHandle ()
 
static ObjectZoneHandle (Zone *zone)
 
static ObjectZoneHandle (ObjectPtr ptr)
 
static ObjectZoneHandle (Zone *zone, ObjectPtr ptr)
 
static ObjectReadOnlyHandle ()
 
static ObjectPtr null ()
 
static void set_vm_isolate_snapshot_object_table (const Array &table)
 
static ClassPtr class_class ()
 
static ClassPtr dynamic_class ()
 
static ClassPtr void_class ()
 
static ClassPtr type_parameters_class ()
 
static ClassPtr type_arguments_class ()
 
static ClassPtr patch_class_class ()
 
static ClassPtr function_class ()
 
static ClassPtr closure_data_class ()
 
static ClassPtr ffi_trampoline_data_class ()
 
static ClassPtr field_class ()
 
static ClassPtr script_class ()
 
static ClassPtr library_class ()
 
static ClassPtr namespace_class ()
 
static ClassPtr kernel_program_info_class ()
 
static ClassPtr code_class ()
 
static ClassPtr instructions_class ()
 
static ClassPtr instructions_section_class ()
 
static ClassPtr instructions_table_class ()
 
static ClassPtr object_pool_class ()
 
static ClassPtr pc_descriptors_class ()
 
static ClassPtr code_source_map_class ()
 
static ClassPtr compressed_stackmaps_class ()
 
static ClassPtr var_descriptors_class ()
 
static ClassPtr exception_handlers_class ()
 
static ClassPtr context_class ()
 
static ClassPtr context_scope_class ()
 
static ClassPtr sentinel_class ()
 
static ClassPtr api_error_class ()
 
static ClassPtr language_error_class ()
 
static ClassPtr unhandled_exception_class ()
 
static ClassPtr unwind_error_class ()
 
static ClassPtr singletargetcache_class ()
 
static ClassPtr unlinkedcall_class ()
 
static ClassPtr monomorphicsmiablecall_class ()
 
static ClassPtr icdata_class ()
 
static ClassPtr megamorphic_cache_class ()
 
static ClassPtr subtypetestcache_class ()
 
static ClassPtr loadingunit_class ()
 
static ClassPtr weak_serialization_reference_class ()
 
static ClassPtr weak_array_class ()
 
static void InitNullAndBool (IsolateGroup *isolate_group)
 
static void Init (IsolateGroup *isolate_group)
 
static void InitVtables ()
 
static void FinishInit (IsolateGroup *isolate_group)
 
static void FinalizeVMIsolate (IsolateGroup *isolate_group)
 
static void FinalizeReadOnlyObject (ObjectPtr object)
 
static void Cleanup ()
 
static ErrorPtr Init (IsolateGroup *isolate_group, const uint8_t *kernel_buffer, intptr_t kernel_buffer_size)
 
static void MakeUnusedSpaceTraversable (const Object &obj, intptr_t original_size, intptr_t used_size)
 
static intptr_t InstanceSize ()
 
template<class FakeObject >
static void VerifyBuiltinVtable (intptr_t cid)
 
static void VerifyBuiltinVtables ()
 
static bool ShouldHaveImmutabilityBitSet (classid_t class_id)
 

Friends

class Class
 

Additional Inherited Members

- Static Public Attributes inherited from dart::Object
static constexpr intptr_t kHashBits = 30
 
static const ClassId kClassId = kObjectCid
 
- Protected Member Functions inherited from dart::Instance
virtual void PrintSharedInstanceJSON (JSONObject *jsobj, bool ref, bool include_id=true) const
 
- Protected Member Functions inherited from dart::Object
 Object ()
 
uword raw_value () const
 
void setPtr (ObjectPtr value, intptr_t default_cid)
 
void CheckHandle () const
 
cpp_vtable vtable () const
 
void set_vtable (cpp_vtable value)
 
bool Contains (uword addr) const
 
template<typename type , std::memory_order order = std::memory_order_relaxed>
type LoadPointer (type const *addr) const
 
template<typename type , std::memory_order order = std::memory_order_relaxed>
void StorePointer (type const *addr, type value) const
 
template<typename type , typename compressed_type , std::memory_order order = std::memory_order_relaxed>
void StoreCompressedPointer (compressed_type const *addr, type value) const
 
template<typename type >
void StorePointerUnaligned (type const *addr, type value, Thread *thread) const
 
void StoreSmi (SmiPtr const *addr, SmiPtr value) const
 
template<typename FieldType >
void StoreSimd128 (const FieldType *addr, simd128_value_t value) const
 
template<typename FieldType >
FieldType LoadNonPointer (const FieldType *addr) const
 
template<typename FieldType , std::memory_order order>
FieldType LoadNonPointer (const FieldType *addr) const
 
template<typename FieldType , typename ValueType >
void StoreNonPointer (const FieldType *addr, ValueType value) const
 
template<typename FieldType , typename ValueType , std::memory_order order>
void StoreNonPointer (const FieldType *addr, ValueType value) const
 
template<typename FieldType >
FieldType * UnsafeMutableNonPointer (const FieldType *addr) const
 
 CLASS_LIST (STORE_NON_POINTER_ILLEGAL_TYPE)
 
void UnimplementedMethod () const
 
void AddCommonObjectProperties (JSONObject *jsobj, const char *protocol_type, bool ref) const
 
- Static Protected Member Functions inherited from dart::Object
static DART_NOINLINE ObjectHandleImpl (Zone *zone, ObjectPtr ptr, intptr_t default_cid)
 
static DART_NOINLINE ObjectZoneHandleImpl (Zone *zone, ObjectPtr ptr, intptr_t default_cid)
 
static DART_NOINLINE ObjectReadOnlyHandleImpl (intptr_t cid)
 
static ObjectPtr Allocate (intptr_t cls_id, intptr_t size, Heap::Space space, bool compressed, uword ptr_field_start_offset, uword ptr_field_end_offset)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType Allocate (Heap::Space space)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType Allocate (Heap::Space space, intptr_t elements)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType AllocateVariant (intptr_t class_id, Heap::Space space)
 
template<typename T >
static DART_FORCE_INLINE T::ObjectPtrType AllocateVariant (intptr_t class_id, Heap::Space space, intptr_t elements)
 
static constexpr intptr_t RoundedAllocationSize (intptr_t size)
 
static ObjectPtr Clone (const Object &orig, Heap::Space space, bool load_with_relaxed_atomics=false)
 
template<typename T >
static DART_FORCE_INLINE uword from_offset ()
 
template<typename T >
static DART_FORCE_INLINE uword to_offset (intptr_t length=0)
 
- Protected Attributes inherited from dart::Object
ObjectPtr ptr_
 

Detailed Description

Definition at line 12756 of file object.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kTypePos 
kTypeSize 
kFlagsPos 
kFlagsSize 

Definition at line 12768 of file object.h.

12768 {
12769 kTypePos = 0,
12770 kTypeSize = 2,
12771 kFlagsPos = 2,
12772 kFlagsSize = 5,
12773 };

◆ RegExType

Enumerator
kUninitialized 
kSimple 
kComplex 

Definition at line 12762 of file object.h.

12762 {
12763 kUninitialized = 0,
12764 kSimple = 1,
12765 kComplex = 2,
12766 };
@ kUninitialized
Definition: object.h:12763

Member Function Documentation

◆ bytecode()

TypedDataPtr dart::RegExp::bytecode ( bool  is_one_byte,
bool  sticky 
) const
inline

Definition at line 12803 of file object.h.

12803 {
12804 if (sticky) {
12805 return TypedData::RawCast(
12806 is_one_byte ? untag()->one_byte_sticky<std::memory_order_acquire>()
12807 : untag()->two_byte_sticky<std::memory_order_acquire>());
12808 } else {
12809 return TypedData::RawCast(
12810 is_one_byte ? untag()->one_byte<std::memory_order_acquire>()
12811 : untag()->two_byte<std::memory_order_acquire>());
12812 }
12813 }
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325
raw_obj untag() -> num_entries()) VARIABLE_COMPRESSED_VISITOR(Array, Smi::Value(raw_obj->untag() ->length())) VARIABLE_COMPRESSED_VISITOR(TypedData, TypedData::ElementSizeInBytes(raw_obj->GetClassId()) *Smi::Value(raw_obj->untag() ->length())) VARIABLE_COMPRESSED_VISITOR(Record, RecordShape(raw_obj->untag() ->shape()).num_fields()) VARIABLE_NULL_VISITOR(CompressedStackMaps, CompressedStackMaps::PayloadSizeOf(raw_obj)) VARIABLE_NULL_VISITOR(OneByteString, Smi::Value(raw_obj->untag() ->length())) VARIABLE_NULL_VISITOR(TwoByteString, Smi::Value(raw_obj->untag() ->length())) intptr_t UntaggedField::VisitFieldPointers(FieldPtr raw_obj, ObjectPointerVisitor *visitor)
Definition: raw_object.cc:558

◆ CanonicalizeEquals()

bool dart::RegExp::CanonicalizeEquals ( const Instance other) const
virtual

Reimplemented from dart::Instance.

Definition at line 26724 of file object.cc.

26724 {
26725 if (this->ptr() == other.ptr()) {
26726 return true; // "===".
26727 }
26728 if (other.IsNull() || !other.IsRegExp()) {
26729 return false;
26730 }
26731 const RegExp& other_js = RegExp::Cast(other);
26732 // Match the pattern.
26733 const String& str1 = String::Handle(pattern());
26734 const String& str2 = String::Handle(other_js.pattern());
26735 if (!str1.Equals(str2)) {
26736 return false;
26737 }
26738 // Match the flags.
26739 if (flags() != other_js.flags()) {
26740 return false;
26741 }
26742 return true;
26743}
friend class RegExp
Definition: object.h:8439
ObjectPtr ptr() const
Definition: object.h:332
static Object & Handle()
Definition: object.h:407
StringPtr pattern() const
Definition: object.h:12797
RegExpFlags flags() const
Definition: object.h:12891

◆ CanonicalizeHash()

uint32_t dart::RegExp::CanonicalizeHash ( ) const
virtual

Reimplemented from dart::Instance.

Definition at line 26745 of file object.cc.

26745 {
26746 // Must agree with RegExpKey::Hash.
26748}
uword Hash() const
Definition: object.h:10216
uint8_t value
uint32_t CombineHashes(uint32_t hash, uint32_t other_hash)
Definition: hash.h:12

◆ capture_name_map()

ArrayPtr dart::RegExp::capture_name_map ( ) const
inline

Definition at line 12801 of file object.h.

12801{ return untag()->capture_name_map(); }

◆ flags()

RegExpFlags dart::RegExp::flags ( ) const
inline

Definition at line 12891 of file object.h.

12891 {
12892 return RegExpFlags(untag()->type_flags_.Read<FlagsBits>());
12893 }

◆ function()

FunctionPtr dart::RegExp::function ( intptr_t  cid,
bool  sticky 
) const
inline

Definition at line 12836 of file object.h.

12836 {
12837 if (sticky) {
12838 switch (cid) {
12839 case kOneByteStringCid:
12840 return static_cast<FunctionPtr>(untag()->one_byte_sticky());
12841 case kTwoByteStringCid:
12842 return static_cast<FunctionPtr>(untag()->two_byte_sticky());
12843 }
12844 } else {
12845 switch (cid) {
12846 case kOneByteStringCid:
12847 return static_cast<FunctionPtr>(untag()->one_byte());
12848 case kTwoByteStringCid:
12849 return static_cast<FunctionPtr>(untag()->two_byte());
12850 }
12851 }
12852
12853 UNREACHABLE();
12854 return Function::null();
12855 }
#define UNREACHABLE()
Definition: assert.h:248
static ObjectPtr null()
Definition: object.h:433
const intptr_t cid

◆ function_offset()

static intptr_t dart::RegExp::function_offset ( intptr_t  cid,
bool  sticky 
)
inlinestatic

Definition at line 12815 of file object.h.

12815 {
12816 if (sticky) {
12817 switch (cid) {
12818 case kOneByteStringCid:
12819 return OFFSET_OF(UntaggedRegExp, one_byte_sticky_);
12820 case kTwoByteStringCid:
12821 return OFFSET_OF(UntaggedRegExp, two_byte_sticky_);
12822 }
12823 } else {
12824 switch (cid) {
12825 case kOneByteStringCid:
12826 return OFFSET_OF(UntaggedRegExp, one_byte_);
12827 case kTwoByteStringCid:
12828 return OFFSET_OF(UntaggedRegExp, two_byte_);
12829 }
12830 }
12831
12832 UNREACHABLE();
12833 return -1;
12834 }
#define OFFSET_OF(type, field)
Definition: globals.h:138

◆ InstanceSize()

static intptr_t dart::RegExp::InstanceSize ( )
inlinestatic

Definition at line 12901 of file object.h.

12901 {
12902 return RoundedAllocationSize(sizeof(UntaggedRegExp));
12903 }
static constexpr intptr_t RoundedAllocationSize(intptr_t size)
Definition: object.h:758

◆ is_complex()

bool dart::RegExp::is_complex ( ) const
inline

Definition at line 12789 of file object.h.

12789{ return (type() == kComplex); }

◆ is_initialized()

bool dart::RegExp::is_initialized ( ) const
inline

Definition at line 12787 of file object.h.

12787{ return (type() != kUninitialized); }

◆ is_simple()

bool dart::RegExp::is_simple ( ) const
inline

Definition at line 12788 of file object.h.

12788{ return (type() == kSimple); }

◆ New()

RegExpPtr dart::RegExp::New ( Zone zone,
Heap::Space  space = Heap::kNew 
)
static

Definition at line 26662 of file object.cc.

26662 {
26663 const auto& result = RegExp::Handle(Object::Allocate<RegExp>(space));
26665 ASSERT(result.flags() == RegExpFlags());
26666 result.set_num_bracket_expressions(-1);
26667 result.set_num_registers(/*is_one_byte=*/false, -1);
26668 result.set_num_registers(/*is_one_byte=*/true, -1);
26669
26670 if (!FLAG_interpret_irregexp) {
26671 auto thread = Thread::Current();
26672 const Library& lib = Library::Handle(zone, Library::CoreLibrary());
26673 const Class& owner =
26674 Class::Handle(zone, lib.LookupClass(Symbols::RegExp()));
26675
26676 for (intptr_t cid = kOneByteStringCid; cid <= kTwoByteStringCid; cid++) {
26677 CreateSpecializedFunction(thread, zone, result, cid, /*sticky=*/false,
26678 owner);
26679 CreateSpecializedFunction(thread, zone, result, cid, /*sticky=*/true,
26680 owner);
26681 }
26682 }
26683 return result.ptr();
26684}
#define ASSERT_EQUAL(expected, actual)
Definition: assert.h:309
static LibraryPtr CoreLibrary()
Definition: object.cc:14787
friend class Class
Definition: object.h:12914
static Thread * Current()
Definition: thread.h:362
#define ASSERT(E)
GAsyncResult * result
void CreateSpecializedFunction(Thread *thread, Zone *zone, const RegExp &regexp, intptr_t specialization_cid, bool sticky, const Object &owner)
Definition: regexp.cc:5523

◆ num_bracket_expressions()

intptr_t dart::RegExp::num_bracket_expressions ( ) const
inline

Definition at line 12798 of file object.h.

12798 {
12799 return untag()->num_bracket_expressions_;
12800 }

◆ num_registers()

intptr_t dart::RegExp::num_registers ( bool  is_one_byte) const
inline

Definition at line 12791 of file object.h.

12791 {
12792 return LoadNonPointer<intptr_t, std::memory_order_relaxed>(
12793 is_one_byte ? &untag()->num_one_byte_registers_
12794 : &untag()->num_two_byte_registers_);
12795 }

◆ pattern()

StringPtr dart::RegExp::pattern ( ) const
inline

Definition at line 12797 of file object.h.

12797{ return untag()->pattern(); }

◆ set_bytecode()

void dart::RegExp::set_bytecode ( bool  is_one_byte,
bool  sticky,
const TypedData bytecode 
) const

Definition at line 26636 of file object.cc.

26638 {
26639 if (sticky) {
26640 if (is_one_byte) {
26641 untag()->set_one_byte_sticky<std::memory_order_release>(bytecode.ptr());
26642 } else {
26643 untag()->set_two_byte_sticky<std::memory_order_release>(bytecode.ptr());
26644 }
26645 } else {
26646 if (is_one_byte) {
26647 untag()->set_one_byte<std::memory_order_release>(bytecode.ptr());
26648 } else {
26649 untag()->set_two_byte<std::memory_order_release>(bytecode.ptr());
26650 }
26651 }
26652}
TypedDataPtr bytecode(bool is_one_byte, bool sticky) const
Definition: object.h:12803

◆ set_capture_name_map()

void dart::RegExp::set_capture_name_map ( const Array array) const

Definition at line 26658 of file object.cc.

26658 {
26659 untag()->set_capture_name_map(array.ptr());
26660}

◆ set_flags()

void dart::RegExp::set_flags ( RegExpFlags  flags) const
inline

Definition at line 12894 of file object.h.

12894 {
12895 untag()->type_flags_.Update<FlagsBits>(flags.value());
12896 }
int value() const
Definition: object.h:12742

◆ set_function()

void dart::RegExp::set_function ( intptr_t  cid,
bool  sticky,
const Function value 
) const

Definition at line 26616 of file object.cc.

26618 {
26619 if (sticky) {
26620 switch (cid) {
26621 case kOneByteStringCid:
26622 return untag()->set_one_byte_sticky(value.ptr());
26623 case kTwoByteStringCid:
26624 return untag()->set_two_byte_sticky(value.ptr());
26625 }
26626 } else {
26627 switch (cid) {
26628 case kOneByteStringCid:
26629 return untag()->set_one_byte(value.ptr());
26630 case kTwoByteStringCid:
26631 return untag()->set_two_byte(value.ptr());
26632 }
26633 }
26634}

◆ set_is_complex()

void dart::RegExp::set_is_complex ( ) const
inline

Definition at line 12883 of file object.h.

12883{ set_type(kComplex); }

◆ set_is_dot_all()

void dart::RegExp::set_is_dot_all ( ) const
inline

Definition at line 12879 of file object.h.

12879 {
12880 untag()->type_flags_.UpdateBool<DotAllBit>(true);
12881 }

◆ set_is_global()

void dart::RegExp::set_is_global ( ) const
inline

Definition at line 12867 of file object.h.

12867 {
12868 untag()->type_flags_.UpdateBool<GlobalBit>(true);
12869 }

◆ set_is_ignore_case()

void dart::RegExp::set_is_ignore_case ( ) const
inline

Definition at line 12870 of file object.h.

12870 {
12871 untag()->type_flags_.UpdateBool<IgnoreCaseBit>(true);
12872 }

◆ set_is_multi_line()

void dart::RegExp::set_is_multi_line ( ) const
inline

Definition at line 12873 of file object.h.

12873 {
12874 untag()->type_flags_.UpdateBool<MultiLineBit>(true);
12875 }

◆ set_is_simple()

void dart::RegExp::set_is_simple ( ) const
inline

Definition at line 12882 of file object.h.

12882{ set_type(kSimple); }

◆ set_is_unicode()

void dart::RegExp::set_is_unicode ( ) const
inline

Definition at line 12876 of file object.h.

12876 {
12877 untag()->type_flags_.UpdateBool<UnicodeBit>(true);
12878 }

◆ set_num_bracket_expressions() [1/3]

void dart::RegExp::set_num_bracket_expressions ( const Smi value) const

◆ set_num_bracket_expressions() [2/3]

void dart::RegExp::set_num_bracket_expressions ( intptr_t  value) const

Definition at line 26654 of file object.cc.

26654 {
26655 untag()->num_bracket_expressions_ = value;
26656}

◆ set_num_bracket_expressions() [3/3]

void dart::RegExp::set_num_bracket_expressions ( SmiPtr  value) const

◆ set_num_registers()

void dart::RegExp::set_num_registers ( bool  is_one_byte,
intptr_t  value 
) const
inline

Definition at line 12884 of file object.h.

12884 {
12885 StoreNonPointer<intptr_t, intptr_t, std::memory_order_relaxed>(
12886 is_one_byte ? &untag()->num_one_byte_registers_
12887 : &untag()->num_two_byte_registers_,
12888 value);
12889 }

◆ set_pattern()

void dart::RegExp::set_pattern ( const String pattern) const

Definition at line 26612 of file object.cc.

26612 {
26613 untag()->set_pattern(pattern.ptr());
26614}

Friends And Related Function Documentation

◆ Class

friend class Class
friend

Definition at line 12914 of file object.h.


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