Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 225) sorted by relevance

123456789

/arkcompiler/ets_runtime/ecmascript/regexp/
Dregexp_opcode.cpp129 uint32_t SaveStartOpCode::DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const in DumpOpCode()
131 out << offset << ":\t" in DumpOpCode()
132 << "save_start\t" << buf.GetU8(offset + 1) << std::endl; in DumpOpCode()
133 return offset + GetSize(); in DumpOpCode()
144 uint32_t SaveEndOpCode::DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const in DumpOpCode()
146 out << offset << ":\t" in DumpOpCode()
147 << "save_end\t" << buf.GetU8(offset + 1) << std::endl; in DumpOpCode()
148 return offset + GetSize(); in DumpOpCode()
159 uint32_t CharOpCode::DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const in DumpOpCode()
161 out << offset << ":\t" in DumpOpCode()
[all …]
Dregexp_opcode.h89 virtual uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const = 0;
103 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
113 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
123 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
130 void UpdateOpPara(DynChunk *buf, uint32_t offset, uint32_t para) const;
134 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
140 uint32_t InsertOpCode(DynChunk *buf, uint32_t offset, uint32_t para) const;
144 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
150 uint32_t InsertOpCode(DynChunk *buf, uint32_t offset, uint32_t para) const;
154 uint32_t DumpOpCode(std::ostream &out, const DynChunk &buf, uint32_t offset) const override;
[all …]
/arkcompiler/ets_runtime/ecmascript/jspandafile/bytecode_inst/
Dinstruction.h36 const uint8_t *GetPointer(int32_t offset) const in GetPointer() argument
39 return pc_ + offset; in GetPointer()
63 T Read(size_t offset) const in Read() argument
66 return *reinterpret_cast<unaligned_type *>(GetPointer(offset)); in Read()
69 void Write(uint32_t value, uint32_t offset, uint32_t width) in Write() argument
71 auto *dst = const_cast<uint8_t *>(GetPointer(offset)); in Write()
73 … LOG(FATAL, PANDAFILE) << "Cannot write value : " << value << "at the dst offset : " << offset; in Write()
77 uint8_t ReadByte(size_t offset) const in ReadByte() argument
79 return Read<uint8_t>(offset); in ReadByte()
83 inline auto ReadHelper(size_t byteoffset, size_t bytecount, size_t offset, size_t width) const in ReadHelper() argument
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/assembler/x64/
Dassembler_x64.cpp304 void AssemblerX64::EmitJmp(int32_t offset) in EmitJmp() argument
306 offset--; in EmitJmp()
307 if (InRange8(offset - sizeof(int8_t))) { in EmitJmp()
310 EmitI8(offset - sizeof(int8_t)); in EmitJmp()
314 EmitI32(offset - sizeof(int32_t)); in EmitJmp()
318 void AssemblerX64::EmitJa(int32_t offset) in EmitJa() argument
320 offset--; in EmitJa()
321 if (InRange8(offset - sizeof(int8_t))) { in EmitJa()
324 EmitI8(offset - sizeof(int8_t)); in EmitJa()
326 offset--; in EmitJa()
[all …]
/arkcompiler/runtime_core/compiler/tests/
Dencoders_test.cpp71 void TestPcRelativeLoad(size_t data_size, ssize_t offset, bool get_address, in TestPcRelativeLoad() argument
75 … T *data = reinterpret_cast<T *>(buffer->template GetOffsetAddress<uint8_t *>(data_size) + offset); in TestPcRelativeLoad()
95 GetEncoder()->LoadPcRelative(reg, offset, addr); in TestPcRelativeLoad()
97 GetEncoder()->LoadPcRelative(reg, offset); in TestPcRelativeLoad()
132 void TestOffset(size_t data_size, ssize_t offset) in TestOffset() argument
134 ASSERT((offset & 3) == 0); in TestOffset()
135 if (vixl::IsInt21(offset)) { in TestOffset()
136 TestPcRelativeLoad<uint64_t>(data_size, offset, false, {"adr", "ldr"}); in TestOffset()
137 TestPcRelativeLoad<uint64_t>(data_size, offset, true, {"adr", "ldr"}); in TestOffset()
138 TestPcRelativeLoad<uint64_t>(data_size, -offset, false, {"adr", "ldr"}); in TestOffset()
[all …]
/arkcompiler/runtime_core/libpandabase/utils/
Dbit_memory_region.h53 Iterator(const BitMemoryRegion &region, uint32_t offset) : region_(region), bit_(offset) in Iterator() argument
129 bool Read(size_t offset) in Read() argument
131 ASSERT(offset < size_); in Read()
132 size_t index = (start_ + offset) / BITS_PER_BYTE; in Read()
133 size_t shift = (start_ + offset) % BITS_PER_BYTE; in Read()
138 void Write(bool value, size_t offset) in Write() argument
140 ASSERT(offset < size_); in Write()
141 size_t index = (start_ + offset) / BITS_PER_BYTE; in Write()
142 size_t shift = (start_ + offset) % BITS_PER_BYTE; in Write()
152 Read(size_t offset, size_t length) const in Read() argument
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/
Dtyped_array_stub_builder.h34 GateRef GetValueFromBuffer(GateRef buffer, GateRef index, GateRef offset, GateRef jsType);
39 GateRef offset = IntPtr(JSTypedArray::VIEWED_ARRAY_BUFFER_OFFSET); in GetViewedArrayBuffer() local
40 return Load(VariableType::JS_ANY(), array, offset); in GetViewedArrayBuffer()
45 GateRef offset = IntPtr(JSTypedArray::ARRAY_LENGTH_OFFSET); in GetArrayLength() local
46 return Load(VariableType::INT32(), array, offset); in GetArrayLength()
51 GateRef offset = IntPtr(JSTypedArray::BYTE_OFFSET_OFFSET); in GetByteOffset() local
52 return Load(VariableType::INT32(), array, offset); in GetByteOffset()
57 GateRef offset = IntPtr(JSArrayBuffer::DATA_OFFSET); in GetArrayBufferData() local
58 return Load(VariableType::JS_ANY(), buffer, offset); in GetArrayBufferData()
63 GateRef offset = IntPtr(JSArrayBuffer::BYTE_LENGTH_OFFSET); in GetArrayBufferByteLength() local
[all …]
Dtype_recorder.cpp134 auto callback = [this] (uint32_t offset, PGOType *type) { in LoadTypesFromPGO() argument
136 bcOffsetPGOOpTypeMap_[offset] = *reinterpret_cast<PGOSampleType *>(type); in LoadTypesFromPGO()
138 bcOffsetPGORwTypeMap_[offset] = *reinterpret_cast<PGORWOpType *>(type); in LoadTypesFromPGO()
246 GateType TypeRecorder::GetType(const int32_t offset) const in GetType()
248 if (bcOffsetGtMap_.find(offset) != bcOffsetGtMap_.end()) { in GetType()
249 return bcOffsetGtMap_.at(offset); in GetType()
260 GateType TypeRecorder::UpdateType(const int32_t offset, const GateType &type) const in UpdateType() argument
262 auto tempType = GetType(offset); in UpdateType()
270 PGOSampleType TypeRecorder::GetOrUpdatePGOType(TSManager *tsManager, int32_t offset, const GateType… in GetOrUpdatePGOType() argument
272 if (bcOffsetPGOOpTypeMap_.find(offset) != bcOffsetPGOOpTypeMap_.end()) { in GetOrUpdatePGOType()
[all …]
Dtype_recorder.h40 GateType GetType(const int32_t offset) const;
41 …PGOSampleType GetOrUpdatePGOType(TSManager *tsManager, int32_t offset, const GateType &type) const;
42 PGORWOpType GetRwOpType(int32_t offset) const;
43 ElementsKind GetElementsKind(int32_t offset) const;
45 GateType UpdateType(const int32_t offset, const GateType &type) const;
46 GateType GetCallTargetType(int32_t offset) const;
/arkcompiler/runtime_core/libpandabase/tests/
Dbit_memory_region_test.cpp23 static void CompareData(uint8_t *data, size_t offset, size_t length, uint32_t value, uint8_t fill_v… in CompareData() argument
26 … uint8_t expected = (offset <= i && i < offset + length) ? value >> (i - offset) : fill_value; in CompareData()
39 for (size_t offset = 0; offset < MAX_BITS_COUNT; offset++) { in TEST() local
44 BitMemoryRegion region1(data.data(), offset, 1); in TEST()
47 CompareData(data.data(), offset, 1, value, fill_value); in TEST()
50 region2.Write(value, offset); in TEST()
51 ASSERT_EQ(region2.Read(offset), value); in TEST()
52 CompareData(data.data(), offset, 1, value, fill_value); in TEST()
64 for (size_t offset = 0; offset < MAX_BITS_COUNT; offset++) { in TEST() local
70 BitMemoryRegion region1(data.data(), offset, length); in TEST()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/base/
Dbit_set.h61 bool TestBit(size_t offset) const in TestBit() argument
64 return data_.inlineWord_ & Mask(offset); in TestBit()
66 return data_.words_[Index(offset)] & Mask(IndexInWord(offset)); in TestBit()
70 void SetBit(size_t offset) in SetBit() argument
73 data_.inlineWord_ |= Mask(offset); in SetBit()
75 data_.words_[Index(offset)] |= Mask(IndexInWord(offset)); in SetBit()
79 void ClearBit(size_t offset) in ClearBit() argument
82 data_.inlineWord_ &= ~Mask(offset); in ClearBit()
84 data_.words_[Index(offset)] &= ~Mask(IndexInWord(offset)); in ClearBit()
146 size_t IndexInWord(size_t offset) const in IndexInWord() argument
[all …]
/arkcompiler/ets_runtime/ecmascript/mem/
Ddyn_chunk.h46 int EmitSelf(size_t offset, size_t len);
87 inline uint32_t GetU32(size_t offset) const in GetU32() argument
90 return *reinterpret_cast<uint32_t *>(buf_ + offset); in GetU32()
93 inline void PutU32(size_t offset, uint32_t data) const in PutU32() argument
96 *reinterpret_cast<uint32_t *>(buf_ + offset) = data; in PutU32()
99 inline uint32_t GetU16(size_t offset) const in GetU16() argument
102 return *reinterpret_cast<uint16_t *>(buf_ + offset); in GetU16()
105 inline void PutU16(size_t offset, uint16_t data) const in PutU16() argument
108 *reinterpret_cast<uint16_t *>(buf_ + offset) = data; in PutU16()
111 inline uint32_t GetU8(size_t offset) const in GetU8() argument
[all …]
Dbarriers.h29 static inline void SetPrimitive(void *obj, size_t offset, T value) in SetPrimitive() argument
31 auto *addr = reinterpret_cast<T *>(ToUintPtr(obj) + offset); in SetPrimitive()
37 static inline bool AtomicSetPrimitive(volatile void *obj, size_t offset, T oldValue, T value) in AtomicSetPrimitive() argument
39 … volatile auto atomicField = reinterpret_cast<volatile std::atomic<T> *>(ToUintPtr(obj) + offset); in AtomicSetPrimitive()
45 static void SetObject(const JSThread *thread, void *obj, size_t offset, JSTaggedType value);
50 static inline T GetValue(const void *obj, size_t offset) in GetValue() argument
52 auto *addr = reinterpret_cast<T *>(ToUintPtr(obj) + offset); in GetValue()
Dgc_bitset.h88 bool SetBit(uintptr_t offset);
90 void ClearBit(uintptr_t offset) in ClearBit() argument
92 Words()[Index(offset)] &= ~Mask(IndexInWord(offset)); in ClearBit()
115 bool TestBit(uintptr_t offset) const in TestBit() argument
117 return Words()[Index(offset)] & Mask(IndexInWord(offset)); in TestBit()
173 size_t IndexInWord(uintptr_t offset) const in IndexInWord() argument
175 return offset & BIT_PER_WORD_MASK; in IndexInWord()
178 size_t Index(uintptr_t offset) const in Index() argument
180 return offset >> BIT_PER_WORD_LOG2; in Index()
216 inline bool GCBitset::SetBit<AccessType::NON_ATOMIC>(uintptr_t offset)
[all …]
Dbarriers-inl.h26 static ARK_INLINE void WriteBarrier(void *obj, size_t offset, JSTaggedType value) in WriteBarrier() argument
36 uintptr_t slotAddr = ToUintPtr(obj) + offset; in WriteBarrier()
52 inline void Barriers::SetObject([[maybe_unused]] const JSThread *thread, void *obj, size_t offset, … in SetObject() argument
55 *reinterpret_cast<JSTaggedType *>(reinterpret_cast<uintptr_t>(obj) + offset) = value; in SetObject()
56 WriteBarrier(obj, offset, value); in SetObject()
/arkcompiler/runtime_core/libpandafile/
Dbytecode_instruction-inl.h26 inline auto BytecodeInst<Mode>::ReadHelper(size_t byteoffset, size_t bytecount, size_t offset, size… in ReadHelper() argument
30 size_t right_shift = offset % BYTE_WIDTH; in ReadHelper()
51 template <size_t offset, size_t width, bool is_signed /* = false */>
55 constexpr size_t BYTE_OFFSET = offset / BYTE_WIDTH; in Read()
56 constexpr size_t BYTE_OFFSET_END = (offset + width + BYTE_WIDTH - 1) / BYTE_WIDTH; in Read()
62 return ReadHelper<return_type, storage_type>(BYTE_OFFSET, BYTE_COUNT, offset, width); in Read()
67 inline auto BytecodeInst<Mode>::Read64(size_t offset, size_t width) const in Read64() argument
72 ASSERT((offset % BYTE_WIDTH) + width <= BIT64); in Read64()
74 size_t byteoffset = offset / BYTE_WIDTH; in Read64()
75 size_t byteoffset_end = (offset + width + BYTE_WIDTH - 1) / BYTE_WIDTH; in Read64()
[all …]
Dbytecode_instruction.h95 const uint8_t *GetPointer(int32_t offset) const in GetPointer() argument
98 return pc_ + offset; in GetPointer()
112 T Read(size_t offset) const in Read() argument
115 return *reinterpret_cast<unaligned_type *>(GetPointer(offset)); in Read()
118 void Write(uint32_t value, uint32_t offset, uint32_t width) in Write() argument
120 auto *dst = const_cast<uint8_t *>(GetPointer(offset)); in Write()
122 … LOG(FATAL, PANDAFILE) << "Cannot write value : " << value << "at the dst offset : " << offset; in Write()
126 uint8_t ReadByte(size_t offset) const in ReadByte() argument
128 return Read<uint8_t>(offset); in ReadByte()
146 const uint8_t *GetPointer(int32_t offset) const in GetPointer() argument
[all …]
/arkcompiler/ets_frontend/es2panda/lexer/scripts/
Dkeywords.rb184 offset = 0
190 if key.length < offset + 1
195 func_name = key[0..offset];
198 functions[func_name].add(key[offset + 1])
200 functions[func_name] = Set[key[offset + 1]]
205 offset += 1
/arkcompiler/runtime_core/bytecode_optimizer/
Dir_interface.h36 virtual std::string GetMethodIdByOffset(uint32_t offset) const in GetMethodIdByOffset() argument
38 auto it = maps_->methods.find(offset); in GetMethodIdByOffset()
44 virtual std::string GetStringIdByOffset(uint32_t offset) const in GetStringIdByOffset() argument
46 auto it = maps_->strings.find(offset); in GetStringIdByOffset()
52 virtual std::string GetLiteralArrayByOffset(uint32_t offset) const in GetLiteralArrayByOffset() argument
54 auto it = maps_->literalarrays.find(offset); in GetLiteralArrayByOffset()
60 std::optional<std::string> GetLiteralArrayIdByOffset(uint32_t offset) const in GetLiteralArrayIdByOffset() argument
66 auto id = std::to_string(offset); in GetLiteralArrayIdByOffset()
72 virtual std::string GetTypeIdByOffset(uint32_t offset) const in GetTypeIdByOffset() argument
74 auto it = maps_->classes.find(offset); in GetTypeIdByOffset()
[all …]
/arkcompiler/ets_runtime/ecmascript/jspandafile/
Ddebug_info_extractor.h35 uint32_t offset; member
40 return offset < other.offset;
45 uint32_t offset; member
50 return offset < other.offset;
139 currentOffset = lineTable[j].offset; in MatchWithLocation()
140 … uint32_t nextOffset = ((j == lineTable.size() - 1) ? UINT32_MAX : lineTable[j + 1].offset); in MatchWithLocation()
142 if (pair.offset >= currentOffset && pair.offset < nextOffset) { in MatchWithLocation()
144 return cb(JSPtLocation(jsPandaFile_, methodId, pair.offset, url)); in MatchWithLocation()
165 … bool MatchLineWithOffset(const Callback &cb, panda_file::File::EntityId methodId, uint32_t offset) in MatchLineWithOffset() argument
169 … auto iter = std::upper_bound(lineTable.begin(), lineTable.end(), LineTableEntry {offset, 0}); in MatchLineWithOffset()
[all …]
/arkcompiler/ets_frontend/es2panda/compiler/core/
DinlineCache.cpp29 uint32_t offset = size_ + slotSize; in Offset() local
32 if (offset > LIMIT) { in Offset()
36 size_ = offset; in Offset()
37 return offset; in Offset()
/arkcompiler/ets_runtime/ecmascript/compiler/assembler/
Dassembler.h206 void PutI8(size_t offset, int8_t data) in PutI8() argument
208 buffer_.PutU8(offset, static_cast<int8_t>(data)); in PutI8()
211 void PutI32(size_t offset, int32_t data) in PutI32() argument
213 buffer_.PutU32(offset, static_cast<int32_t>(data)); in PutI32()
216 uint32_t GetU32(size_t offset) const in GetU32() argument
218 return buffer_.GetU32(offset); in GetU32()
221 int8_t GetI8(size_t offset) const in GetI8() argument
223 return static_cast<int8_t>(buffer_.GetU8(offset)); in GetI8()
226 uint8_t GetU8(size_t offset) const in GetU8() argument
228 return buffer_.GetU8(offset); in GetU8()
/arkcompiler/ets_runtime/ecmascript/
Dbyte_array.cpp22 …yteArray::Set(JSThread* thread, uint32_t idx, DataViewType type, JSTaggedType val, uint32_t offset) in Set() argument
25 auto *block = reinterpret_cast<uint8_t *>(pointer) + offset; in Set()
30 JSTaggedValue ByteArray::Get(JSThread *thread, uint32_t idx, DataViewType type, uint32_t offset) in Get() argument
33 auto *block = reinterpret_cast<uint8_t *>(pointer) + offset; in Get()
Decma_macros.h49 #define GET_VALUE(addr, offset) Barriers::GetValue<JSTaggedType>((addr), (offset)) argument
52 #define SET_VALUE_WITH_BARRIER(thread, addr, offset, value) \ argument
54 Barriers::SetObject<true>(thread, addr, offset, (value).GetRawData()); \
56 Barriers::SetPrimitive<JSTaggedType>(addr, offset, (value).GetRawData()); \
60 #define SET_VALUE_PRIMITIVE(addr, offset, value) \ argument
61 Barriers::SetPrimitive<JSTaggedType>(this, offset, (value).GetRawData())
64 #define ACCESSORS(name, offset, endOffset) … argument
65 …static constexpr size_t endOffset = (offset) + JSTaggedValue::TaggedTypeSize(); …
70 …return JSTaggedValue(Barriers::GetValue<JSTaggedType>(this, offset)); …
77 … Barriers::SetObject<true>(thread, this, offset, value.GetTaggedValue().GetRawData()); \
[all …]
Dtagged_array-inl.h30 size_t offset = JSTaggedValue::TaggedTypeSize() * idx; in Get() local
32 return JSTaggedValue(Barriers::GetValue<JSTaggedType>(GetData(), offset)); in Get()
56 size_t offset = JSTaggedValue::TaggedTypeSize() * idx; in Set() local
60 Barriers::SetObject<true>(thread, GetData(), offset, value.GetTaggedValue().GetRawData()); in Set()
62 … Barriers::SetPrimitive<JSTaggedType>(GetData(), offset, value.GetTaggedValue().GetRawData()); in Set()
70 size_t offset = JSTaggedValue::TaggedTypeSize() * idx; in Set() local
74 Barriers::SetObject<true>(thread, GetData(), offset, value.GetRawData()); in Set()
76 Barriers::SetPrimitive<JSTaggedType>(GetData(), offset, value.GetRawData()); in Set()
146 size_t offset = JSTaggedValue::TaggedTypeSize() * i; in InitializeWithSpecialValue() local
147 Barriers::SetPrimitive<JSTaggedType>(GetData(), offset, initValue.GetRawData()); in InitializeWithSpecialValue()
[all …]

123456789