Skip to content

Commit

Permalink
chore(compiler): Remove unused JSFunction and js_func
Browse files Browse the repository at this point in the history
  • Loading branch information
spotandjake committed Dec 30, 2023
1 parent a4016f1 commit bf00ef1
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 14 deletions.
1 change: 0 additions & 1 deletion compiler/src/codegen/transl_anf.re
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,6 @@ let lift_imports = (env, imports) => {
Ident.add(imp_use_id, MGlobalBind(glob, Managed), env.ce_binds),
},
);
| JSFunction(_) => failwith("NYI: lift_imports JSFunction")
};
};

Expand Down
3 changes: 1 addition & 2 deletions compiler/src/middle_end/analyze_inline_wasm.re
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ let analyze = ({imports, body, analyses}) => {
};
| GrainValue(_)
| WasmFunction(_)
| WasmValue(_)
| JSFunction(_) => ()
| WasmValue(_) => ()
};
};
List.iter(process_import, imports.specs);
Expand Down
3 changes: 1 addition & 2 deletions compiler/src/middle_end/analyze_manual_memory_management.re
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ let analyze = ({imports, body, analyses}) => {
set_manual_call(imp_use_id);
| GrainValue(_)
| WasmFunction(_)
| WasmValue(_)
| JSFunction(_) => ()
| WasmValue(_) => ()
};
};
let root_gc_disabled =
Expand Down
2 changes: 0 additions & 2 deletions compiler/src/middle_end/anf_helper.re
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,4 @@ module IncludeDeclaration = {
mk(a, WasmFunction(md, name), s, global);
let wasm_value = (~global=Nonglobal, a, md, name, s) =>
mk(a, WasmValue(md, name), s, global);
let js_func = (~global=Nonglobal, a, md, name, s) =>
mk(a, JSFunction(md, name), s, global);
};
3 changes: 0 additions & 3 deletions compiler/src/middle_end/anf_helper.rei
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,4 @@ module IncludeDeclaration: {
let wasm_value:
(~global: global_flag=?, ident, string, string, import_shape) =>
import_spec;
let js_func:
(~global: global_flag=?, ident, string, string, import_shape) =>
import_spec;
};
3 changes: 1 addition & 2 deletions compiler/src/middle_end/anftree.re
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,7 @@ type import_shape =
type import_desc =
| GrainValue(string, string)
| WasmFunction(string, string)
| WasmValue(string, string)
| JSFunction(string, string);
| WasmValue(string, string);

[@deriving sexp]
type import_spec = {
Expand Down
3 changes: 1 addition & 2 deletions compiler/src/middle_end/anftree.rei
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,7 @@ type import_shape =
type import_desc =
| GrainValue(string, string)
| WasmFunction(string, string)
| WasmValue(string, string)
| JSFunction(string, string);
| WasmValue(string, string);

[@deriving sexp]
type import_spec = {
Expand Down

0 comments on commit bf00ef1

Please sign in to comment.