Home
last modified time | relevance | path

Searched full:method (Results 1 – 25 of 373) sorted by relevance

12345678910>>...15

/ark/runtime_core/runtime/entrypoints/
Dentrypoints.cpp22 #include "runtime/include/method-inl.h"
83 extern "C" bool IncrementHotnessCounter(Method *method) in IncrementHotnessCounter() argument
85 method->IncrementHotnessCounter(0, nullptr); in IncrementHotnessCounter()
86 return method->GetCompiledEntryPoint() != GetCompiledCodeToInterpreterBridge(method); in IncrementHotnessCounter()
89 extern "C" NO_ADDRESS_SANITIZE void InterpreterEntryPoint(Method *method, Frame *frame) in InterpreterEntryPoint() argument
91 auto pc = method->GetInstructions(); in InterpreterEntryPoint()
92 Method *callee = frame->GetMethod(); in InterpreterEntryPoint()
117 extern "C" Frame *CreateFrame(uint32_t nregs, Method *method, Frame *prev) in CreateFrame() argument
124 return (new (mem) panda::Frame(method, prev, nregs)); in CreateFrame()
127 extern "C" Frame *CreateFrameForMethod(Method *method, Frame *prev) in CreateFrameForMethod() argument
[all …]
Dentrypoints.yaml33 - panda::Method*
46 - const panda::Method*
109 - const panda::Method*
135 - panda::Method*
136 - const panda::Method*
143 - panda::Method*
144 - const panda::Method*
150 - panda::Method*
151 - const panda::Method*
159 - panda::Method*
[all …]
/ark/runtime_core/libpandafile/
Dmodifiers.h25 static constexpr uint32_t ACC_PUBLIC = 0x0001; // field, method, class
26 static constexpr uint32_t ACC_PRIVATE = 0x0002; // field, method
27 static constexpr uint32_t ACC_PROTECTED = 0x0004; // field, method
28 static constexpr uint32_t ACC_STATIC = 0x0008; // field, method
29 static constexpr uint32_t ACC_FINAL = 0x0010; // field, method, class
31 static constexpr uint32_t ACC_SYNCHRONIZED = 0x0020; // method
32 static constexpr uint32_t ACC_BRIDGE = 0x0040; // method
35 static constexpr uint32_t ACC_VARARGS = 0x0080; // method
36 static constexpr uint32_t ACC_NATIVE = 0x0100; // method
38 static constexpr uint32_t ACC_ABSTRACT = 0x0400; // method, class
[all …]
/ark/js_runtime/ecmascript/tooling/backend/
Djs_debugger.cpp30 JSMethod *method = FindMethod(location); in SetBreakpoint() local
31 if (method == nullptr) { in SetBreakpoint()
36 if (location.GetBytecodeOffset() >= method->GetCodeSize()) { in SetBreakpoint()
41 auto [_, success] = breakpoints_.emplace(method, location.GetBytecodeOffset(), in SetBreakpoint()
53 JSMethod *method = FindMethod(location); in RemoveBreakpoint() local
54 if (method == nullptr) { in RemoveBreakpoint()
59 if (!RemoveBreakpoint(method, location.GetBytecodeOffset())) { in RemoveBreakpoint()
67 void JSDebugger::BytecodePcChanged(JSThread *thread, JSMethod *method, uint32_t bcOffset) in BytecodePcChanged() argument
69 ASSERT(bcOffset < method->GetCodeSize() && "code size of current JSMethod less then bcOffset"); in BytecodePcChanged()
71 HandleExceptionThrowEvent(thread, method, bcOffset); in BytecodePcChanged()
[all …]
/ark/runtime_core/runtime/tests/
Doffsets_test.cpp17 #include "runtime/include/method.h"
52 TEST(Offsets, Method) in TEST() argument
55 ASSERT_EQ(MEMBER_OFFSET(Method, stor_32_), std::is_polymorphic_v<Method> * sizeof(uint64_t)); in TEST()
56 CHECK_OFFSET(Method::StoragePacked32, access_flags_); in TEST()
57 CHECK_OFFSET(Method::StoragePacked32, vtable_index_); in TEST()
58 CHECK_OFFSET(Method::StoragePacked32, num_args_); in TEST()
59 CHECK_OFFSET(Method::StoragePacked32, hotness_counter_); in TEST()
60 …ASSERT_EQ(Method::StoragePacked32::ELEMENTS_NUM * Method::StoragePacked32::ELEMENTS_ALIGN, offset); in TEST()
63 …ASSERT_EQ(MEMBER_OFFSET(Method, stor_ptr_), MEMBER_OFFSET(Method, stor_32_) + Method::StoragePacke… in TEST()
64 CHECK_OFFSET(Method::StoragePackedPtr, class_); in TEST()
[all …]
Dmethod_test.cpp24 #include "runtime/include/method.h"
97 Method *method = klass->GetDirectMethod(utf::CStringAsMutf8("foo")); in VerifyLineNumber() local
98 ASSERT_NE(method, nullptr); in VerifyLineNumber()
101 …ASSERT_EQ(method->GetLineNumFromBytecodeOffset(offsets[i]), lines[i]) << "do not match on i = " <<… in VerifyLineNumber()
111Method method(nullptr, nullptr, panda_file::File::EntityId(), panda_file::File::EntityId(), 0, 0, … in TEST_F() local
112 ASSERT_FALSE(method.IsIntrinsic()); in TEST_F()
115 method.SetIntrinsic(intrinsic); in TEST_F()
116 ASSERT_TRUE(method.IsIntrinsic()); in TEST_F()
118 ASSERT_EQ(method.GetIntrinsic(), intrinsic); in TEST_F()
121 static int32_t EntryPoint([[maybe_unused]] Method *method) in EntryPoint() argument
[all …]
Dc2i_bridge_test.cpp31 #include "runtime/include/method.h"
44 int32_t CmpDynImpl(Method *, DecodedTaggedValue v1, DecodedTaggedValue v2) in CmpDynImpl() argument
49 DecodedTaggedValue LdUndefinedImpl(Method *method) in LdUndefinedImpl() argument
51 return Runtime::GetCurrent()->GetLanguageContext(*method).GetInitialDecodedValue(); in LdUndefinedImpl()
112 Method *cmpDyn = klass->GetDirectMethod(utf::CStringAsMutf8("cmpDyn")); in SetUpHelperFunctions()
116 Method *ldundefined = klass->GetDirectMethod(utf::CStringAsMutf8("ldundefined")); in SetUpHelperFunctions()
121 Method *MakeNoArgsMethod(TypeId ret_type, int64_t ret) in MakeNoArgsMethod()
162 Method *main = klass->GetDirectMethod(utf::CStringAsMutf8("main")); in MakeNoArgsMethod()
167Method *MakeCheckArgsMethod(const std::initializer_list<TypeId> &shorty, const std::initializer_li… in MakeCheckArgsMethod()
264 Method *main = klass->GetDirectMethod(utf::CStringAsMutf8("main")); in MakeCheckArgsMethod()
[all …]
Di2c_bridge_test.cpp27 #include "runtime/include/method.h"
116 static void VoidNoArg(Method *method) in VoidNoArg() argument
118 g_call_result = PrintFunc("void", __FUNCTION__, method); in VoidNoArg()
124Method callee(nullptr, nullptr, panda_file::File::EntityId(), panda_file::File::EntityId(), ACC_ST… in TEST_F()
145 static void InstanceVoidNoArg(Method *method, ObjectHeader *this_) in InstanceVoidNoArg() argument
147 g_call_result = PrintFunc("void", __FUNCTION__, method, this_); in InstanceVoidNoArg()
153Method callee(nullptr, nullptr, panda_file::File::EntityId(), panda_file::File::EntityId(), 0, 1, … in TEST_F()
177 static uint8_t ByteNoArg(Method *method) in ByteNoArg() argument
179 g_call_result = PrintFunc("uint8_t", __FUNCTION__, method); in ByteNoArg()
186Method callee(nullptr, nullptr, panda_file::File::EntityId(), panda_file::File::EntityId(), ACC_ST… in TEST_F()
[all …]
/ark/runtime_core/runtime/interpreter/
Druntime_interface.h30 #include "runtime/include/method.h"
42 static coretypes::String *ResolveString(PandaVM *vm, const Method &caller, BytecodeId id) in ResolveString()
47 static Method *ResolveMethod(ManagedThread *thread, const Method &caller, BytecodeId id) in ResolveMethod()
51 auto *method = class_linker->GetMethod(caller, resolved_id); in ResolveMethod() local
52 if (method == nullptr) { in ResolveMethod()
56 auto *klass = method->GetClass(); in ResolveMethod()
61 return method; in ResolveMethod()
64 static const uint8_t *GetMethodName(const Method *caller, BytecodeId method_id) in GetMethodName()
72 static Class *GetMethodClass(const Method *caller, BytecodeId method_id) in GetMethodClass()
83 static uint32_t GetMethodArgumentsCount(Method *caller, BytecodeId method_id) in GetMethodArgumentsCount()
[all …]
/ark/runtime_core/runtime/include/
Dclass-inl.h161 inline Span<Method> Class::GetMethods() const in GetMethods()
178 inline Method *Class::FindDirectMethod(Pred pred) const in FindDirectMethod()
189 inline Method *Class::FindClassMethod(Pred pred) const in FindClassMethod()
193 auto *method = cls->FindDirectMethod<filter>(pred); in FindClassMethod() local
194 if (method != nullptr) { in FindClassMethod()
195 return method; in FindClassMethod()
209 inline Method *Class::FindInterfaceMethod(Pred pred) const in FindInterfaceMethod()
214 auto *method = FindDirectMethod<filter>(pred); in FindInterfaceMethod() local
215 if (method != nullptr) { in FindInterfaceMethod()
216 return method; in FindInterfaceMethod()
[all …]
Dvtable_builder.h29 #include "runtime/include/method.h"
65 …explicit MethodInfo(Method *method, size_t index = 0, bool is_base = false, bool needs_copy = fals…
66 : mda_(*method->GetPandaFile(), method->GetFileId()),
67 proto_(*method->GetPandaFile(), mda_.GetProtoId()),
68 method_(method),
69 ctx_(method->GetClass()->GetLoadContext()),
106 Method *GetMethod() const in GetMethod()
173 Method *method_ {nullptr};
213 Method *method = method_info.GetMethod(); in UpdateClass() local
214 if (method == nullptr) { in UpdateClass()
[all …]
Dvtable_builder-inl.h41 void VTableBuilderImpl<SearchBySignature, OverridePred>::BuildForInterface(Span<Method> methods) in BuildForInterface()
43 for (const auto &method : methods) { in BuildForInterface() local
44 if (method.IsStatic()) { in BuildForInterface()
48 if (!method.IsAbstract()) { in BuildForInterface()
62 for (auto *method : base_class_vtable) { in AddBaseMethods()
63 vtable_.AddBaseMethod(MethodInfo(method, 0, true)); in AddBaseMethods()
87 void VTableBuilderImpl<SearchBySignature, OverridePred>::AddClassMethods(Span<Method> methods) in AddClassMethods()
89 for (auto &method : methods) { in AddClassMethods()
90 if (method.IsStatic()) { in AddClassMethods()
94 MethodInfo method_info(&method, num_vmethods_); in AddClassMethods()
[all …]
Dcompiler_interface.h23 class Method; variable
28 virtual bool CompileMethod(Method *method, uintptr_t bytecode_offset, bool osr) = 0;
36 virtual void *GetOsrCode(const Method *method) = 0;
38 virtual void SetOsrCode(const Method *method, void *ptr) = 0;
40 virtual void RemoveOsrCode(const Method *method) = 0;
Dmethod.h57 class Method {
71 // When the method is not verified all bits are zero.
139 Method(Class *klass, const panda_file::File *pf, panda_file::File::EntityId file_id,
142 explicit Method(const Method *method) in Method() argument
144 method->stor_32_.access_flags_.load(), in Method()
145 method->stor_32_.vtable_index_, in Method()
146 method->stor_32_.num_args_, in Method()
148 stor_ptr_ {{}, method->stor_ptr_.class_, nullptr, method->stor_ptr_.native_pointer_},
149 panda_file_(method->panda_file_),
150 file_id_(method->file_id_),
[all …]
/ark/runtime_core/runtime/tooling/
Ddebugger.cpp69Method *method = runtime_->GetClassLinker()->GetMethod(location.GetPandaFile(), location.GetMethod… in SetBreakpoint() local
70 if (method == nullptr) { in SetBreakpoint()
72 … std::string("Cannot find method with id ") + std::to_string(location.GetMethodId().GetOffset()) + in SetBreakpoint()
76 if (location.GetBytecodeOffset() >= method->GetCodeSize()) { in SetBreakpoint()
79 ") >= method code size (" + in SetBreakpoint()
80 … std::to_string(method->GetCodeSize()) + ")"); in SetBreakpoint()
83 if (!breakpoints_.emplace(method, location.GetBytecodeOffset()).second) { in SetBreakpoint()
94Method *method = runtime_->GetClassLinker()->GetMethod(location.GetPandaFile(), location.GetMethod… in RemoveBreakpoint() local
95 if (method == nullptr) { in RemoveBreakpoint()
97 … std::string("Cannot find method with id ") + std::to_string(location.GetMethodId().GetOffset()) + in RemoveBreakpoint()
[all …]
Ddebugger.h24 #include "include/method.h"
33 #include "runtime/include/method.h"
45 Breakpoint(Method *method, uint32_t bcOffset) : method_(method), bc_offset_(bcOffset) {} in Breakpoint() argument
48 Method *GetMethod() const in GetMethod()
67 Method *method_;
75 …return (std::hash<Method *>()(bpoint.GetMethod())) ^ (std::hash<uint32_t>()(bpoint.GetBytecodeOffs… in operator()
189 void BytecodePcChanged(ManagedThread *thread, Method *method, uint32_t bcOffset) override;
219 …void ExceptionCatch(const ManagedThread *thread, const Method *method, uint32_t bcOffset) override;
221 void MethodEntry(ManagedThread *thread, Method *method) override;
222 void MethodExit(ManagedThread *thread, Method *method) override;
[all …]
Dpt_method_private.h22 class Method; variable
26 inline Method *PtMethodToMethod(PtMethod method) in PtMethodToMethod() argument
28 return reinterpret_cast<Method *>(method.GetData()); in PtMethodToMethod()
31 inline PtMethod MethodToPtMethod(Method *method) in MethodToPtMethod() argument
33 return PtMethod(reinterpret_cast<void *>(method)); in MethodToPtMethod()
/ark/runtime_core/runtime/tests/interpreter/
Dtest_runtime_interface.h27 #include "runtime/include/method.h"
90 using InvokeMethodHandler = std::function<Value(ManagedThread *, Method *, Value *)>;
119 Method *method; member
134 …retypes::String *ResolveString([[maybe_unused]] PandaVM *vm, [[maybe_unused]] const Method &caller, in ResolveString()
141 …es::Array *ResolveLiteralArray([[maybe_unused]] PandaVM *vm, [[maybe_unused]] const Method &caller, in ResolveLiteralArray()
148 …static Method *ResolveMethod([[maybe_unused]] ManagedThread *thread, [[maybe_unused]] const Method in ResolveMethod()
155 … Field *ResolveField([[maybe_unused]] ManagedThread *thread, [[maybe_unused]] const Method &caller, in ResolveField()
163 … Class *ResolveClass([[maybe_unused]] ManagedThread *thread, [[maybe_unused]] const Method &caller, in ResolveClass()
170 …static uint32_t FindCatchBlock([[maybe_unused]] const Method &method, [[maybe_unused]] ObjectHeade… in FindCatchBlock() argument
206 static void SetupResolvedMethod(Method *method) in SetupResolvedMethod() argument
[all …]
/ark/runtime_core/verification/thread/
Dverifier_thread.cpp39 job.ForAllCachedMethods([&panda_types](const CacheOfRuntimeThings::CachedMethod &method) { in UpdateTypes() argument
40 panda_types.NormalizedMethodSignature(method); in UpdateTypes()
63 void SetResult(Method *method, bool result) in SetResult() argument
70 method->SetVerified(result); in SetResult()
83 auto &method = job.JobMethod(); in VerifierThread() local
85 if (method.IsVerified()) { in VerifierThread()
86 // method may be marked as verified during marking all in VerifierThread()
92 … LOG(DEBUG, VERIFIER) << "Verification of method '" << method.GetFullName() << std::hex << "' ( 0x" in VerifierThread()
93 … << method.GetUniqId() << ", 0x" << reinterpret_cast<uintptr_t>(&method) << ")"; in VerifierThread()
99 ASSERT(method.GetInstructions() == job.JobCachedMethod().bytecode); in VerifierThread()
[all …]
/ark/runtime_core/runtime/dprofiler/
Ddprofiler.cpp26 #include "runtime/include/method.h"
54 static PandaString GetFullName(const Method *method) in GetFullName() argument
56 return reinterpret_cast<const char *>(method->GetClassName().data) + PandaString(".") + in GetFullName()
57 reinterpret_cast<const char *>(method->GetName().data); in GetFullName()
77 for (const auto &method : klass->GetMethods()) { in AddClass() local
78 if (method.GetHotnessCounter() != 0) { in AddClass()
79 if (!hot_methods_.insert(&method).second) { in AddClass()
80 LOG(ERROR, DPROF) << "Method already exsists: " << GetFullName(&method); in AddClass()
89 for (const Method *method : hot_methods_) { in Dump() local
90 …auto ret = method_info_map.emplace(std::make_pair(GetFullName(method), method->GetHotnessCounter()… in Dump()
[all …]
/ark/runtime_core/verification/cflow/
Dcflow_check.cpp19 #include "runtime/include/method-inl.h"
33 // check method code jumps (body + exc handlers, i.e all code) in CheckCode()
40 "Invalid jump in the method body into middle of instruction."); in CheckCode()
45 // check method body last instruction, if body spans till the method end in CheckCode()
51 …LOG(DEBUG, VERIFIER) << "Invalid last instruction in method, execution beyond the method code boun… in CheckCode()
60 const CacheOfRuntimeThings::CachedMethod &method) in CheckFallthroughFromBlock() argument
69 LOG_VERIFIER_CFLOW_BODY_FALL_INTO_EXC_HANDLER(CacheOfRuntimeThings::GetName(method), in CheckFallthroughFromBlock()
70 … (OffsetAsHexStr(method.bytecode, block_info.End))); in CheckFallthroughFromBlock()
105 …report_incorrect_jump(jmp_pc, tgt_pc, "Prohibited jump from method body to/into exception handler.… in CheckJmpIntoExcHandler()
114 const CacheOfRuntimeThings::CachedMethod &method) in CheckFallthroughFromExcHandler() argument
[all …]
/ark/runtime_core/runtime/
Dmethod.cpp31 #include "runtime/include/method-inl.h"
56 Method::Proto::Proto(const panda_file::File &pf, panda_file::File::EntityId proto_id) in Proto()
74 std::string_view Method::Proto::GetReturnTypeDescriptor() const in GetReturnTypeDescriptor()
113 uint32_t Method::GetFullNameHashFromString(const uint8_t *str) in GetFullNameHashFromString()
118 uint32_t Method::GetClassNameHashFromString(const uint8_t *str) in GetClassNameHashFromString()
123 uint32_t Method::GetFullNameHash() const in GetFullNameHash()
126 // some unit tests are using underdefined method objects in GetFullNameHash()
135 Method::UniqId Method::CalcUniqId(const uint8_t *class_descr, const uint8_t *name) in CalcUniqId()
144 Method::Method(Class *klass, const panda_file::File *pf, panda_file::File::EntityId file_id, in Method() function in panda::Method
156 Value Method::Invoke(ManagedThread *thread, Value *args, bool proxy_call) in Invoke()
[all …]
/ark/runtime_core/runtime/bridge/arch/amd64/
Dcompiled_code_to_interpreter_bridge_dyn_amd64.S19 // Frame* CreateFrameForMethodWithActualArgs(uint32_t num_actual_args, Method* method, Frame* prev);
21 // void InterpreterEntryPoint(Method* pc, Frame* frame, bool is_dynamic);
25 // bool IncrementHotnessCounter(Method* method, bool is_dynamic);
27 // DecodedTaggedValue GetInitialTaggedValue(Method*)
30 // CompiledCodeToInterpreterBridgeDyn(Method* method, uint32_t num_args, int64_t func_obj, int64_t …
37 // method: %rdi
115 // save method* before call
122 // num_args = max(num_args, method->num_args_)
132 …// Frame* CreateFrameForMethodWithActualArgs(uint32_t num_actual_args, Method* method, Frame* prev…
144 // %rbx - method*
[all …]
/ark/js_runtime/ecmascript/tooling/test/
Ddebugger_params_test.cpp76 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{}})"; in HWTEST_F_L0()
82 … msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"maxScriptsCacheSize":100}})"; in HWTEST_F_L0()
96 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{}})"; in HWTEST_F_L0()
102 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"unknownKey":100}})"; in HWTEST_F_L0()
108 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"samplingInterval":true}})"; in HWTEST_F_L0()
113 … msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"samplingInterval":"Test"}})"; in HWTEST_F_L0()
118 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"samplingInterval":1000}})"; in HWTEST_F_L0()
130 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{}})"; in HWTEST_F_L0()
136 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"unknownKey":100}})"; in HWTEST_F_L0()
142 msg = std::string() + R"({"id":0,"method":"Debugger.Test","params":{"trackAllocations":10}})"; in HWTEST_F_L0()
[all …]
/ark/runtime_core/runtime/bridge/arch/x86/
Dinterpreter_to_compiled_code_bridge_x86.S65 // %ebx - method
76 1: subl $4, %esp // space for Method
79 // check whether the method is an instance
83 // it is an instance method
115 …deBridge(const BytecodeInstruction* insn, const Frame *iframe, const Method *method, ManagedThread…
148 movl 12(%ebp), %ebx // method*
149 movl METHOD_SHORTY_OFFSET(%ebx), %SHORTY_PTR_REG // method->shorty*
157 movl METHOD_SHORTY_OFFSET(%ebx), %SHORTY_PTR_REG // method->shorty*
177 1: movl 12(%ebp), %ebx // method*
178 movl %ebx, (%edi) // push method to the stack
[all …]

12345678910>>...15