/ark/runtime_core/runtime/ |
D | string_table.h | 38 …virtual coretypes::String *GetOrInternString(const uint8_t *mutf8_data, uint32_t utf16_length, Lan… 39 virtual coretypes::String *GetOrInternString(const uint16_t *utf16_data, uint32_t utf16_length, 41 coretypes::String *GetOrInternString(coretypes::String *string, LanguageContext ctx); 43 …coretypes::String *GetOrInternInternalString(const panda_file::File &pf, panda_file::File::EntityI… 46 …coretypes::String *GetInternalStringFast(const panda_file::File &pf, panda_file::File::EntityId id) in GetInternalStringFast() 51 using StringVisitor = std::function<void(coretypes::String *)>; 71 … virtual coretypes::String *GetOrInternString(const uint8_t *mutf8_data, uint32_t utf16_length, 73 … virtual coretypes::String *GetOrInternString(const uint16_t *utf16_data, uint32_t utf16_length, 75 coretypes::String *GetOrInternString(coretypes::String *string, LanguageContext ctx); 82 …coretypes::String *GetString(const uint8_t *utf8_data, uint32_t utf16_length, bool can_be_compress… [all …]
|
D | string_table.cpp | 23 coretypes::String *StringTable::GetOrInternString(const uint8_t *mutf8_data, uint32_t utf16_length,… in GetOrInternString() 25 bool can_be_compressed = coretypes::String::CanBeCompressedMUtf8(mutf8_data); in GetOrInternString() 33 coretypes::String *StringTable::GetOrInternString(const uint16_t *utf16_data, uint32_t utf16_length, in GetOrInternString() 43 coretypes::String *StringTable::GetOrInternString(coretypes::String *string, LanguageContext ctx) in GetOrInternString() 52 coretypes::String *StringTable::GetOrInternInternalString(const panda_file::File &pf, panda_file::F… in GetOrInternInternalString() 56 coretypes::String *str = table_.GetString(data.data, data.utf16_length, data.is_ascii, ctx); in GetOrInternInternalString() 78 coretypes::String *StringTable::Table::GetString(const uint8_t *utf8_data, uint32_t utf16_length, in GetString() 81 …uint32_t hash_code = coretypes::String::ComputeHashcodeMutf8(utf8_data, utf16_length, can_be_compr… in GetString() 85 …if (coretypes::String::StringsAreEqualMUtf8(found_string, utf8_data, utf16_length, can_be_compress… in GetString() 92 coretypes::String *StringTable::Table::GetString(const uint16_t *utf16_data, uint32_t utf16_length, in GetString() [all …]
|
D | global_handle_storage-inl.h | 70 inline void GlobalHandleStorage<coretypes::TaggedType>::DisposeGlobalHandle(uintptr_t nodeAddr) in DisposeGlobalHandle() 74 node->SetObject(coretypes::TaggedValue::VALUE_UNDEFINED); in DisposeGlobalHandle() 85 inline void GlobalHandleStorage<coretypes::TaggedType>::DealUpdateObject(std::array<Node, GLOBAL_BL… in DealUpdateObject() 88 coretypes::TaggedValue obj(block->at(index).GetObject()); in DealUpdateObject() 90 coretypes::TaggedValue value(panda::mem::GetForwardAddress(obj.GetHeapObject())); in DealUpdateObject() 96 inline void GlobalHandleStorage<coretypes::TaggedType>::UpdateHeapObject() in UpdateHeapObject() 116 inline void GlobalHandleStorage<coretypes::TaggedType>::DealVisitGCRoots(std::array<Node, GLOBAL_BL… in DealVisitGCRoots() 119 coretypes::TaggedValue value(block->at(index).GetObject()); in DealVisitGCRoots() 126 inline void GlobalHandleStorage<coretypes::TaggedType>::VisitGCRoots([[maybe_unused]] const ObjectV… in VisitGCRoots() 145 template class GlobalHandleStorage<coretypes::TaggedType>;
|
D | handle_scope.cpp | 22 uintptr_t HandleScope<coretypes::TaggedType>::NewHandle(coretypes::TaggedType value) in NewHandle() 24 uintptr_t addr = thread_->GetHandleStorage<coretypes::TaggedType>()->NewHandle(value); in NewHandle()
|
D | intrinsics.cpp | 173 void PrintStringInternal(coretypes::String *v) in PrintStringInternal() 188 void PrintString(coretypes::String *v) in PrintString() 241 void AssertPrint(uint8_t cond, coretypes::String *s) in AssertPrint() 249 int32_t ConvertStringToI32(coretypes::String *s) in ConvertStringToI32() 254 uint32_t ConvertStringToU32(coretypes::String *s) in ConvertStringToU32() 259 int64_t ConvertStringToI64(coretypes::String *s) in ConvertStringToI64() 264 uint64_t ConvertStringToU64(coretypes::String *s) in ConvertStringToU64() 269 float ConvertStringToF32(coretypes::String *s) in ConvertStringToF32() 274 double ConvertStringToF64(coretypes::String *s) in ConvertStringToF64()
|
D | dyn_class_linker_extension.cpp | 26 using Array = coretypes::Array; 27 using NativePointer = coretypes::NativePointer; 47 coretypes::Class::FromRuntimeClass(classClass)->SetClass(classClass); in InitializeImpl() 166 …heap_manager->AllocateNonMovableObject(GetClassRoot(ClassRoot::CLASS), coretypes::Class::GetSize(s… in CreateClass() 168 auto *res = reinterpret_cast<coretypes::Class *>(object_header); in CreateClass() 180 auto *cls = coretypes::Class::FromRuntimeClass(klass); in FreeClass()
|
D | exceptions.cpp | 67 void ThrowArrayIndexOutOfBoundsException(coretypes::array_ssize_t idx, coretypes::array_size_t leng… in ThrowArrayIndexOutOfBoundsException() 74 void ThrowArrayIndexOutOfBoundsException(coretypes::array_ssize_t idx, coretypes::array_size_t leng… in ThrowArrayIndexOutOfBoundsException() 84 void ThrowIndexOutOfBoundsException(coretypes::array_ssize_t idx, coretypes::array_ssize_t length) in ThrowIndexOutOfBoundsException() 102 void ThrowStringIndexOutOfBoundsException(coretypes::array_ssize_t idx, coretypes::array_size_t len… in ThrowStringIndexOutOfBoundsException() 114 void ThrowNegativeArraySizeException(coretypes::array_ssize_t size) in ThrowNegativeArraySizeException()
|
D | handle_storage-inl.h | 86 inline void HandleStorage<coretypes::TaggedType>::UpdateHeapObject() in UpdateHeapObject() 97 coretypes::TaggedValue obj(node->at(j)); in UpdateHeapObject() 99 …(*node)[j] = coretypes::TaggedValue(panda::mem::GetForwardAddress(obj.GetHeapObject())).GetRawData… in UpdateHeapObject() 106 inline void HandleStorage<coretypes::TaggedType>::VisitGCRoots([[maybe_unused]] const ObjectVisitor… in VisitGCRoots() 121 coretypes::TaggedValue obj(node->at(j)); in VisitGCRoots() 171 template class HandleStorage<coretypes::TaggedType>;
|
/ark/runtime_core/runtime/include/ |
D | thread-inl.h | 27 inline void ManagedThread::PushHandleScope<coretypes::TaggedType>(HandleScope<coretypes::TaggedType… 33 inline HandleScope<coretypes::TaggedType> *ManagedThread::PopHandleScope<coretypes::TaggedType>() 35 HandleScope<coretypes::TaggedType> *scope = tagged_handle_scopes_.back(); 41 inline HandleScope<coretypes::TaggedType> *ManagedThread::GetTopScope<coretypes::TaggedType>() const 50 inline HandleStorage<coretypes::TaggedType> *ManagedThread::GetHandleStorage<coretypes::TaggedType>… 56 inline GlobalHandleStorage<coretypes::TaggedType> *ManagedThread::GetGlobalHandleStorage<coretypes:…
|
D | exceptions.h | 35 void ThrowArrayIndexOutOfBoundsException(coretypes::array_ssize_t idx, coretypes::array_size_t leng… 36 void ThrowArrayIndexOutOfBoundsException(coretypes::array_ssize_t idx, coretypes::array_size_t leng… 39 void ThrowIndexOutOfBoundsException(coretypes::array_ssize_t idx, coretypes::array_ssize_t length); 43 void ThrowStringIndexOutOfBoundsException(coretypes::array_ssize_t idx, coretypes::array_size_t len… 45 void ThrowNegativeArraySizeException(coretypes::array_ssize_t size);
|
/ark/runtime_core/runtime/mem/gc/dynamic/ |
D | gc_dynamic_impl.cpp | 56 const coretypes::DynClass *cls) in HandleClass() 59 HClass *klass = const_cast<coretypes::DynClass *>(cls)->GetHClass(); in HandleClass() 61 …auto dynclass_dynclass = static_cast<coretypes::DynClass *>(cls->ClassAddr<HClass>()->GetManagedOb… in HandleClass() 64 … size_t klass_size = dynclass_dynclass->GetHClass()->GetObjectSize() - sizeof(coretypes::DynClass); in HandleClass() 87 const coretypes::Array *array_object, in HandleArrayClass() 93 …size_t array_start_addr = reinterpret_cast<uintptr_t>(array_object) + coretypes::Array::GetDataOff… in HandleArrayClass() 94 for (coretypes::array_size_t i = 0; i < array_length; i++) { in HandleArrayClass() 122 auto dyn_class = static_cast<const panda::coretypes::DynClass *>(object); in MarkInstance() 125 auto *array_object = static_cast<const panda::coretypes::Array *>(object); in MarkInstance()
|
D | gc_dynamic_data.h | 28 dyn_weak_references_ = a->New<PandaStack<coretypes::TaggedType *>>(a->Adapter()); in GCDynamicData() 40 PandaStack<coretypes::TaggedType *> *GetDynWeakReferences() in GetDynWeakReferences() 46 PandaStack<coretypes::TaggedType *> *dyn_weak_references_;
|
/ark/runtime_core/docs/ |
D | runtime-class.md | 14 namespace panda::coretypes { 21 } // namespace panda::coretypes 24 The layout of the `coretypes::Class` is as follows: 27 mirror class (`coretypes::Class`) --------> +------------------+ <-+ 40 Such layout allows to get pointer to the `panda::Class` object from the `coretypes::Class` one and … 43 auto *managed_class_obj = coretypes::Class::FromRuntimeClass(klass); 48 Where `coretypes::Class::FromRuntimeClass` and `coretypes::Class::GetRuntimeClass` are implemented … 52 namespace panda::coretypes { 70 } // namespace panda::coretypes 86 managed_class_obj = coretypes::Class::FromRuntimeClass(klass);
|
/ark/runtime_core/runtime/tests/interpreter/ |
D | test_runtime_interface.h | 102 coretypes::array_ssize_t idx; 103 coretypes::array_size_t length; 108 coretypes::array_ssize_t size; 134 …static coretypes::String *ResolveString([[maybe_unused]] PandaVM *vm, [[maybe_unused]] const Metho… in ResolveString() 138 return ToPointer<coretypes::String>(0x55667788); in ResolveString() 141 …static coretypes::Array *ResolveLiteralArray([[maybe_unused]] PandaVM *vm, [[maybe_unused]] const … in ResolveLiteralArray() 145 return ToPointer<coretypes::Array>(0x7788); in ResolveLiteralArray() 229 static coretypes::Array *CreateArray(Class *klass, coretypes::array_size_t length) in CreateArray() 241 static void SetupArrayLength(coretypes::array_size_t length) in SetupArrayLength() 246 static void SetupArrayObject(coretypes::Array *obj) in SetupArrayObject() [all …]
|
/ark/runtime_core/runtime/core/ |
D | core_language_context.h | 204 coretypes::TaggedValue GetInitialTaggedValue() const override in GetInitialTaggedValue() 206 return coretypes::TaggedValue(coretypes::TaggedValue::VALUE_UNDEFINED); in GetInitialTaggedValue() 211 return DecodedTaggedValue(coretypes::TaggedValue::VALUE_UNDEFINED, 0); in GetInitialDecodedValue() 214 …DecodedTaggedValue GetDecodedTaggedValue([[maybe_unused]] const coretypes::TaggedValue &value) con… in GetDecodedTaggedValue() 217 return DecodedTaggedValue(coretypes::TaggedValue::VALUE_UNDEFINED, 0); in GetDecodedTaggedValue() 220 coretypes::TaggedValue GetEncodedTaggedValue([[maybe_unused]] int64_t value, in GetEncodedTaggedValue() 223 return coretypes::TaggedValue(coretypes::TaggedValue::VALUE_UNDEFINED); in GetEncodedTaggedValue()
|
/ark/runtime_core/runtime/tests/ |
D | mem_stats_gc_test.cpp | 62 ASSERT(object_size >= sizeof(coretypes::String)); in MemStatsTest() 71 for (size_t j = 0; j < object_size - sizeof(coretypes::String); j++) { in MemStatsTest() 78 size_t alloc_size = simple_string.size() + sizeof(coretypes::String); in MemStatsTest() 94 std::array<VMHandle<coretypes::String> *, object_count> handlers; in MemStatsTest() 98 coretypes::String *string_obj = in MemStatsTest() 99 … coretypes::String::CreateFromMUtf8(reinterpret_cast<const uint8_t *>(&simple_string[0]), in MemStatsTest() 102 handlers[j] = allocator->New<VMHandle<coretypes::String>>(thread_, string_obj); in MemStatsTest()
|
D | string_table_test.cpp | 43 static coretypes::String *AllocUtf8String(std::vector<uint8_t> data) in AllocUtf8String() 46 … return coretypes::String::CreateFromMUtf8(data.data(), utf::MUtf8ToUtf16Size(data.data()), ctx, in AllocUtf8String() 105 …coretypes::String::CreateFromUtf16(data.data(), data.size(), ctx, Runtime::GetCurrent()->GetPandaV… in TEST_F() 107 …coretypes::String::CreateFromUtf16(data.data(), data.size(), ctx, Runtime::GetCurrent()->GetPandaV… in TEST_F() 146 VMHandle<coretypes::String> s2h(thread, s2); in TEST_F() 147 VMHandle<coretypes::String> s3h(thread, s3); in TEST_F()
|
D | multithreaded_intern_string_table_test.cpp | 52 static coretypes::String *AllocUtf8String(std::vector<uint8_t> data) in AllocUtf8String() 55 … return coretypes::String::CreateFromMUtf8(data.data(), utf::MUtf8ToUtf16Size(data.data()), ctx, in AllocUtf8String() 90 void CheckSameString(coretypes::String *string) in CheckSameString() 140 coretypes::String *string_ {nullptr};
|
/ark/runtime_core/runtime/coretypes/ |
D | array.cpp | 26 namespace panda::coretypes { namespace 38 return static_cast<coretypes::Array *>( in AllocateArray() 42 return static_cast<coretypes::Array *>(vm->GetHeapManager()->AllocateNonMovableObject( in AllocateArray() 90 size_t elem_size = coretypes::TaggedValue::TaggedTypeSize(); in Create() 110 size_t elem_size = coretypes::TaggedValue::TaggedTypeSize(); in CreateTagged()
|
/ark/js_runtime/ecmascript/ |
D | js_tagged_value.h | 50 using JSTaggedType = coretypes::TaggedType; 61 class JSTaggedValue : public coretypes::TaggedValue { 71 constexpr explicit JSTaggedValue(coretypes::TaggedType v) : coretypes::TaggedValue(v) {} in JSTaggedValue() 72 constexpr explicit JSTaggedValue(int v) : coretypes::TaggedValue(v) {} in JSTaggedValue() 73 explicit JSTaggedValue(unsigned int v) : coretypes::TaggedValue(v) {} in JSTaggedValue() 74 constexpr explicit JSTaggedValue(bool v) : coretypes::TaggedValue(v) {} in JSTaggedValue() 75 explicit JSTaggedValue(double v) : coretypes::TaggedValue(v) {} in JSTaggedValue() 76 explicit JSTaggedValue(const ObjectHeader *v) : coretypes::TaggedValue(v) {} in JSTaggedValue() 77 explicit JSTaggedValue(const TaggedObject *v) : coretypes::TaggedValue(v) {} in JSTaggedValue() 78 …explicit JSTaggedValue(const coretypes::TaggedValue &other) : coretypes::TaggedValue(other.GetRawD… in JSTaggedValue() [all …]
|
D | ecma_class_linker_extension.cpp | 72 void *ptr = vm_->GetChunk()->Allocate(coretypes::Class::GetSize(size)); in NewClass() 74 auto *res = reinterpret_cast<coretypes::Class *>(ptr); in NewClass() 104 auto *cls = coretypes::Class::FromRuntimeClass(klass); in FreeClass()
|
/ark/runtime_core/runtime/interpreter/ |
D | runtime_interface.h | 42 static coretypes::String *ResolveString(PandaVM *vm, const Method &caller, BytecodeId id) in ResolveString() 130 static coretypes::Array *ResolveLiteralArray(PandaVM *vm, const Method &caller, BytecodeId id) in ResolveLiteralArray() 155 static coretypes::Array *CreateArray(Class *klass, coretypes::array_size_t length) in CreateArray() 157 return coretypes::Array::Create(klass, length); in CreateArray() 177 …static void ThrowArrayIndexOutOfBoundsException(coretypes::array_ssize_t idx, coretypes::array_siz… in ThrowArrayIndexOutOfBoundsException() 182 static void ThrowNegativeArraySizeException(coretypes::array_ssize_t size) in ThrowNegativeArraySizeException()
|
/ark/runtime_core/runtime/mem/ |
D | object_helpers.cpp | 31 using DynClass = coretypes::DynClass; 32 using TaggedValue = coretypes::TaggedValue; 33 using TaggedType = coretypes::TaggedType; 45 auto *string_object = static_cast<const coretypes::String *>(obj_header); in GetObjectSize() 48 auto *array_object = static_cast<const coretypes::Array *>(obj_header); in GetObjectSize() 49 …object_size = sizeof(coretypes::Array) + array_object->GetLength() * TaggedValue::TaggedTypeSize(); in GetObjectSize() 76 auto array = static_cast<coretypes::Array *>(object_header); in DumpObject() 86 auto *str_object = static_cast<panda::coretypes::String *>(object_header); in DumpObject() 223 void GCDynamicObjectHelpers::RecordDynWeakReference(GC *gc, coretypes::TaggedType *value) in RecordDynWeakReference() 238 coretypes::TaggedType *object_pointer = weak_refs->top(); in HandleDynWeakReferences() [all …]
|
D | object_helpers-inl.h | 153 auto *array_object = static_cast<coretypes::Array *>(object); in TraverseArray() 155 for (coretypes::array_size_t i = 0; i < array_length; i++) { in TraverseArray() 173 auto dyn_class = coretypes::DynClass::Cast(object); in TraverseObject() 176 auto dynclass_dynclass = static_cast<coretypes::DynClass *>(cls->GetManagedObject()); in TraverseObject() 178 … size_t klass_size = dynclass_dynclass->GetHClass()->GetObjectSize() - sizeof(coretypes::DynClass); in TraverseObject() 223 auto *array_object = static_cast<coretypes::Array *>(object); in TraverseArray() 225 for (coretypes::array_size_t i = 0; i < array_length; i++) { in TraverseArray()
|
/ark/runtime_core/runtime/templates/ |
D | intrinsics.h.erb | 22 #include "include/coretypes/tagged_value.h" 26 using tagged = coretypes::TaggedValue; 27 namespace coretypes { 30 } // namespace coretypes
|