Skip to content

Commit

Permalink
rename dependent_functions to functions
Browse files Browse the repository at this point in the history
  • Loading branch information
snapdgn committed May 31, 2024
1 parent c8a1d58 commit 06c8804
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sail_json_backend/json.ml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ let encodings = Hashtbl.create 997
let assembly = Hashtbl.create 997
let assembly_clean = Hashtbl.create 997
let executes = Hashtbl.create 997
let dependent_functions = Hashtbl.create 997
let functions = Hashtbl.create 997
let op_functions = Hashtbl.create 997
let formats = Hashtbl.create 997
let extensions = Hashtbl.create 997
Expand Down Expand Up @@ -341,7 +341,7 @@ let parse_funcl fcl = match fcl with
| Pat_when (P_aux (P_tuple pl, _), e, _) ->
debug_print ("id_of_dependent: " ^ id);
let source_code = extract_source_code (Ast_util.exp_loc e) in
Hashtbl.add dependent_functions id source_code;
Hashtbl.add functions id source_code;
| Pat_exp (P_aux (P_app (i, pl), _), e)
| Pat_when (P_aux (P_app (i, pl), _), e, _) ->
debug_print ("FCL_funcl execute " ^ string_of_id i);
Expand Down Expand Up @@ -714,8 +714,8 @@ let defs { defs; _ } =
Hashtbl.iter (fun k v -> debug_print (k ^ ":" ^ Util.string_of_list ", " (fun x -> x) v)) assembly;
debug_print "EXECUTES";
Hashtbl.iter (fun k v -> debug_print (k ^ ":" ^ v)) executes;
debug_print "DEPENDENT_FUNCTIONS";
Hashtbl.iter (fun k v -> debug_print (k ^ ":" ^ v)) dependent_functions;
debug_print "FUNCTIONS";
Hashtbl.iter (fun k v -> debug_print (k ^ ":" ^ v)) functions;
debug_print "OP_FUNCTIONS";
Hashtbl.iter (fun k v -> debug_print (k ^ ":" ^ v)) op_functions;
debug_print "EXENSIONS";
Expand Down Expand Up @@ -758,10 +758,10 @@ let defs { defs; _ } =
print_endline (String.concat ",\n" (List.sort_uniq String.compare (List.concat extension_list)));
print_endline " ],";

print_endline " \"dependent_functions\": [";
print_endline " \"functions\": [";
Hashtbl.iter (fun name source ->
print_endline (" {\n \"name\": \"" ^ name ^ "\",");
print_endline (" \"source\": \"" ^ String.escaped source ^ "\"\n },")
) dependent_functions;
) functions;
print_endline " ]";
print_endline "}";

0 comments on commit 06c8804

Please sign in to comment.