Home
last modified time | relevance | path

Searched refs:header (Results 1 – 25 of 33) sorted by relevance

12

/ark/runtime_core/runtime/tests/
Dmonitor_test.cpp65 auto header = ObjectHeader::Create(cls); in TEST_F() local
66 Monitor::MonitorEnter(header); in TEST_F()
67 ASSERT_TRUE(header->AtomicGetMark().GetState() == MarkWord::STATE_LIGHT_LOCKED); in TEST_F()
68 Monitor::MonitorExit(header); in TEST_F()
69 ASSERT_TRUE(header->AtomicGetMark().GetState() == MarkWord::STATE_UNLOCKED); in TEST_F()
76 auto header = ObjectHeader::Create(cls); in TEST_F() local
77 Monitor::MonitorEnter(header); in TEST_F()
78 ASSERT_TRUE(header->AtomicGetMark().GetState() == MarkWord::STATE_LIGHT_LOCKED); in TEST_F()
79 Monitor::MonitorEnter(header); in TEST_F()
80 ASSERT_TRUE(header->AtomicGetMark().GetState() == MarkWord::STATE_LIGHT_LOCKED); in TEST_F()
[all …]
/ark/runtime_core/libpandafile/
Dfile.h148 const Header *header = GetHeader(); in IsExternal() local
149 uint32_t foreign_begin = header->foreign_off; in IsExternal()
150 uint32_t foreign_end = foreign_begin + header->foreign_size; in IsExternal()
161 const Header *header = GetHeader(); in GetSpanFromId() local
162 Span file(GetBase(), header->file_size); in GetSpanFromId()
168 const Header *header = GetHeader(); in GetClasses() local
169 Span file(GetBase(), header->file_size); in GetClasses()
170 … Span class_idx_data = file.SubSpan(header->class_idx_off, header->num_classes * sizeof(uint32_t)); in GetClasses()
171 return Span(reinterpret_cast<const uint32_t *>(class_idx_data.data()), header->num_classes); in GetClasses()
176 const Header *header = GetHeader(); in GetLiteralArrays() local
[all …]
Dfile.cpp515 auto header = reinterpret_cast<const File::Header *>(ptr.Get()); in CheckHeader() local
516 if (header->magic != File::MAGIC) { in CheckHeader()
527 auto header = reinterpret_cast<const Header *>(ptr.Get()); in OpenFromMemory() local
528 if (header->magic != File::MAGIC) { in OpenFromMemory()
533 if (header->file_size < sizeof(File::Header)) { in OpenFromMemory()
546 auto header = reinterpret_cast<const Header *>(ptr.Get()); in OpenFromMemory() local
548 if (header->magic != File::MAGIC) { in OpenFromMemory()
553 if (header->file_size < sizeof(File::Header)) { in OpenFromMemory()
587 const Header *header = GetHeader(); in GetLiteralArraysId() local
588 return EntityId(header->literalarray_idx_off); in GetLiteralArraysId()
Dfile_item_container.cpp912 for (auto &header : headers_) { in ComputeLayout() local
913 header.SetOffset(offset); in ComputeLayout()
914 header.ComputeLayout(); in ComputeLayout()
915 offset += header.GetSize(); in ComputeLayout()
929 for (auto &header : headers_) { in Write() local
930 if (!header.Write(writer)) { in Write()
/ark/runtime_core/runtime/
Dintrinsics.cpp291 void ObjectMonitorEnter(ObjectHeader *header) in ObjectMonitorEnter() argument
293 if (header == nullptr) { in ObjectMonitorEnter()
297 auto res = Monitor::MonitorEnter(header); in ObjectMonitorEnter()
302 … LOG(FATAL, RUNTIME) << "MonitorEnter for " << std::hex << header << " returned Illegal state!"; in ObjectMonitorEnter()
306 void ObjectMonitorExit(ObjectHeader *header) in ObjectMonitorExit() argument
308 if (header == nullptr) { in ObjectMonitorExit()
312 auto res = Monitor::MonitorExit(header); in ObjectMonitorExit()
317 ss << "MonitorExit for object " << std::hex << header << " returned Illegal state"; in ObjectMonitorExit()
322 void ObjectWait(ObjectHeader *header) in ObjectWait() argument
324 Monitor::State state = Monitor::Wait(header, ThreadStatus::IS_WAITING, 0, 0); in ObjectWait()
[all …]
/ark/js_runtime/ecmascript/mem/
Dfull_gc.cpp98 auto header = value.GetTaggedWeakRef(); in SweepPhases() local
100 Region *objectRegion = Region::ObjectAddressToRange(header); in SweepPhases()
103 if (!markBitmap->Test(header)) { in SweepPhases()
107 MarkWord markWord(header); in SweepPhases()
120 WeakRootVisitor gcUpdateWeak = [](TaggedObject *header) { in SweepPhases() argument
121 Region *objectRegion = Region::ObjectAddressToRange(header); in SweepPhases()
124 if (markBitmap->Test(header)) { in SweepPhases()
125 return header; in SweepPhases()
130 MarkWord markWord(header); in SweepPhases()
Dparallel_evacuation.cpp111 auto header = reinterpret_cast<TaggedObject *>(mem); in EvacuateRegion() local
112 auto klass = header->GetClass(); in EvacuateRegion()
113 auto size = klass->SizeFromJSHClass(header); in EvacuateRegion()
137 Barriers::SetDynPrimitive(header, 0, MarkWord::FromForwardingAddress(address)); in EvacuateRegion()
258 WeakRootVisitor gcUpdateWeak = [isFullMark](TaggedObject *header) { in UpdateWeakReference() argument
259 … Region *objectRegion = Region::ObjectAddressToRange(reinterpret_cast<TaggedObject *>(header)); in UpdateWeakReference()
263 if (markBitmap->Test(header)) { in UpdateWeakReference()
264 return header; in UpdateWeakReference()
267 MarkWord markWord(header); in UpdateWeakReference()
276 if (markBitmap == nullptr || !markBitmap->Test(header)) { in UpdateWeakReference()
[all …]
Dmix_gc.cpp112 WeakRootVisitor gcUpdateWeak = [this](TaggedObject *header) { in ProcessNativeDelete() argument
113 … Region *objectRegion = Region::ObjectAddressToRange(reinterpret_cast<TaggedObject *>(header)); in ProcessNativeDelete()
115 return header; in ProcessNativeDelete()
118 if (!markBitmap->Test(header)) { in ProcessNativeDelete()
121 return header; in ProcessNativeDelete()
Dstw_young_gc_for_testing.cpp107 auto header = value.GetTaggedWeakRef(); in SweepPhases() local
108 MarkWord markWord(header); in SweepPhases()
120 WeakRootVisitor gcUpdateWeak = [](TaggedObject *header) { in SweepPhases() argument
121 … Region *objectRegion = Region::ObjectAddressToRange(reinterpret_cast<TaggedObject *>(header)); in SweepPhases()
123 return header; in SweepPhases()
126 MarkWord markWord(header); in SweepPhases()
Dtagged_object.h30 static TaggedObject *Cast(ObjectHeader *header) in Cast() argument
32 return static_cast<TaggedObject *>(header); in Cast()
Dmark_word.h37 explicit MarkWord(TaggedObject *header) in MarkWord() argument
39 …value_ = reinterpret_cast<volatile std::atomic<MarkWordType> *>(header)->load(std::memory_order_ac… in MarkWord()
Dslots.h31 void Update(TaggedObject *header) in Update() argument
33 Update(static_cast<JSTaggedType>(ToUintPtr(header))); in Update()
Dsparse_space.cpp220 auto header = reinterpret_cast<TaggedObject *>(mem); in FreeRegion() local
221 auto klass = header->GetClass(); in FreeRegion()
222 auto size = klass->SizeFromJSHClass(header); in FreeRegion()
/ark/js_runtime/ecmascript/
Dobject_factory-inl.h48 TaggedObject *header; in NewJSNativePointer() local
51 header = heap_->AllocateNonMovableOrHugeObject(jsNativePointerClass); in NewJSNativePointer()
53 header = heap_->AllocateYoungOrHugeObject(jsNativePointerClass); in NewJSNativePointer()
55 JSHandle<JSNativePointer> obj(thread_, header); in NewJSNativePointer()
66 auto header = heap_->TryAllocateYoungGeneration( in InlineNewLexicalEnv() local
68 if (UNLIKELY(header == nullptr)) { in InlineNewLexicalEnv()
71 LexicalEnv *array = LexicalEnv::Cast(header); in InlineNewLexicalEnv()
Dobject_factory.cpp285 auto header = heap_->AllocateYoungOrHugeObject(klass, size); in CloneProperties() local
286 JSHandle<TaggedArray> newArray(thread_, header); in CloneProperties()
350 auto header = heap_->AllocateYoungOrHugeObject(klass, size); in CloneProperties() local
351 JSHandle<TaggedArray> newArray(thread_, header); in CloneProperties()
852 TaggedObject *header = heap_->AllocateYoungOrHugeObject(*dynclass); in NewDynObject() local
855 InitializeExtraProperties(dynclass, header, inobjPropCount); in NewDynObject()
857 return header; in NewDynObject()
863 TaggedObject *header = heap_->AllocateNonMovableOrHugeObject(*dynclass); in NewNonMovableDynObject() local
865 InitializeExtraProperties(dynclass, header, inobjPropCount); in NewNonMovableDynObject()
867 return header; in NewNonMovableDynObject()
[all …]
Djs_hclass-inl.h172 inline size_t JSHClass::SizeFromJSHClass(TaggedObject *header) in SizeFromJSHClass() argument
180 reinterpret_cast<TaggedArray *>(header)->GetLength()); in SizeFromJSHClass()
183 size = reinterpret_cast<EcmaString *>(header)->ObjectSize(); in SizeFromJSHClass()
187 size = reinterpret_cast<MachineCode *>(header)->GetMachineCodeObjectSize(); in SizeFromJSHClass()
/ark/runtime_core/libpandafile/tests/
Dfile_item_container_test.cpp98 File::Header header = {}; in TEST() local
99 header.magic = File::MAGIC; in TEST()
104 header.version = old; in TEST()
105 header.file_size = sizeof(File::Header); in TEST()
107 for (uint8_t b : Span<uint8_t>(reinterpret_cast<uint8_t *>(&header), sizeof(header))) { in TEST()
122 File::Header header = {}; in TEST() local
123 header.magic = File::MAGIC; in TEST()
128 header.version = new_; in TEST()
129 header.file_size = sizeof(File::Header); in TEST()
131 for (uint8_t b : Span<uint8_t>(reinterpret_cast<uint8_t *>(&header), sizeof(header))) { in TEST()
[all …]
/ark/ts2abc/ts2panda/src/
DcmdOptions.ts190 header: "Ark JavaScript Compiler",
194 header: 'Options',
/ark/runtime_core/cmake/
DTemplateBasedGen.cmake157 # Create an options header using a YAML file for the target
162 # GENERATED_HEADER -- generated header
164 # Use "#include 'generated/GENERATED_HEADER"' to include the generated header
171 # Generate an options header
DClangTidy.cmake92 # * -header-filter is set to check only headers of the target_name. It is supposed
114 …"-header-filter='^(${CMAKE_SOURCE_DIR}|${CMAKE_BINARY_DIR}).*/(assembler|compiler|debugger|libpand…
138 "-llvm-header-guard" # disabled because of incorrect root prefix
/ark/runtime_core/runtime/mem/
Dobject_helpers.cpp59 PandaString GetDebugInfoAboutObject(const ObjectHeader *header) in GetDebugInfoAboutObject() argument
62 …ss << "( " << header->ClassAddr<Class>()->GetDescriptor() << " " << std::hex << header << " " << s… in GetDebugInfoAboutObject()
63 … << GetObjectSize(header) << " bytes) mword = " << std::hex << header->AtomicGetMark().GetValue(); in GetDebugInfoAboutObject()
Dfreelist.h242 void SetPrevHeader(MemoryBlockHeader *header) in SetPrevHeader() argument
245 prev_header_ = header; in SetPrevHeader()
Dobject_helpers.h49 PandaString GetDebugInfoAboutObject(const ObjectHeader *header);
/ark/runtime_core/docs/
Dmemory-management.md7 …, so we should maximize efforts on reducing memory overhead (fragmentation and object header size).
12 * [Object header](#object-header)
46 * Get size of the object header and an object itself
66 128-bit object header for high-end devices (64-bit pointers):
84 64-bit object header for high-end devices (32-bit pointers):
103 However, we can also support such version of the object header (Hash is stored just after the objec…
123 32-bit object header for low-end devices:
275 | header for run of objects with size X| obj with size X | free mem size X | ... | obj with size X |
/ark/runtime_core/tests/verifier-tests/
Dbug_2107_1.pa42 # header

12