Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwriting primitives in lambda #3107

Closed
Prev Previous commit
Next Next commit
Check that tmc with overwriting is correct
  • Loading branch information
anfelor committed Oct 2, 2024
commit bc3e8541b318ec31db1b7053387ee91c8db883be
2 changes: 0 additions & 2 deletions ocaml/lambda/tmc.ml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect some tests for the treatment here -- even if the tests just print the lambda code and then fall over. Or at least a loud comment somewhere reminding us to test this thoroughly before release. A mistake here could lead to miscompilation.

Original file line number Diff line number Diff line change
@@ -76,8 +76,6 @@ let assign_to_dst {var; offset; loc} lam =
[Lvar var; offset_code offset; lam], loc)

module Constr : sig
(* CR: check that the offset is computed correctly for resets
(which have an extra argument for the reused allocation and some omitted fields) *)
type is_reusing =
| New_alloc
| Reuse_alloc of { resets : reset_field list }