Minor fixes

This commit is contained in:
Андреев Григорий 2024-07-31 22:30:29 +03:00
parent fc6e8e50fe
commit 96cf8e96c1
17 changed files with 10 additions and 33 deletions

View File

@ -43,7 +43,6 @@ struct Libregexis024BuildSystem {
std::vector<CTarget> my_targets; std::vector<CTarget> my_targets;
{ {
std::vector<std::string> compilation_units_release = { std::vector<std::string> compilation_units_release = {
"libregexis024vm/utils.cpp",
"libregexis024vm/vm_errno.cpp", "libregexis024vm/vm_errno.cpp",
"libregexis024vm/vm_opcodes_disassembly.cpp", "libregexis024vm/vm_opcodes_disassembly.cpp",
"libregexis024vm/libregexis024vm_interface.cpp", "libregexis024vm/libregexis024vm_interface.cpp",
@ -67,6 +66,7 @@ struct Libregexis024BuildSystem {
"libregexis024fa/graph_to_bytecode/fa_compiler.cpp", "libregexis024fa/graph_to_bytecode/fa_compiler.cpp",
"libregexis024fa/graph_to_bytecode/core.cpp", "libregexis024fa/graph_to_bytecode/core.cpp",
"libregexis024sol/utils.cpp",
"libregexis024sol/common_codesets.cpp", "libregexis024sol/common_codesets.cpp",
"libregexis024sol/expr_compiler.cpp", "libregexis024sol/expr_compiler.cpp",
"libregexis024sol/square_bracket_expression.cpp", "libregexis024sol/square_bracket_expression.cpp",

View File

@ -1,6 +1,6 @@
#include <debugging_regexis024/prettyprint/prettyprint_util.h> #include <debugging_regexis024/prettyprint/prettyprint_util.h>
#include <functional> #include <functional>
#include <libregexis024vm/utils.h> #include <libregexis024sol/utils.h>
namespace regexis024 { namespace regexis024 {
static const char* ch_empty = " "; static const char* ch_empty = " ";

View File

@ -1,12 +1,7 @@
#include <libregexis024fa/fa_first_stage_fix.h> #include <libregexis024fa/fa_first_stage_fix.h>
#include <libregexis024fa/misc_fa_funcs.h> #include <libregexis024fa/misc_fa_funcs.h>
#include <libregexis024vm/utils.h>
#include <assert.h> #include <assert.h>
// #ifdef LIBREGEXIS024_DEBUG
// #include <debugging_regexis024/debug_through_graphviz.h>
// #endif
namespace regexis024 { namespace regexis024 {
REGEX_IS024_FA_FirstStageFixInfo first_stage_fix_fa(FA_Container& sourceFa, FA_Container& resultFa) { REGEX_IS024_FA_FirstStageFixInfo first_stage_fix_fa(FA_Container& sourceFa, FA_Container& resultFa) {
assert(sourceFa.start); assert(sourceFa.start);
@ -88,8 +83,6 @@ namespace regexis024 {
v_sete.node->search_mark = -1; v_sete.node->search_mark = -1;
} }
// show_fa_with_sxiv_after_dot(sourceFa, {{}, {}}, {});
{ {
/* Now it's time to fill resultFa. Skipping all look one ahead's */ /* Now it's time to fill resultFa. Skipping all look one ahead's */
auto skip_useless = [&](FA_Node* v) -> FA_Node* { auto skip_useless = [&](FA_Node* v) -> FA_Node* {

View File

@ -1,5 +1,4 @@
#include <libregexis024fa/finite_automaton.h> #include <libregexis024fa/finite_automaton.h>
#include <libregexis024vm/utils.h>
#include <assert.h> #include <assert.h>
namespace regexis024 { namespace regexis024 {

View File

@ -56,7 +56,6 @@ namespace regexis024 {
} }
} }
// todo: use return value of this function
bool write_filter(std::vector<uint8_t>& result, explicit_bookmarks& bookmark_manager, bool write_filter(std::vector<uint8_t>& result, explicit_bookmarks& bookmark_manager,
const std::vector<codeset_t>& crossroad_codesets, const std::vector<bookmark_id_t>& crossroad_marks) const std::vector<codeset_t>& crossroad_codesets, const std::vector<bookmark_id_t>& crossroad_marks)
{ {

View File

@ -1,7 +1,6 @@
#include <libregexis024fa/misc_fa_funcs.h> #include <libregexis024fa/misc_fa_funcs.h>
#include <libregexis024vm/vm_opcodes.h> #include <libregexis024vm/vm_opcodes.h>
#include <assert.h> #include <assert.h>
#include <libregexis024vm/utils.h>
namespace regexis024 { namespace regexis024 {
void reattach_fa_node_edge(FA_Node **old_node_ptr, FA_Node *new_node) { void reattach_fa_node_edge(FA_Node **old_node_ptr, FA_Node *new_node) {

View File

@ -1,6 +1,6 @@
#include <libregexis024sol/special_terminals.h> #include <libregexis024sol/special_terminals.h>
#include <libregexis024vm/utils.h> #include <libregexis024sol/utils.h>
#include <libregexis024sol/sol_misc_base.h> #include <libregexis024sol/sol_misc_base.h>
#include <assert.h> #include <assert.h>
#include <memory> #include <memory>

View File

@ -1,6 +1,6 @@
#include <libregexis024sol/expr_compiler.h> #include <libregexis024sol/expr_compiler.h>
#include <libregexis024vm/vm_opcodes.h> #include <libregexis024vm/vm_opcodes.h>
#include <libregexis024vm/utils.h> #include <libregexis024sol/utils.h>
#include <libregexis024fa/codeset.h> #include <libregexis024fa/codeset.h>
#include <libregexis024fa/finite_automaton.h> #include <libregexis024fa/finite_automaton.h>
#include <libregexis024fa/fa_first_stage_fix.h> #include <libregexis024fa/fa_first_stage_fix.h>

View File

@ -1,5 +1,5 @@
#include <libregexis024sol/expr_parse_functions/command_recognition.h> #include <libregexis024sol/expr_parse_functions/command_recognition.h>
#include <libregexis024vm/utils.h> #include <libregexis024sol/utils.h>
#include <libregexis024sol/expr_compiler.h> #include <libregexis024sol/expr_compiler.h>
#include <libregexis024sol/sol_misc_base.h> #include <libregexis024sol/sol_misc_base.h>

View File

@ -1,5 +1,5 @@
#include <libregexis024sol/sol_misc_base.h> #include <libregexis024sol/sol_misc_base.h>
#include <libregexis024vm/utils.h> #include <libregexis024sol/utils.h>
namespace regexis024 { namespace regexis024 {
void report(REGEX_IS024_MeaningContext &ctx, const char *error) { void report(REGEX_IS024_MeaningContext &ctx, const char *error) {

View File

@ -1,4 +1,4 @@
#include <libregexis024vm/utils.h> #include <libregexis024sol/utils.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -4,7 +4,6 @@
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
// todo: move this file out from my eyes.
namespace regexis024 { namespace regexis024 {
/* 1, 2, 3, 4 on success; -1 on error */ /* 1, 2, 3, 4 on success; -1 on error */
int utf8_retrieve_size(char firstByte); int utf8_retrieve_size(char firstByte);

View File

@ -77,7 +77,7 @@ struct assembler_context{
} }
}; };
#define msh_put_instr(ename) daCtx.put_byte(regex024_opcodes::ename); #define msh_put_instr(ename) daCtx.put_byte(opcodes::ename);
#define msh_put_sslot(ssid) daCtx.put_doubleword(ssid); #define msh_put_sslot(ssid) daCtx.put_doubleword(ssid);
#define msh_put_track_arr_ind(i) daCtx.put_word(i); #define msh_put_track_arr_ind(i) daCtx.put_word(i);
#define msh_put_x(meth, x) daCtx.meth(x); #define msh_put_x(meth, x) daCtx.meth(x);
@ -121,9 +121,7 @@ struct assembler_context{
#define i_PARAM_SELARR_LEN(tai) msh_put_instr(PARAM_SELARR_LEN) msh_put_track_arr_ind(tai) #define i_PARAM_SELARR_LEN(tai) msh_put_instr(PARAM_SELARR_LEN) msh_put_track_arr_ind(tai)
#define i_PARAM_COLSIFTFUNC_SET(bookmark) msh_put_instr(PARAM_COLSIFTFUNC_SET) msh_bookmark_reference(bookmark) #define i_PARAM_COLSIFTFUNC_SET(bookmark) msh_put_instr(PARAM_COLSIFTFUNC_SET) msh_bookmark_reference(bookmark)
#define i_PARAM_COLSIFTFUNC_WIPE() msh_put_instr(PARAM_COLSIFTFUNC_WIPE) #define i_PARAM_COLSIFTFUNC_WIPE() msh_put_instr(PARAM_COLSIFTFUNC_WIPE)
#define i_MSG_MULTISTART_ALLOWED(is_allowed) msh_put_instr(MSG_MULTISTART_ALLOWED) daCtx.put_byte(is_allowed);
#define i_MSG_FED_INPUT_EXTENDED(left, right, part) msh_put_instr(MSG_FED_INPUT_EXTENDED) \
daCtx.put_byte(left); daCtx.put_byte(right); msh_put_sslot(part)
#define i_DMOV_RABX_SELARR(tai) msh_put_instr(DMOV_RABX_SELARR) msh_put_track_arr_ind(tai) #define i_DMOV_RABX_SELARR(tai) msh_put_instr(DMOV_RABX_SELARR) msh_put_track_arr_ind(tai)
#define DDIST_RABX_SELARR(tai_beg, tai_end) msh_put_instr(DDIST_RABX_SELARR) \ #define DDIST_RABX_SELARR(tai_beg, tai_end) msh_put_instr(DDIST_RABX_SELARR) \
msh_put_track_arr_ind(tai_beg) msh_put_track_arr_ind(tai_end) msh_put_track_arr_ind(tai_beg) msh_put_track_arr_ind(tai_end)

View File

@ -155,14 +155,6 @@ void print_disassembly(size_t prgSize, uint8_t* prg){
fph_register_landing(entry); fph_register_landing(entry);
secPrint("PARAM_COLSIFTFUNC_SET $%s\n", get_bookmark_in_2phase(entry).c_str()) secPrint("PARAM_COLSIFTFUNC_SET $%s\n", get_bookmark_in_2phase(entry).c_str())
simpleDimple(PARAM_COLSIFTFUNC_WIPE) simpleDimple(PARAM_COLSIFTFUNC_WIPE)
instCase(MSG_MULTISTART_ALLOWED)
uint8_t is_allowed = extract_b();
secPrint("MSG_MULTISTART_ALLOWED %hhu\n", is_allowed)
instCase(MSG_FED_INPUT_EXTENDED)
uint8_t left = extract_b();
uint8_t right = extract_b();
sslot_id_t part = extract_sslot_id();
secPrint("MSG_FED_INPUT_EXTENDED %hhu %hhu %u\n", left, right, part)
instCase(DMOV_RABX_SELARR) instCase(DMOV_RABX_SELARR)
tai_t i = extract_track_array_index(); tai_t i = extract_track_array_index();
secPrint("DMOV_RABX_SELARR %hu\n", i) secPrint("DMOV_RABX_SELARR %hu\n", i)

View File

@ -2,7 +2,7 @@
#include <libregexis024tools/stringmatching.h> #include <libregexis024tools/stringmatching.h>
#include <libregexis024sol/expr_compiler.h> #include <libregexis024sol/expr_compiler.h>
#include <libregexis024vm/libregexis024vm_interface.h> #include <libregexis024vm/libregexis024vm_interface.h>
#include <libregexis024vm/utils.h> #include <libregexis024sol/utils.h>
#include <assert.h> #include <assert.h>
// using namespace regexis024; // using namespace regexis024;

View File

@ -1,5 +1,4 @@
#include <libregexis024vm/vm_opcodes.h> #include <libregexis024vm/vm_opcodes.h>
#include <libregexis024vm/utils.h>
namespace regexis024 { namespace regexis024 {
const char *opcode_to_str(opcode_t x) { const char *opcode_to_str(opcode_t x) {

View File

@ -11,7 +11,6 @@
* Naming in this project is super inconsistent. I don't want it to trash your namespace */ * Naming in this project is super inconsistent. I don't want it to trash your namespace */
#include <libregexis024vm/vm_errno.h> #include <libregexis024vm/vm_errno.h>
#include <libregexis024vm/utils.h>
#include <libregexis024vm/vm_opcodes_types.h> #include <libregexis024vm/vm_opcodes_types.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>