Home
last modified time | relevance | path

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

12345678910>>...36

/arkcompiler/runtime_core/runtime/
Dcha.cpp38 for (const auto &method : klass->GetVTable()) { in Update() local
39 SetHasSingleImplementation(method, true); in Update()
46 PandaSet<Method *> invalidated_methods; in Update()
49 auto method = klass->GetVTable()[i]; in Update() local
51 if (method == parent_method || method->IsDefaultInterfaceMethod()) { in Update()
59 UpdateMethod(method); in Update()
63 auto method = klass->GetVTable()[i]; in Update() local
64 if (method->IsDefaultInterfaceMethod()) { in Update()
67 UpdateMethod(method); in Update()
73 bool ClassHierarchyAnalysis::HasSingleImplementation(Method *method) in HasSingleImplementation() argument
[all …]
Dcompiler.h32 #include "runtime/include/method.h"
46 inline panda::Method *MethodCast(RuntimeInterface::MethodPtr method) in MethodCast() argument
48 return static_cast<panda::Method *>(method); in MethodCast()
68 RuntimeInterface::MethodPtr GetSingleImplementation(RuntimeInterface::MethodPtr method) override in GetSingleImplementation() argument
70 return static_cast<Method *>(method)->GetSingleImplementation(); in GetSingleImplementation()
72 bool IsSingleImplementation(RuntimeInterface::MethodPtr method) override in IsSingleImplementation() argument
74 return static_cast<Method *>(method)->HasSingleImplementation(); in IsSingleImplementation()
87 bool AddTableSlot(RuntimeInterface::MethodPtr method, uint32_t type_id, SlotKind kind) override;
88 …uintptr_t GetTableSlot(RuntimeInterface::MethodPtr method, uint32_t type_id, SlotKind kind) const …
138 BinaryFilePtr GetBinaryFileForMethod(MethodPtr method) const override in GetBinaryFileForMethod() argument
[all …]
Dcompiler.cpp58 Method::CompilationStage status = task.GetMethod()->GetCompilationStatus(); in Process()
59 if (status == Method::WAITING) { in Process()
61 if (task.GetMethod()->AtomicSetCompilationStatus(Method::WAITING, Method::COMPILATION)) { in Process()
94 compiler::RuntimeInterface::MethodId PandaRuntimeInterface::GetMethodId(MethodPtr method) const in GetMethodId()
96 return MethodCast(method)->GetFileId().GetOffset(); in GetMethodId()
99 compiler::RuntimeInterface::IntrinsicId PandaRuntimeInterface::GetIntrinsicId(MethodPtr method) con… in GetIntrinsicId()
101 return GetIntrinsicEntryPointId(MethodCast(method)->GetIntrinsic()); in GetIntrinsicId()
104 …erface::MethodPtr PandaRuntimeInterface::ResolveVirtualMethod(ClassPtr cls, MethodPtr method) const in ResolveVirtualMethod()
107 ASSERT(method != nullptr); in ResolveVirtualMethod()
108 return ClassCast(cls)->ResolveVirtualMethod(MethodCast(method)); in ResolveVirtualMethod()
[all …]
Dcha.h25 void AddDependency(Method *callee, Method *caller);
28 void InvalidateMethod(Method *method, PandaSet<Method *> *dependent_methods);
29 void InvalidateMethods(const PandaSet<Method *> &methods);
30 void UpdateMethod(Method *method);
31 bool HasSingleImplementation(Method *method);
32 void SetHasSingleImplementation(Method *method, bool single_implementation);
39 PandaMap<Method *, PandaSet<Method *>> dependency_map_;
/arkcompiler/runtime_core/runtime/tests/
Dcompilation_status_test.cpp21 #include "runtime/include/method.h"
41 Method *GetMethod(Class *klass, size_t num);
54 Method *CompilationStatusTest::GetMethod(Class *klass, size_t num) in GetMethod()
58 Method *method = klass->GetDirectMethod(utf::CStringAsMutf8(ss.str().c_str())); in GetMethod() local
59 return method; in GetMethod()
91 Method *method = GetMethod(klass, 0); in TEST_F() local
92 auto status = method->GetCompilationStatus(); in TEST_F()
93 ASSERT_EQ(status, Method::NOT_COMPILED); in TEST_F()
95 ASSERT_EQ(method->AtomicSetCompilationStatus(status, Method::WAITING), true); in TEST_F()
96 status = method->GetCompilationStatus(); in TEST_F()
[all …]
Dcompiler_queue_test.cpp25 #include "runtime/include/method.h"
85 static void GetAndCheckMethodIfExists(CompilerQueueInterface *queue, Method *target) in GetAndCheckMethodIfExists()
87 auto method = queue->GetTask().GetMethod(); in GetAndCheckMethodIfExists() local
89 if (method != nullptr) { in GetAndCheckMethodIfExists()
90 ASSERT_EQ(method, target); in GetAndCheckMethodIfExists()
114 Method *main_method = klass->GetDirectMethod(utf::CStringAsMutf8("main")); in TEST_F()
117 Method *f_method = klass->GetDirectMethod(utf::CStringAsMutf8("f")); in TEST_F()
120 Method *g_method = klass->GetDirectMethod(utf::CStringAsMutf8("g")); in TEST_F()
144 Method *main_method = klass->GetDirectMethod(utf::CStringAsMutf8("main")); in TEST_F()
147 Method *f_method = klass->GetDirectMethod(utf::CStringAsMutf8("f")); in TEST_F()
[all …]
Dosr_code_test.cpp21 #include "runtime/include/method.h"
40 Method *GetMethod(Class *klass, size_t num);
54 Method *OsrCodeTest::GetMethod(Class *klass, size_t num) in GetMethod()
58 Method *method = klass->GetDirectMethod(utf::CStringAsMutf8(ss.str().c_str())); in GetMethod() local
59 return method; in GetMethod()
95 Method *method = GetMethod(klass, i); in CompileMethods() local
96 ASSERT_NE(method, nullptr); in CompileMethods()
97 compiler->SetOsrCode(method, static_cast<void *>(method)); in CompileMethods()
101 Method *method = GetMethod(klass, i); in CompileMethods() local
102 ASSERT_NE(method, nullptr); in CompileMethods()
[all …]
Dmethod_test.cpp25 #include "runtime/include/method-inl.h"
98 Method *method = klass->GetDirectMethod(utf::CStringAsMutf8("foo")); in VerifyLineNumber() local
99 ASSERT_NE(method, nullptr); in VerifyLineNumber()
102 …ASSERT_EQ(method->GetLineNumFromBytecodeOffset(offsets[i]), lines[i]) << "do not match on i = " <<… in VerifyLineNumber()
111 static Frame *CreateFrame(size_t nregs, Method *method, Frame *prev) in CreateFrame() argument
113 return panda::CreateFrameWithSize(Frame::GetActualSize<is_dynamic>(nregs), nregs, method, prev); in CreateFrame()
118Method method(nullptr, nullptr, panda_file::File::EntityId(), panda_file::File::EntityId(), 0, 0, … in TEST_F() local
119 ASSERT_FALSE(method.IsIntrinsic()); in TEST_F()
122 method.SetIntrinsic(intrinsic); in TEST_F()
123 ASSERT_TRUE(method.IsIntrinsic()); in TEST_F()
[all …]
/arkcompiler/runtime_core/runtime/include/
Dvtable_builder-inl.h40 void VTableBuilderImpl<SearchBySignature, OverridePred>::BuildForInterface(Span<Method> methods) in BuildForInterface()
42 for (const auto &method : methods) { in BuildForInterface() local
43 if (method.IsStatic()) { in BuildForInterface()
47 if (!method.IsAbstract()) { in BuildForInterface()
61 for (auto *method : base_class_vtable) { in AddBaseMethods()
62 vtable_.AddBaseMethod(MethodInfo(method, 0, true)); in AddBaseMethods()
86 void VTableBuilderImpl<SearchBySignature, OverridePred>::AddClassMethods(Span<Method> methods) in AddClassMethods()
88 for (auto &method : methods) { in AddClassMethods()
89 if (method.IsStatic()) { in AddClassMethods()
93 MethodInfo method_info(&method, num_vmethods_); in AddClassMethods()
[all …]
Dvtable_builder.h28 #include "runtime/include/method.h"
32 bool IsMaxSpecificMethod(const Class *iface, const Method &method, size_t startindex, const ITable …
51 …explicit MethodInfo(Method *method, size_t index = 0, bool is_base = false, bool needs_copy = fals…
52 : method_(method), in method_() argument
53 pf_(method->GetPandaFile()), in method_()
54 class_id_(method->GetClass()->GetFileId()), in method_()
55 access_flags_(method->GetAccessFlags()), in method_()
56 name_(method->GetName()), in method_()
57 proto_(method->GetProtoId()), in method_()
58 ctx_(method->GetClass()->GetLoadContext()), in method_()
[all …]
Dclass-inl.h33 bool operator()(const Method &m, const panda_file::File::StringData &name) const in operator()
51 using MethodNameComp = NameComp<Method>;
52 using MethodIdComp = EntityIdComp<Method>;
259 inline Span<Method> Class::GetMethods() const in GetMethods()
276 inline Method *Class::FindDirectMethod(Key key, const Pred &... preds) const in FindDirectMethod()
281 auto *method = BinSearch<KeyComp>(methods, key, preds...); in FindDirectMethod() local
282 if (method != nullptr) { in FindDirectMethod()
283 return method; in FindDirectMethod()
290 auto *method = BinSearch<KeyComp>(methods, key, preds...); in FindDirectMethod() local
291 if (method != nullptr) { in FindDirectMethod()
[all …]
Dcompiler_interface.h35 explicit CompilerTask(Method *method = nullptr, bool is_osr = false, PandaVM *vm = nullptr)
36 : method_(method), is_osr_(is_osr), vm_(vm) in method_() argument
39 Method *GetMethod() const in GetMethod()
59 Method *method_ {nullptr};
64 class Method; variable
71 … ExecState(const uint8_t *pc, Frame *frame, Method *callee, size_t num_args, const bool *sp_flag) in ExecState()
136 Method *GetCalleeMethod() in GetCalleeMethod()
179 Method *callee_method_;
190 virtual bool CompileMethod(Method *method, uintptr_t bytecode_offset, bool osr) = 0;
198 virtual void *GetOsrCode(const Method *method) = 0;
[all …]
/arkcompiler/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 …]
/arkcompiler/runtime_core/runtime/interpreter/
Druntime_interface.h28 #include "runtime/include/method.h"
40 static Method *ResolveMethod(ManagedThread *thread, const Method &caller, BytecodeId id) in ResolveMethod()
44 auto *method = class_linker->GetMethod(caller, resolved_id); in ResolveMethod() local
45 if (method == nullptr) { in ResolveMethod()
49 auto *klass = method->GetClass(); in ResolveMethod()
54 return method; in ResolveMethod()
57 static const uint8_t *GetMethodName(const Method *caller, BytecodeId method_id) in GetMethodName()
65 static Class *GetMethodClass(const Method *caller, BytecodeId method_id) in GetMethodClass()
76 static uint32_t GetMethodArgumentsCount(Method *caller, BytecodeId method_id) in GetMethodArgumentsCount()
85 static Field *ResolveField(ManagedThread *thread, const Method &caller, BytecodeId id) in ResolveField()
[all …]
/arkcompiler/runtime_core/runtime/tooling/inspector/
Dinspector_hooks.h28 class Method; variable
46 void Breakpoint(PtThread thread, Method *method, const PtLocation &location) override in Breakpoint() argument
48 … RunHooks<PtThread, Method *, const PtLocation &>(&PtHooks::Breakpoint, thread, method, location); in Breakpoint()
51 void FramePop(PtThread thread, Method *method, bool wasPoppedByException) override in FramePop() argument
53 … RunHooks<PtThread, Method *, bool>(&PtHooks::FramePop, thread, method, wasPoppedByException); in FramePop()
56 void MethodEntry(PtThread thread, Method *method) override in MethodEntry() argument
58 RunHooks<PtThread, Method *>(&PtHooks::MethodEntry, thread, method); in MethodEntry()
61 void SingleStep(PtThread thread, Method *method, const PtLocation &location) override in SingleStep() argument
63 … RunHooks<PtThread, Method *, const PtLocation &>(&PtHooks::SingleStep, thread, method, location); in SingleStep()
76 void RunHooks(void (PtHooks::*method)(Param...), Arg &&... arg) in RunHooks()
[all …]
/arkcompiler/runtime_core/runtime/entrypoints/
Dentrypoints.h25 extern "C" Frame *CreateFrameWithSize(uint32_t size, uint32_t nregs, Method *method, Frame *prev);
28 Method *method, Frame *prev);
31 Method *method, Frame *prev);
33 extern "C" Frame *CreateFrameForMethod(Method *method, Frame *prev);
35 extern "C" Frame *CreateFrameForMethodDyn(Method *method, Frame *prev);
37 extern "C" Frame *CreateFrameForMethodWithActualArgs(uint32_t num_actual_args, Method *method, Fram…
39 extern "C" Frame *CreateFrameForMethodWithActualArgsDyn(uint32_t num_actual_args, Method *method, F…
Dentrypoints.cpp26 #include "runtime/include/method-inl.h"
101 extern "C" int HasCompiledCode(Method *method) in HasCompiledCode() argument
103 return method->HasCompiledCode() ? 1 : 0; in HasCompiledCode()
106 extern "C" bool IncrementHotnessCounter(Method *method) in IncrementHotnessCounter() argument
108 method->IncrementHotnessCounter(0, nullptr); in IncrementHotnessCounter()
109 return method->GetCompiledEntryPoint() != GetCompiledCodeToInterpreterBridge(method); in IncrementHotnessCounter()
112 extern "C" NO_ADDRESS_SANITIZE void InterpreterEntryPoint(Method *method, Frame *frame) in InterpreterEntryPoint() argument
114 auto pc = method->GetInstructions(); in InterpreterEntryPoint()
115 Method *callee = frame->GetMethod(); in InterpreterEntryPoint()
169 extern "C" size_t GetClassIdEntrypoint(const Method *caller, uint32_t class_id) in GetClassIdEntrypoint()
[all …]
/arkcompiler/runtime_core/runtime/tests/tooling/
Dtest_runner.h40 void Breakpoint(PtThread thread, Method *method, const PtLocation &location) override in Breakpoint() argument
43 test_->breakpoint(thread, method, location); in Breakpoint()
61 … void Exception(PtThread thread, Method *method, const PtLocation &location, ObjectHeader *object, in Exception() argument
62 Method *catch_method, const PtLocation &catch_location) override in Exception()
65 test_->exception(thread, method, location, object, catch_method, catch_location); in Exception()
69 …void ExceptionCatch(PtThread thread, Method *method, const PtLocation &location, ObjectHeader *obj… in ExceptionCatch() argument
72 test_->exception_catch(thread, method, location, object); in ExceptionCatch()
76 …void PropertyAccess(PtThread thread, Method *method, const PtLocation &location, ObjectHeader *obj… in PropertyAccess() argument
80 test_->property_access(thread, method, location, object, property); in PropertyAccess()
84 …void PropertyModification(PtThread thread, Method *method, const PtLocation &location, ObjectHeade… in PropertyModification() argument
[all …]
/arkcompiler/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(ERROR, VERIFIER) << "Invalid last instruction in method, execution beyond the method code boun… in CheckCode()
75 static bool CheckInvalidCatchBlockEnter(const LibCache::CachedMethod &method, const CflowMethodInfo… in CheckInvalidCatchBlockEnter() argument
78 const uint8_t *method_start = method.bytecode; in CheckInvalidCatchBlockEnter()
80 const uint8_t *method_end = &method_start[method.bytecode_size - 1]; in CheckInvalidCatchBlockEnter()
83 …auto cflow_handler = [&cflow_info, &method, &status_ok, &options](auto type, const uint8_t *pc, si… in CheckInvalidCatchBlockEnter()
89 LOG_VERIFIER_CFLOW_BODY_FALL_INTO_EXC_HANDLER(LibCache::GetName(method), in CheckInvalidCatchBlockEnter()
[all …]
/arkcompiler/runtime_core/runtime/methodtrace/
Dtrace.h29 #include "runtime/include/method.h"
69 void MethodEntry(ManagedThread *thread, Method *method) override;
70 void MethodExit(ManagedThread *thread, Method *method) override;
84 uint32_t EncodeMethodToId(Method *method);
86 virtual PandaString GetMethodDetailInfo(Method *method) = 0;
113 // all methods are encoded to id, and put method、id into this map
114 PandaMap<Method *, uint32_t> method_id_pandamap_ GUARDED_BY(methods_lock_);
115 PandaVector<Method *> methods_called_vector_ GUARDED_BY(methods_lock_);
120 uint32_t EncodeMethodAndEventToId(Method *method, EventFlag flag);
121 Method *DecodeIdToMethod(uint32_t id);
[all …]
/arkcompiler/runtime_core/runtime/tests/interpreter/
Dtest_runtime_interface.h26 #include "runtime/include/method.h"
100 using InvokeMethodHandler = std::function<Value(ManagedThread *, Method *, Value *)>;
129 Method *method; member
143 …es::Array *ResolveLiteralArray([[maybe_unused]] PandaVM *vm, [[maybe_unused]] const Method &caller, in ResolveLiteralArray()
150 …static Method *ResolveMethod([[maybe_unused]] ManagedThread *thread, [[maybe_unused]] const Method in ResolveMethod()
157 … Field *ResolveField([[maybe_unused]] ManagedThread *thread, [[maybe_unused]] const Method &caller, in ResolveField()
165 … Class *ResolveClass([[maybe_unused]] ManagedThread *thread, [[maybe_unused]] const Method &caller, in ResolveClass()
172 …static uint32_t FindCatchBlock([[maybe_unused]] const Method &method, [[maybe_unused]] ObjectHeade… in FindCatchBlock() argument
198 static void JITCompileMethod(Method *method) in JITCompileMethod() argument
200 method->SetCompiledEntryPoint(entry_point); in JITCompileMethod()
[all …]
/arkcompiler/runtime_core/bytecode_optimizer/
Druntime_adapter.h39 BinaryFilePtr GetBinaryFileForMethod([[maybe_unused]] MethodPtr method) const override in GetBinaryFileForMethod() argument
69 MethodId GetMethodId(MethodPtr method) const override in GetMethodId() argument
71 return static_cast<MethodId>(reinterpret_cast<uintptr_t>(method)); in GetMethodId()
74 compiler::DataType::Type GetMethodReturnType(MethodPtr method) const override in GetMethodReturnType() argument
76 panda_file::MethodDataAccessor mda(panda_file_, MethodCast(method)); in GetMethodReturnType()
82 … compiler::DataType::Type GetMethodTotalArgumentType(MethodPtr method, size_t index) const override in GetMethodTotalArgumentType() argument
84 panda_file::MethodDataAccessor mda(panda_file_, MethodCast(method)); in GetMethodTotalArgumentType()
107 size_t GetMethodTotalArgumentsCount(MethodPtr method) const override in GetMethodTotalArgumentsCount() argument
109 panda_file::MethodDataAccessor mda(panda_file_, MethodCast(method)); in GetMethodTotalArgumentsCount()
130 size_t GetMethodRegistersCount(MethodPtr method) const override in GetMethodRegistersCount() argument
[all …]
/arkcompiler/runtime_core/verification/jobs/
Dthread_pool.cpp33 // The return value of this method is currently ignored in panda::ThreadPool::WorkerEntry. in Process()
38 auto &method = task.GetMethod(); in Process() local
39 if (method.IsVerified()) { in Process()
40 LOG(DEBUG, VERIFIER) << "Method '" << method.GetFullName(true) << "' is already verified"; in Process()
44 auto method_name = method.GetFullName(); in Process()
48 LOG(INFO, VERIFIER) << "Attempt to verify " << method.GetFullName(true) in Process()
53 …auto opt_cached_method = cache.FastAPI().GetMethod(method.GetClass()->GetSourceLang(), method.GetU… in Process()
55 LOG(ERROR, VERIFIER) << "Method '" << method.GetFullName(true) in Process()
57 method.SetVerified(false); in Process()
63 …O, VERIFIER) << "Verifier thread #" << types_.GetThreadNum() << " started verification of method '" in Process()
[all …]
/arkcompiler/runtime_core/compiler/docs/
Dinterface_inline_cache.md4 `Interface Inline Cache` is an optimization for speeding up find method in interface method call.
5 … to be inherited, and uses the itable table to dynamically query the address of the target method.
6 `Interface Inline Cache` will stores the parsing result of the previous method address as the cache…
11 * There is a 90% - 95% chance that the same method will be used in real-world application test.
15 * `Slow path`: Call runtime RESOLVE_VIRTUAL_CALL_AOT to get method address and save method addr a…
38 use cache.offset(method) |
41 save method‘s offset to cache >------|
43 call method
60 1. The purpose of `offset addr` is to obtain the `method addr` through calculation.
61 2. `offset addr` = ((`method addr`) - ([`class addr`].`methods_` addr)) / 2 ^ 3
[all …]
/arkcompiler/ets_runtime/ecmascript/debugger/
Djs_debugger.cpp74 void JSDebugger::BytecodePcChanged(JSThread *thread, JSHandle<Method> method, uint32_t bcOffset) in BytecodePcChanged() argument
76 ASSERT(bcOffset < method->GetCodeSize() && "code size of current Method less then bcOffset"); in BytecodePcChanged()
77 HandleExceptionThrowEvent(thread, method, bcOffset); in BytecodePcChanged()
80 if (!HandleStep(method, bcOffset)) { in BytecodePcChanged()
81 HandleBreakpoint(method, bcOffset); in BytecodePcChanged()
85 bool JSDebugger::HandleBreakpoint(JSHandle<Method> method, uint32_t bcOffset) in HandleBreakpoint() argument
87 auto breakpoint = FindBreakpoint(method, bcOffset); in HandleBreakpoint()
111 JSPtLocation location {method->GetJSPandaFile(), method->GetMethodId(), bcOffset, in HandleBreakpoint()
118 void JSDebugger::HandleExceptionThrowEvent(const JSThread *thread, JSHandle<Method> method, uint32_… in HandleExceptionThrowEvent() argument
124 JSPtLocation throwLocation {method->GetJSPandaFile(), method->GetMethodId(), bcOffset}; in HandleExceptionThrowEvent()
[all …]

12345678910>>...36