Module Flambda2_to_jsir.To_jsir_static_const
val block_like :
env:To_jsir_env.t ->
res:To_jsir_result.t ->
Flambda2_identifiers.Symbol.t ->
Flambda2_terms.Static_const.t ->
To_jsir_env.t * To_jsir_result.tBind a fresh variable to the result of Static_const.t, and map the symbol to this new variable in the environment, for "block-like" constants (i.e. not Set_of_closures).
See Static_const.match_against_bound_static_pattern
val prepare_code :
env:To_jsir_env.t ->
res:To_jsir_result.t ->
code_id:Flambda2_identifiers.Code_id.t ->
Flambda2_terms.Flambda.function_params_and_body Flambda2_terms.Code0.t ->
To_jsir_env.t * To_jsir_result.tPrepare a static block of code to be translated: create a new block and parameter variables and add them to the environment, and also add any value or function slots that are used into the environment.
val code :
env:To_jsir_env.t ->
res:To_jsir_result.t ->
translate_body:
(env:To_jsir_env.t ->
res:To_jsir_result.t ->
Flambda2_terms.Flambda.expr ->
To_jsir_env.t * To_jsir_result.t) ->
code_id:Flambda2_identifiers.Code_id.t ->
Flambda2_terms.Flambda.function_params_and_body Flambda2_terms.Code0.t ->
To_jsir_env.t * To_jsir_result.tTranslate a static block of code.