Skip to content

Commit

Permalink
Remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
qubka committed Nov 16, 2024
1 parent 335c87d commit 4b0ae04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/callback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@ asmjit::TypeId PLH::Callback::getTypeId(DataType type) {
return getTypeIdx<double>();
case DataType::Pointer:
case DataType::String:
case DataType::WString:
return asmjit::TypeId::kUIntPtr;
}
return asmjit::TypeId::kVoid;
}

uint64_t PLH::Callback::getJitFunc(const asmjit::FuncSignature& sig, const asmjit::Arch arch, const CallbackEntry pre, const CallbackEntry post) {
uint64_t PLH::Callback::getJitFunc(const asmjit::FuncSignature& sig, const CallbackEntry pre, const CallbackEntry post) {
if (m_functionPtr) {
return m_functionPtr;
}
Expand Down Expand Up @@ -311,7 +310,7 @@ uint64_t PLH::Callback::getJitFunc(const DataType retType, std::span<const DataT
for (const DataType& type : paramTypes) {
sig.addArg(getTypeId(type));
}
return getJitFunc(sig, asmjit::Arch::kHost, pre, post);
return getJitFunc(sig, pre, post);
}

template<typename E>
Expand Down
6 changes: 3 additions & 3 deletions src/callback.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ namespace PLH {
Float,
Double,
Pointer,
String,
WString
String
// TODO: Add support of POD types
};

enum class ReturnAction : int32_t {
Expand Down Expand Up @@ -104,7 +104,7 @@ namespace PLH {
Callback();
~Callback();

uint64_t getJitFunc(const asmjit::FuncSignature& sig, asmjit::Arch arch, CallbackEntry pre, CallbackEntry post);
uint64_t getJitFunc(const asmjit::FuncSignature& sig, CallbackEntry pre, CallbackEntry post);
uint64_t getJitFunc(DataType retType, std::span<const DataType> paramTypes, CallbackEntry pre, CallbackEntry post);

uint64_t* getTrampolineHolder();
Expand Down

0 comments on commit 4b0ae04

Please sign in to comment.