mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
comment out unfinished str hook api
This commit is contained in:
@@ -578,10 +578,12 @@ namespace hook_api
|
|||||||
"hook_skip",
|
"hook_skip",
|
||||||
"hook_again",
|
"hook_again",
|
||||||
"meta_slot",
|
"meta_slot",
|
||||||
|
/*
|
||||||
"str_find",
|
"str_find",
|
||||||
"str_replace",
|
"str_replace",
|
||||||
"str_concat",
|
"str_concat",
|
||||||
"str_compare"
|
"str_compare"
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ namespace hook_api
|
|||||||
|
|
||||||
DECLARE_HOOK_FUNCTION(int64_t, meta_slot, uint32_t slot_no );
|
DECLARE_HOOK_FUNCTION(int64_t, meta_slot, uint32_t slot_no );
|
||||||
|
|
||||||
|
/*
|
||||||
DECLARE_HOOK_FUNCTION(int64_t, str_find, uint32_t hread_ptr, uint32_t hread_len,
|
DECLARE_HOOK_FUNCTION(int64_t, str_find, uint32_t hread_ptr, uint32_t hread_len,
|
||||||
uint32_t nread_ptr, uint32_t nread_len,
|
uint32_t nread_ptr, uint32_t nread_len,
|
||||||
uint32_t mode, uint32_t n);
|
uint32_t mode, uint32_t n);
|
||||||
@@ -217,7 +217,7 @@ namespace hook_api
|
|||||||
DECLARE_HOOK_FUNCTION(int64_t, str_concat, uint32_t write_ptr, uint32_t write_len,
|
DECLARE_HOOK_FUNCTION(int64_t, str_concat, uint32_t write_ptr, uint32_t write_len,
|
||||||
uint32_t read_ptr, uint32_t read_len,
|
uint32_t read_ptr, uint32_t read_len,
|
||||||
uint64_t operand, uint32_t operand_type);
|
uint64_t operand, uint32_t operand_type);
|
||||||
|
*/
|
||||||
} /* end namespace hook_api */
|
} /* end namespace hook_api */
|
||||||
|
|
||||||
namespace hook
|
namespace hook
|
||||||
@@ -619,11 +619,12 @@ namespace hook
|
|||||||
|
|
||||||
ADD_HOOK_FUNCTION(meta_slot, ctx);
|
ADD_HOOK_FUNCTION(meta_slot, ctx);
|
||||||
|
|
||||||
|
/*
|
||||||
ADD_HOOK_FUNCTION(str_find, ctx);
|
ADD_HOOK_FUNCTION(str_find, ctx);
|
||||||
ADD_HOOK_FUNCTION(str_replace, ctx);
|
ADD_HOOK_FUNCTION(str_replace, ctx);
|
||||||
ADD_HOOK_FUNCTION(str_compare, ctx);
|
ADD_HOOK_FUNCTION(str_compare, ctx);
|
||||||
ADD_HOOK_FUNCTION(str_concat, ctx);
|
ADD_HOOK_FUNCTION(str_concat, ctx);
|
||||||
|
*/
|
||||||
|
|
||||||
WasmEdge_TableInstanceContext* hostTable = WasmEdge_TableInstanceCreate(tableType);
|
WasmEdge_TableInstanceContext* hostTable = WasmEdge_TableInstanceCreate(tableType);
|
||||||
WasmEdge_ModuleInstanceAddTable(importObj, tableName, hostTable);
|
WasmEdge_ModuleInstanceAddTable(importObj, tableName, hostTable);
|
||||||
|
|||||||
@@ -5092,6 +5092,7 @@ DEFINE_HOOK_FUNCTION(
|
|||||||
return slot_into;
|
return slot_into;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
DEFINE_HOOK_FUNCTION(
|
DEFINE_HOOK_FUNCTION(
|
||||||
int64_t,
|
int64_t,
|
||||||
@@ -5269,28 +5270,26 @@ findNul(const void* vptr, size_t len)
|
|||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Overloaded API:
|
||||||
Overloaded API:
|
// If operand_type == 0:
|
||||||
If operand_type == 0:
|
// Copy read_ptr/len to write_ptr/len, do nothing else.
|
||||||
Copy read_ptr/len to write_ptr/len, do nothing else.
|
// If operand_type > 0:
|
||||||
If operand_type > 0:
|
// Copy read_ptr/len to write_ptr/len up to nul terminator, then
|
||||||
Copy read_ptr/len to write_ptr/len up to nul terminator, then
|
// If operand_type == 1:
|
||||||
If operand_type == 1:
|
// Concatenate operand as an i32 to the end of the string in write_ptr
|
||||||
Concatenate operand as an i32 to the end of the string in write_ptr
|
// If operand_type == 2:
|
||||||
If operand_type == 2:
|
// Concatenate operand as an u32 to the end of the string in write_ptr
|
||||||
Concatenate operand as an u32 to the end of the string in write_ptr
|
// If operand_type == 3/4:
|
||||||
If operand_type == 3/4:
|
// As above with i/u64
|
||||||
As above with i/u64
|
// If operand_type == 5:
|
||||||
If operand_type == 5:
|
// As above with operand interpreted as an XFL. Top 4 bits of operand_type are
|
||||||
As above with operand interpreted as an XFL. Top 4 bits of operand_type are
|
// precision for this type.
|
||||||
precision for this type.
|
// If operand_type == 6:
|
||||||
If operand_type == 6:
|
// Interpret the four most significant bytes of operand as a ptr, and the
|
||||||
Interpret the four most significant bytes of operand as a ptr, and the
|
// four least significant bytes as a length.
|
||||||
four least significant bytes as a length.
|
// Write the bytes at this location to the end of write_ptr.
|
||||||
Write the bytes at this location to the end of write_ptr.
|
// Finally:
|
||||||
Finally:
|
// Add a nul terminator to the end of write_ptr.
|
||||||
Add a nul terminator to the end of write_ptr.
|
|
||||||
*/
|
|
||||||
DEFINE_HOOK_FUNCTION(
|
DEFINE_HOOK_FUNCTION(
|
||||||
int64_t,
|
int64_t,
|
||||||
str_concat,
|
str_concat,
|
||||||
@@ -5433,3 +5432,5 @@ DEFINE_HOOK_FUNCTION(
|
|||||||
return INVALID_ARGUMENT;
|
return INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -7807,6 +7807,7 @@ public:
|
|||||||
env(pay(bob, alice, XRP(1)), M("test sto_validate"), fee(XRP(1)));
|
env(pay(bob, alice, XRP(1)), M("test sto_validate"), fee(XRP(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
void
|
void
|
||||||
test_str_compare()
|
test_str_compare()
|
||||||
{
|
{
|
||||||
@@ -7826,6 +7827,7 @@ public:
|
|||||||
test_str_replace()
|
test_str_replace()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
test_trace()
|
test_trace()
|
||||||
@@ -9723,10 +9725,12 @@ public:
|
|||||||
test_sto_subfield(); //
|
test_sto_subfield(); //
|
||||||
test_sto_validate(); //
|
test_sto_validate(); //
|
||||||
|
|
||||||
|
/*
|
||||||
test_str_compare();
|
test_str_compare();
|
||||||
test_str_concat();
|
test_str_concat();
|
||||||
test_str_find();
|
test_str_find();
|
||||||
test_str_replace();
|
test_str_replace();
|
||||||
|
*/
|
||||||
|
|
||||||
test_trace();
|
test_trace();
|
||||||
test_trace_float();
|
test_trace_float();
|
||||||
|
|||||||
Reference in New Issue
Block a user