Home
last modified time | relevance | path

Searched refs:sp (Results 1 – 25 of 94) sorted by relevance

1234

/arkcompiler/runtime_core/libpandafile/
Dhelpers.h63 inline auto Read(Span<const uint8_t> *sp) in Read() argument
70 THROW_IF(sp->Size() < width, INVALID_SPAN_OFFSET); in Read()
73 unsigned_type tmp = static_cast<unsigned_type>((*sp)[i]) << (i * BYTE_WIDTH); in Read()
76 *sp = sp->SubSpan(width); in Read()
81 inline auto Read<sizeof(uint16_t)>(Span<const uint8_t> *sp)
84 THROW_IF(sp->Size() < sizeof(uint16_t), INVALID_SPAN_OFFSET);
86 auto *p = sp->data();
91 *sp = sp->SubSpan(sizeof(uint16_t));
96 inline auto Read<sizeof(uint32_t)>(Span<const uint8_t> *sp)
99 THROW_IF(sp->Size() < sizeof(uint32_t), INVALID_SPAN_OFFSET);
[all …]
Dclass_data_accessor.cpp27 auto sp = panda_file_.GetSpanFromId(class_id_); in ClassDataAccessor() local
28 name_.utf16_length = helpers::ReadULeb128(&sp); in ClassDataAccessor()
29 name_.data = sp.data(); in ClassDataAccessor()
32 THROW_IF(sp.Size() < size, File::INVALID_FILE_OFFSET); in ClassDataAccessor()
33 sp = sp.SubSpan(size); in ClassDataAccessor()
35 super_class_off_ = helpers::Read<ID_SIZE>(&sp); in ClassDataAccessor()
37 access_flags_ = helpers::ReadULeb128(&sp); in ClassDataAccessor()
38 num_fields_ = helpers::ReadULeb128(&sp); in ClassDataAccessor()
39 num_methods_ = helpers::ReadULeb128(&sp); in ClassDataAccessor()
41 THROW_IF(sp.Size() == 0U, File::INVALID_FILE_OFFSET); in ClassDataAccessor()
[all …]
Dcode_data_accessor-inl.h26 auto sp = catch_blocks_sp_; in EnumerateCatchBlocks() local
28 CatchBlock catch_block(sp); in EnumerateCatchBlocks()
32 sp = sp.SubSpan(catch_block.GetSize()); in EnumerateCatchBlocks()
34 size_ = sp.data() - data_.data(); in EnumerateCatchBlocks()
45 auto sp = try_blocks_sp_; in EnumerateTryBlocks() local
47 TryBlock try_block(sp); in EnumerateTryBlocks()
51 sp = sp.SubSpan(try_block.GetSize()); in EnumerateTryBlocks()
53 size_ = panda_file_.GetIdFromPointer(sp.data()).GetOffset() - code_id_.GetOffset(); in EnumerateTryBlocks()
65 auto sp = pf.GetSpanFromId(code_id); in GetNumVregs() local
66 num_vregs_ = helpers::ReadULeb128(&sp); in GetNumVregs()
[all …]
Dcode_data_accessor.cpp22 auto sp = data; in CatchBlock() local
23 type_idx_ = helpers::ReadULeb128(&sp) - 1; in CatchBlock()
24 handler_pc_ = helpers::ReadULeb128(&sp); in CatchBlock()
25 code_size_ = helpers::ReadULeb128(&sp); in CatchBlock()
26 size_ = sp.data() - data.data(); in CatchBlock()
40 auto sp = panda_file_.GetSpanFromId(code_id_); in CodeDataAccessor() local
42 num_vregs_ = helpers::ReadULeb128(&sp); in CodeDataAccessor()
43 num_args_ = helpers::ReadULeb128(&sp); in CodeDataAccessor()
44 code_size_ = helpers::ReadULeb128(&sp); in CodeDataAccessor()
45 tries_size_ = helpers::ReadULeb128(&sp); in CodeDataAccessor()
[all …]
Dfield_data_accessor.cpp25 auto sp = panda_file_.GetSpanFromId(field_id_); in FieldDataAccessor() local
27 auto class_idx = helpers::Read<IDX_SIZE>(&sp); in FieldDataAccessor()
28 auto type_idx = helpers::Read<IDX_SIZE>(&sp); in FieldDataAccessor()
33 name_off_ = helpers::Read<ID_SIZE>(&sp); in FieldDataAccessor()
38 access_flags_ = helpers::ReadULeb128(&sp); in FieldDataAccessor()
39 tagged_values_sp_ = sp; in FieldDataAccessor()
43 size_ = panda_file_.GetIdFromPointer(sp.data()).GetOffset() - field_id_.GetOffset(); in FieldDataAccessor()
51 auto sp = tagged_values_sp_; in GetValueInternal() local
52 auto tag = static_cast<FieldTag>(sp[0]); in GetValueInternal()
56 THROW_IF(sp.Size() == 0U, File::INVALID_FILE_OFFSET); in GetValueInternal()
[all …]
Dmodule_data_accessor-inl.h27 auto sp = entry_data_sp_; in EnumerateModuleRecord() local
29 auto regular_import_num = panda_file::helpers::Read<panda_file::ID_SIZE>(&sp); in EnumerateModuleRecord()
31 … auto local_name_offset = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateModuleRecord()
32 … auto import_name_offset = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateModuleRecord()
33 … auto module_request_idx = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint16_t)>(&sp)); in EnumerateModuleRecord()
37 auto namespace_import_num = panda_file::helpers::Read<panda_file::ID_SIZE>(&sp); in EnumerateModuleRecord()
39 … auto local_name_offset = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateModuleRecord()
40 … auto module_request_idx = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint16_t)>(&sp)); in EnumerateModuleRecord()
44 auto local_export_num = panda_file::helpers::Read<panda_file::ID_SIZE>(&sp); in EnumerateModuleRecord()
46 … auto local_name_offset = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateModuleRecord()
[all …]
Dparam_annotations_data_accessor.h47 auto sp = offsets_; in EnumerateAnnotations() local
49 File::EntityId id(helpers::Read<ID_SIZE>(&sp)); in EnumerateAnnotations()
61 auto sp = panda_file_.GetSpanFromId(id); in ParamAnnotationsDataAccessor() local
62 count_ = helpers::Read<COUNT_SIZE>(&sp); in ParamAnnotationsDataAccessor()
63 annotations_array_ = sp; in ParamAnnotationsDataAccessor()
74 auto sp = annotations_array_; in EnumerateAnnotationArrays() local
78 auto count = helpers::Read<COUNT_SIZE>(&sp); in EnumerateAnnotationArrays()
79 AnnotationArray array(count, sp); in EnumerateAnnotationArrays()
80 sp = sp.SubSpan(count * ID_SIZE); in EnumerateAnnotationArrays()
92 auto sp = annotations_array_; in GetAnnotationArray() local
[all …]
Ddebug_data_accessor-inl.h27 auto sp = parameters_sp_; in EnumerateParameters() local
30 File::EntityId id(helpers::ReadULeb128(&sp)); in EnumerateParameters()
34 constant_pool_size_sp_ = sp; in EnumerateParameters()
48 auto sp = constant_pool_size_sp_; in GetConstantPool() local
50 uint32_t size = helpers::ReadULeb128(&sp); in GetConstantPool()
51 line_num_program_off_sp_ = sp.SubSpan(size); in GetConstantPool()
53 return sp.First(size); in GetConstantPool()
67 auto sp = line_num_program_off_sp_; in GetLineNumberProgram() local
68 uint32_t index = helpers::ReadULeb128(&sp); in GetLineNumberProgram()
71 size_ = panda_file_.GetIdFromPointer(sp.data()).GetOffset() - debug_info_id_.GetOffset(); in GetLineNumberProgram()
Dannotation_data_accessor.cpp24 auto sp = panda_file_.GetSpanFromId(annotation_id_); in AnnotationDataAccessor() local
25 auto class_idx = helpers::Read<IDX_SIZE>(&sp); in AnnotationDataAccessor()
27 count_ = helpers::Read<COUNT_SIZE>(&sp); in AnnotationDataAccessor()
30 elements_sp_ = sp; in AnnotationDataAccessor()
32 THROW_IF(sp.Size() < size, File::INVALID_FILE_OFFSET); in AnnotationDataAccessor()
33 elements_tags_ = sp.SubSpan(size); in AnnotationDataAccessor()
39 auto sp = elements_sp_.SubSpan(i * (ID_SIZE + VALUE_SIZE)); in GetElement() local
40 uint32_t name = helpers::Read<ID_SIZE>(&sp); in GetElement()
41 uint32_t value = helpers::Read<VALUE_SIZE>(&sp); in GetElement()
48 auto sp = elements_tags_.SubSpan(i * TYPE_TAG_SIZE); in GetTag() local
[all …]
Dliteral_data_accessor-inl.h28 auto sp = panda_file_.GetSpanFromId(id); in GetLiteralValsNum() local
29 return helpers::Read<ID_SIZE>(&sp); in GetLiteralValsNum()
47 auto sp = panda_file_.GetSpanFromId(id); in EnumerateLiteralVals() local
48 auto literal_vals_num = helpers::Read<LEN_SIZE>(&sp); in EnumerateLiteralVals()
52 auto tag = static_cast<LiteralTag>(helpers::Read<TAG_SIZE>(&sp)); in EnumerateLiteralVals()
56 value = static_cast<uint32_t>(helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateLiteralVals()
60 value = bit_cast<double>(helpers::Read<sizeof(uint64_t)>(&sp)); in EnumerateLiteralVals()
64 value = static_cast<bool>(helpers::Read<sizeof(uint8_t)>(&sp)); in EnumerateLiteralVals()
68 value = static_cast<float>(helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateLiteralVals()
76 value = static_cast<uint32_t>(helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateLiteralVals()
[all …]
Dmethod_data_accessor.cpp23 auto sp = panda_file_.GetSpanFromId(method_id); in MethodDataAccessor() local
25 class_idx_ = helpers::Read<IDX_SIZE>(&sp); in MethodDataAccessor()
26 proto_idx_ = helpers::Read<IDX_SIZE>(&sp); in MethodDataAccessor()
31 name_off_ = helpers::Read<ID_SIZE>(&sp); in MethodDataAccessor()
32 access_flags_ = helpers::ReadULeb128(&sp); in MethodDataAccessor()
37 tagged_values_sp_ = sp; in MethodDataAccessor()
40 size_ = panda_file_.GetIdFromPointer(sp.data()).GetOffset() - method_id_.GetOffset(); in MethodDataAccessor()
Ddebug_data_accessor.cpp23 auto sp = panda_file_.GetSpanFromId(debug_info_id_); in DebugInfoDataAccessor() local
25 line_start_ = helpers::ReadULeb128(&sp); in DebugInfoDataAccessor()
26 num_params_ = helpers::ReadULeb128(&sp); in DebugInfoDataAccessor()
27 parameters_sp_ = sp; in DebugInfoDataAccessor()
Dproto_data_accessor-inl.h39 auto sp = panda_file_.GetSpanFromId(proto_id_); in EnumerateTypes() local
41 uint32_t v = helpers::Read<SHORTY_ELEM_SIZE>(&sp); in EnumerateTypes()
62 v = helpers::Read<SHORTY_ELEM_SIZE>(&sp); in EnumerateTypes()
69 ref_types_sp_ = sp; in EnumerateTypes()
127 auto sp = ref_types_sp_.SubSpan(i * IDX_SIZE); in GetReferenceType() local
128 auto class_idx = helpers::Read<IDX_SIZE>(&sp); in GetReferenceType()
137 auto sp = panda_file_.GetSpanFromId(proto_id_); in GetType() local
139 sp = sp.SubSpan(SHORTY_ELEM_SIZE * block_idx); in GetType()
141 uint32_t v = helpers::Read<SHORTY_ELEM_SIZE>(&sp); in GetType()
Dmethod_handle_data_accessor.cpp24 auto sp = panda_file_.GetSpanFromId(method_handle_id_); in MethodHandleDataAccessor() local
26 type_ = static_cast<MethodHandleType>(helpers::Read<sizeof(uint8_t)>(&sp)); in MethodHandleDataAccessor()
27 offset_ = helpers::ReadULeb128(&sp); in MethodHandleDataAccessor()
29 size_ = panda_file_.GetIdFromPointer(sp.data()).GetOffset() - method_handle_id_.GetOffset(); in MethodHandleDataAccessor()
Dclass_data_accessor-inl.h70 auto sp = ifaces_offsets_sp_; in EnumerateInterfaces() local
73 auto index = helpers::Read<IDX_SIZE>(&sp); in EnumerateInterfaces()
81 auto sp = ifaces_offsets_sp_.SubSpan(idx * IDX_SIZE); in GetInterfaceId() local
82 auto index = helpers::Read<IDX_SIZE>(&sp); in GetInterfaceId()
150 static void EnumerateClassElements(const File &pf, Span<const uint8_t> sp, size_t elem_num, const C… in EnumerateClassElements() argument
154 File::EntityId id = pf.GetIdFromPointer(sp.data()); in EnumerateClassElements()
157 sp = sp.SubSpan(data_accessor.GetSize()); in EnumerateClassElements()
160 *next = sp; in EnumerateClassElements()
180 Span<const uint8_t> sp {nullptr, nullptr}; in EnumerateMethods()
182 …merateClassElements<Callback, MethodDataAccessor>(panda_file_, methods_sp_, num_methods_, cb, &sp); in EnumerateMethods()
[all …]
Dvalue.h52 auto sp = panda_file_.GetSpanFromId(id); in Get() local
53 auto res = helpers::Read<T_SIZE>(&sp); in Get()
76 auto sp = panda_file_.GetSpanFromId(id_); in ArrayValue() local
77 count_ = helpers::ReadULeb128(&sp); in ArrayValue()
78 data_ = sp; in ArrayValue()
93 auto sp = data_.SubSpan(T_SIZE * idx); in Get() local
94 auto res = helpers::Read<T_SIZE>(&sp); in Get()
/arkcompiler/ets_runtime/ecmascript/compiler/assembler/aarch64/
Dextend_assembler.cpp28 Register sp(SP); in CalleeSave() local
29 Stp(Register(X27), Register(X28), MemoryOperand(sp, -PAIR_SLOT_SIZE, PREINDEX)); in CalleeSave()
30 Stp(Register(X25), Register(X26), MemoryOperand(sp, -PAIR_SLOT_SIZE, PREINDEX)); in CalleeSave()
31 Stp(Register(X23), Register(X24), MemoryOperand(sp, -PAIR_SLOT_SIZE, PREINDEX)); in CalleeSave()
32 Stp(Register(X21), Register(X22), MemoryOperand(sp, -PAIR_SLOT_SIZE, PREINDEX)); in CalleeSave()
33 Stp(Register(X19), Register(X20), MemoryOperand(sp, -PAIR_SLOT_SIZE, PREINDEX)); in CalleeSave()
35 Stp(VectorRegister(v14), VectorRegister(v15), MemoryOperand(sp, -PAIR_SLOT_SIZE, PREINDEX)); in CalleeSave()
36 Stp(VectorRegister(v12), VectorRegister(v13), MemoryOperand(sp, -PAIR_SLOT_SIZE, PREINDEX)); in CalleeSave()
37 Stp(VectorRegister(v10), VectorRegister(v11), MemoryOperand(sp, -PAIR_SLOT_SIZE, PREINDEX)); in CalleeSave()
38 Stp(VectorRegister(v8), VectorRegister(v9), MemoryOperand(sp, -PAIR_SLOT_SIZE, PREINDEX)); in CalleeSave()
[all …]
/arkcompiler/ets_runtime/ecmascript/builtins/tests/
Dbuiltins_number_test.cpp419 Span<const uint8_t> sp; in HWTEST_F_L0() local
425 sp = EcmaStringAccessor(str).ToUtf8Span(buf); in HWTEST_F_L0()
426 … ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 0); in HWTEST_F_L0()
428 sp = EcmaStringAccessor(str).ToUtf8Span(buf); in HWTEST_F_L0()
429 … ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 0); in HWTEST_F_L0()
431 sp = EcmaStringAccessor(str).ToUtf8Span(buf); in HWTEST_F_L0()
432 … ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 0); in HWTEST_F_L0()
434 sp = EcmaStringAccessor(str).ToUtf8Span(buf); in HWTEST_F_L0()
435 … ASSERT_EQ(base::NumberHelper::StringToDouble(sp.begin(), sp.end(), 0, base::IGNORE_TRAILING), 0); in HWTEST_F_L0()
437 sp = EcmaStringAccessor(str).ToUtf8Span(buf); in HWTEST_F_L0()
[all …]
/arkcompiler/ets_runtime/ecmascript/jspandafile/accessor/
Dmodule_data_accessor.cpp24 auto sp = pf.GetSpanFromId(moduleDataId); in ModuleDataAccessor() local
26 auto moduleSp = sp.SubSpan(panda_file::ID_SIZE); // skip literalnum in ModuleDataAccessor()
45 auto sp = entryDataSp_; in EnumerateImportEntry() local
47 auto regularImportNum = panda_file::helpers::Read<panda_file::ID_SIZE>(&sp); in EnumerateImportEntry()
54 … auto localNameOffset = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateImportEntry()
55 … auto importNameOffset = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateImportEntry()
56 … auto moduleRequestIdx = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint16_t)>(&sp)); in EnumerateImportEntry()
70 auto namespaceImportNum = panda_file::helpers::Read<panda_file::ID_SIZE>(&sp); in EnumerateImportEntry()
73 entryDataSp_ = sp; in EnumerateImportEntry()
79 … auto localNameOffset = static_cast<uint32_t>(panda_file::helpers::Read<sizeof(uint32_t)>(&sp)); in EnumerateImportEntry()
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/trampoline/aarch64/
Doptimized_call.cpp64 Register sp(SP); in CallRuntime() local
75 __ Stp(tmp, frameType, MemoryOperand(sp, -FRAME_SLOT_SIZE * 2, AddrMode::PREINDEX)); in CallRuntime()
76 __ Add(fp, sp, Immediate(2 * FRAME_SLOT_SIZE)); // 16: skip frame type and tmp in CallRuntime()
91 __ Ldr(tmp, MemoryOperand(sp, 0)); in CallRuntime()
95 __ Add(sp, sp, Immediate(2 * FRAME_SLOT_SIZE)); in CallRuntime()
102 Register sp(SP); in IncreaseStackForArguments() local
103 __ Mov(currentSp, sp); in IncreaseStackForArguments()
112 __ Mov(sp, currentSp); in IncreaseStackForArguments()
143 Register sp(SP); in JSFunctionEntry() local
203 Register sp(SP); in OptimizedCallAndPushUndefined() local
[all …]
/arkcompiler/ets_runtime/ecmascript/interpreter/
Dinterpreter.h52 static inline void RunInternal(JSThread *thread, const uint8_t *pc, JSTaggedType *sp);
58 static inline JSTaggedValue GetRuntimeProfileTypeInfo(JSTaggedType *sp);
59 static inline JSTaggedValue GetConstantPool(JSTaggedType *sp);
60 static inline JSTaggedValue GetEcmaModule(JSTaggedType *sp);
61 …static inline bool UpdateHotnessCounter(JSThread* thread, JSTaggedType *sp, JSTaggedValue acc, int…
68 static inline JSTaggedValue GetFunction(JSTaggedType *sp);
69 static inline JSTaggedValue GetNewTarget(JSTaggedType *sp);
70 static inline JSTaggedValue GetThis(JSTaggedType *sp);
71 static inline uint32_t GetNumArgs(JSTaggedType *sp, uint32_t restIdx, uint32_t &startIdx);
73 static inline bool IsFastNewFrameExit(JSTaggedType *sp);
[all …]
Dinterpreter_assembly.cpp71 …AsmInterpretedFrame *frame = GET_ASM_FRAME(sp); …
82 #define GET_ENTRY_FRAME(sp) \ argument
83 …(reinterpret_cast<InterpretedEntryFrame *>(sp) - 1) // NOLINT(cppcoreguidelines-pro-bounds-pointe…
84 #define GET_BUILTIN_FRAME(sp) \ argument
85 …(reinterpret_cast<InterpretedBuiltinFrame *>(sp) - 1) // NOLINT(cppcoreguidelines-pro-bounds-poin…
87 #define SAVE_PC() (GET_ASM_FRAME(sp)->pc = pc) // NOLINT(cppcoreguidelines-pro-bounds-pointer-arit…
89 #define SAVE_ACC() (GET_ASM_FRAME(sp)->acc = acc) // NOLINT(cppcoreguidelines-pro-bounds-pointer-a…
91 #define RESTORE_ACC() (acc = GET_ASM_FRAME(sp)->acc) // NOLINT(cppcoreguidelines-pro-bounds-pointe…
97 …GET_ASM_FRAME(sp)->acc = JSTaggedValue::Exception(); …
126 profileTypeInfo = UpdateHotnessCounter(thread, sp); \
[all …]
Dinterpreter_assembly.h44 static inline JSTaggedValue UpdateHotnessCounter(JSThread* thread, JSTaggedType *sp);
47 static JSTaggedValue GetFunction(JSTaggedType *sp);
48 static JSTaggedValue GetNewTarget(JSTaggedType *sp);
49 static JSTaggedValue GetThis(JSTaggedType *sp);
50 static JSTaggedValue GetConstantPool(JSTaggedType *sp);
51 static JSTaggedValue GetProfileTypeInfo(JSTaggedType *sp);
52 static uint32_t GetNumArgs(JSTaggedType *sp, uint32_t restIdx, uint32_t &startIdx);
59 static void name(JSThread *thread, const uint8_t *pc, JSTaggedType *sp, \
/arkcompiler/ets_frontend/ts2panda/tests/
Dscope.test.ts36 let { scope: sp, level: lv, v: outVariable } = scope.find("x");
39 expect(sp).to.be.equal(scope);
46 let { scope: sp, level: lv, v: outVariable } = scope.find("x");
49 expect(sp).to.be.equal(scope);
56 let { scope: sp, level: lv, v: outVariable } = scope.find("x");
59 expect(sp).to.be.equal(scope);
66 let { scope: sp, level: lv, v: outVariable } = scope.find("x");
69 expect(sp).to.be.equal(scope);
84 let { scope: sp, level: lv, v: outVariable } = scope.find("x");
87 expect(sp).to.be.equal(globalScope);
[all …]
/arkcompiler/ets_runtime/ecmascript/compiler/
Dinterpreter_stub.h59 inline void SetVregValue(GateRef glue, GateRef sp, GateRef idx, GateRef val);
60 inline GateRef GetVregValue(GateRef sp, GateRef idx);
108 inline void SetCurrentSpFrame(GateRef glue, GateRef sp);
109 inline void SetLastLeaveFrame(GateRef glue, GateRef sp);
117 inline void SetFrameState(GateRef glue, GateRef sp, GateRef function, GateRef acc,
120 inline void CheckException(GateRef glue, GateRef sp, GateRef pc, GateRef constpool,
123 inline void CheckPendingException(GateRef glue, GateRef sp, GateRef pc, GateRef constpool,
126 inline void CheckExceptionWithJump(GateRef glue, GateRef sp, GateRef pc, GateRef constpool,
129 inline void CheckExceptionWithVar(GateRef glue, GateRef sp, GateRef pc, GateRef constpool,
133 inline GateRef CheckStackOverflow(GateRef glue, GateRef sp);
[all …]

1234