Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
 
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 12730 of file object.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kTypePos 
kTypeSize 
kFlagsPos 
kFlagsSize 

Definition at line 12742 of file object.h.

12742 {
12743 kTypePos = 0,
12744 kTypeSize = 2,
12745 kFlagsPos = 2,
12746 kFlagsSize = 5,
12747 };

◆ RegExType

Enumerator
kUninitialized 
kSimple 
kComplex 

Definition at line 12736 of file object.h.

12736 {
12737 kUninitialized = 0,
12738 kSimple = 1,
12739 kComplex = 2,
12740 };

Member Function Documentation

◆ bytecode()

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

Definition at line 12777 of file object.h.

12777 {
12778 if (sticky) {
12779 return TypedData::RawCast(
12780 is_one_byte ? untag()->one_byte_sticky<std::memory_order_acquire>()
12781 : untag()->two_byte_sticky<std::memory_order_acquire>());
12782 } else {
12783 return TypedData::RawCast(
12784 is_one_byte ? untag()->one_byte<std::memory_order_acquire>()
12785 : untag()->two_byte<std::memory_order_acquire>());
12786 }
12787 }
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 ref_ptr.h:256

◆ CanonicalizeEquals()

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

Reimplemented from dart::Instance.

Definition at line 26803 of file object.cc.

26803 {
26804 if (this->ptr() == other.ptr()) {
26805 return true; // "===".
26806 }
26807 if (other.IsNull() || !other.IsRegExp()) {
26808 return false;
26809 }
26810 const RegExp& other_js = RegExp::Cast(other);
26811 // Match the pattern.
26812 const String& str1 = String::Handle(pattern());
26813 const String& str2 = String::Handle(other_js.pattern());
26814 if (!str1.Equals(str2)) {
26815 return false;
26816 }
26817 // Match the flags.
26818 if (flags() != other_js.flags()) {
26819 return false;
26820 }
26821 return true;
26822}
friend class RegExp
Definition object.h:8410
ObjectPtr ptr() const
Definition object.h:332
static Object & Handle()
Definition object.h:407
StringPtr pattern() const
Definition object.h:12771
RegExpFlags flags() const
Definition object.h:12865

◆ CanonicalizeHash()

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

Reimplemented from dart::Instance.

Definition at line 26824 of file object.cc.

26824 {
26825 // Must agree with RegExpKey::Hash.
26827}
uword Hash() const
Definition object.h:10195
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 12775 of file object.h.

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

◆ flags()

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

Definition at line 12865 of file object.h.

12865 {
12866 return RegExpFlags(untag()->type_flags_.Read<FlagsBits>());
12867 }

◆ function()

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

Definition at line 12810 of file object.h.

12810 {
12811 if (sticky) {
12812 switch (cid) {
12813 case kOneByteStringCid:
12814 return static_cast<FunctionPtr>(untag()->one_byte_sticky());
12815 case kTwoByteStringCid:
12816 return static_cast<FunctionPtr>(untag()->two_byte_sticky());
12817 }
12818 } else {
12819 switch (cid) {
12820 case kOneByteStringCid:
12821 return static_cast<FunctionPtr>(untag()->one_byte());
12822 case kTwoByteStringCid:
12823 return static_cast<FunctionPtr>(untag()->two_byte());
12824 }
12825 }
12826
12827 UNREACHABLE();
12828 return Function::null();
12829 }
#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 12789 of file object.h.

12789 {
12790 if (sticky) {
12791 switch (cid) {
12792 case kOneByteStringCid:
12793 return OFFSET_OF(UntaggedRegExp, one_byte_sticky_);
12794 case kTwoByteStringCid:
12795 return OFFSET_OF(UntaggedRegExp, two_byte_sticky_);
12796 }
12797 } else {
12798 switch (cid) {
12799 case kOneByteStringCid:
12800 return OFFSET_OF(UntaggedRegExp, one_byte_);
12801 case kTwoByteStringCid:
12802 return OFFSET_OF(UntaggedRegExp, two_byte_);
12803 }
12804 }
12805
12806 UNREACHABLE();
12807 return -1;
12808 }
#define OFFSET_OF(type, field)
Definition globals.h:138

◆ InstanceSize()

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

Definition at line 12875 of file object.h.

12875 {
12876 return RoundedAllocationSize(sizeof(UntaggedRegExp));
12877 }
static constexpr intptr_t RoundedAllocationSize(intptr_t size)
Definition object.h:758

◆ is_complex()

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

Definition at line 12763 of file object.h.

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

◆ is_initialized()

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

Definition at line 12761 of file object.h.

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

◆ is_simple()

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

Definition at line 12762 of file object.h.

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

◆ New()

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

Definition at line 26741 of file object.cc.

26741 {
26742 const auto& result = RegExp::Handle(Object::Allocate<RegExp>(space));
26744 ASSERT(result.flags() == RegExpFlags());
26745 result.set_num_bracket_expressions(-1);
26746 result.set_num_registers(/*is_one_byte=*/false, -1);
26747 result.set_num_registers(/*is_one_byte=*/true, -1);
26748
26749 if (!FLAG_interpret_irregexp) {
26750 auto thread = Thread::Current();
26751 const Library& lib = Library::Handle(zone, Library::CoreLibrary());
26752 const Class& owner =
26753 Class::Handle(zone, lib.LookupClass(Symbols::RegExp()));
26754
26755 for (intptr_t cid = kOneByteStringCid; cid <= kTwoByteStringCid; cid++) {
26756 CreateSpecializedFunction(thread, zone, result, cid, /*sticky=*/false,
26757 owner);
26758 CreateSpecializedFunction(thread, zone, result, cid, /*sticky=*/true,
26759 owner);
26760 }
26761 }
26762 return result.ptr();
26763}
#define ASSERT_EQUAL(expected, actual)
Definition assert.h:309
static LibraryPtr CoreLibrary()
Definition object.cc:14834
friend class Class
Definition object.h:12888
static Thread * Current()
Definition thread.h:361
#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 12772 of file object.h.

12772 {
12773 return untag()->num_bracket_expressions_;
12774 }

◆ num_registers()

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

Definition at line 12765 of file object.h.

12765 {
12766 return LoadNonPointer<intptr_t, std::memory_order_relaxed>(
12767 is_one_byte ? &untag()->num_one_byte_registers_
12768 : &untag()->num_two_byte_registers_);
12769 }

◆ pattern()

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

Definition at line 12771 of file object.h.

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

◆ set_bytecode()

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

Definition at line 26715 of file object.cc.

26717 {
26718 if (sticky) {
26719 if (is_one_byte) {
26720 untag()->set_one_byte_sticky<std::memory_order_release>(bytecode.ptr());
26721 } else {
26722 untag()->set_two_byte_sticky<std::memory_order_release>(bytecode.ptr());
26723 }
26724 } else {
26725 if (is_one_byte) {
26726 untag()->set_one_byte<std::memory_order_release>(bytecode.ptr());
26727 } else {
26728 untag()->set_two_byte<std::memory_order_release>(bytecode.ptr());
26729 }
26730 }
26731}
TypedDataPtr bytecode(bool is_one_byte, bool sticky) const
Definition object.h:12777

◆ set_capture_name_map()

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

Definition at line 26737 of file object.cc.

26737 {
26738 untag()->set_capture_name_map(array.ptr());
26739}

◆ set_flags()

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

Definition at line 12868 of file object.h.

12868 {
12869 untag()->type_flags_.Update<FlagsBits>(flags.value());
12870 }
int value() const
Definition object.h:12716

◆ set_function()

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

Definition at line 26695 of file object.cc.

26697 {
26698 if (sticky) {
26699 switch (cid) {
26700 case kOneByteStringCid:
26701 return untag()->set_one_byte_sticky(value.ptr());
26702 case kTwoByteStringCid:
26703 return untag()->set_two_byte_sticky(value.ptr());
26704 }
26705 } else {
26706 switch (cid) {
26707 case kOneByteStringCid:
26708 return untag()->set_one_byte(value.ptr());
26709 case kTwoByteStringCid:
26710 return untag()->set_two_byte(value.ptr());
26711 }
26712 }
26713}

◆ set_is_complex()

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

Definition at line 12857 of file object.h.

12857{ set_type(kComplex); }

◆ set_is_dot_all()

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

Definition at line 12853 of file object.h.

12853 {
12854 untag()->type_flags_.UpdateBool<DotAllBit>(true);
12855 }

◆ set_is_global()

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

Definition at line 12841 of file object.h.

12841 {
12842 untag()->type_flags_.UpdateBool<GlobalBit>(true);
12843 }

◆ set_is_ignore_case()

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

Definition at line 12844 of file object.h.

12844 {
12845 untag()->type_flags_.UpdateBool<IgnoreCaseBit>(true);
12846 }

◆ set_is_multi_line()

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

Definition at line 12847 of file object.h.

12847 {
12848 untag()->type_flags_.UpdateBool<MultiLineBit>(true);
12849 }

◆ set_is_simple()

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

Definition at line 12856 of file object.h.

12856{ set_type(kSimple); }

◆ set_is_unicode()

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

Definition at line 12850 of file object.h.

12850 {
12851 untag()->type_flags_.UpdateBool<UnicodeBit>(true);
12852 }

◆ 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 26733 of file object.cc.

26733 {
26734 untag()->num_bracket_expressions_ = value;
26735}

◆ 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 12858 of file object.h.

12858 {
12859 StoreNonPointer<intptr_t, intptr_t, std::memory_order_relaxed>(
12860 is_one_byte ? &untag()->num_one_byte_registers_
12861 : &untag()->num_two_byte_registers_,
12862 value);
12863 }

◆ set_pattern()

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

Definition at line 26691 of file object.cc.

26691 {
26692 untag()->set_pattern(pattern.ptr());
26693}

Friends And Related Symbol Documentation

◆ Class

friend class Class
friend

Definition at line 12888 of file object.h.


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