From bf00ef14c7ef47f9d69a3133f5098bcc09618041 Mon Sep 17 00:00:00 2001 From: Spotandjake Date: Fri, 29 Dec 2023 20:56:02 -0500 Subject: [PATCH] chore(compiler): Remove unused `JSFunction` and `js_func` --- compiler/src/codegen/transl_anf.re | 1 - compiler/src/middle_end/analyze_inline_wasm.re | 3 +-- compiler/src/middle_end/analyze_manual_memory_management.re | 3 +-- compiler/src/middle_end/anf_helper.re | 2 -- compiler/src/middle_end/anf_helper.rei | 3 --- compiler/src/middle_end/anftree.re | 3 +-- compiler/src/middle_end/anftree.rei | 3 +-- 7 files changed, 4 insertions(+), 14 deletions(-) diff --git a/compiler/src/codegen/transl_anf.re b/compiler/src/codegen/transl_anf.re index e9e023733f..c11356c85f 100644 --- a/compiler/src/codegen/transl_anf.re +++ b/compiler/src/codegen/transl_anf.re @@ -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") }; }; diff --git a/compiler/src/middle_end/analyze_inline_wasm.re b/compiler/src/middle_end/analyze_inline_wasm.re index 4c70af94be..d6008f19f4 100644 --- a/compiler/src/middle_end/analyze_inline_wasm.re +++ b/compiler/src/middle_end/analyze_inline_wasm.re @@ -67,8 +67,7 @@ let analyze = ({imports, body, analyses}) => { }; | GrainValue(_) | WasmFunction(_) - | WasmValue(_) - | JSFunction(_) => () + | WasmValue(_) => () }; }; List.iter(process_import, imports.specs); diff --git a/compiler/src/middle_end/analyze_manual_memory_management.re b/compiler/src/middle_end/analyze_manual_memory_management.re index 176caac98b..8d7de63a8d 100644 --- a/compiler/src/middle_end/analyze_manual_memory_management.re +++ b/compiler/src/middle_end/analyze_manual_memory_management.re @@ -24,8 +24,7 @@ let analyze = ({imports, body, analyses}) => { set_manual_call(imp_use_id); | GrainValue(_) | WasmFunction(_) - | WasmValue(_) - | JSFunction(_) => () + | WasmValue(_) => () }; }; let root_gc_disabled = diff --git a/compiler/src/middle_end/anf_helper.re b/compiler/src/middle_end/anf_helper.re index b0ac79ba72..07915e29d9 100644 --- a/compiler/src/middle_end/anf_helper.re +++ b/compiler/src/middle_end/anf_helper.re @@ -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); }; diff --git a/compiler/src/middle_end/anf_helper.rei b/compiler/src/middle_end/anf_helper.rei index 30e5bfff4d..6287bd7be5 100644 --- a/compiler/src/middle_end/anf_helper.rei +++ b/compiler/src/middle_end/anf_helper.rei @@ -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; }; diff --git a/compiler/src/middle_end/anftree.re b/compiler/src/middle_end/anftree.re index 3134363366..4a03ce2124 100644 --- a/compiler/src/middle_end/anftree.re +++ b/compiler/src/middle_end/anftree.re @@ -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 = { diff --git a/compiler/src/middle_end/anftree.rei b/compiler/src/middle_end/anftree.rei index 007bf2baee..02044ef413 100644 --- a/compiler/src/middle_end/anftree.rei +++ b/compiler/src/middle_end/anftree.rei @@ -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 = {