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

chore: some gardening in the codebase #4393

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

chore: some gardening in the codebase #4393

wants to merge 13 commits into from

Conversation

ggreif
Copy link
Contributor

@ggreif ggreif commented Feb 12, 2024

These are some code cleanups broken out from #4371.

No functionality changes.

@@ -274,7 +274,6 @@ and objblock s ty dec_fields =
%type<Mo_def.Syntax.dec list> seplist(imp,semicolon) seplist(imp,SEMICOLON) seplist(dec,semicolon) seplist(dec,SEMICOLON)
%type<Mo_def.Syntax.exp list> seplist(exp_nonvar(ob),COMMA) seplist(exp(ob),COMMA)
%type<Mo_def.Syntax.exp_field list> seplist1(exp_field,semicolon) seplist(exp_field,semicolon)
%type<Mo_def.Syntax.exp list> separated_nonempty_list(AND, exp_post(ob))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks like inference gets this

Copy link

github-actions bot commented Feb 12, 2024

Comparing from cad2137 to 690a5e1:
The produced WebAssembly code seems to be completely unchanged.

@@ -983,18 +983,18 @@ let import_compiled_class (lib : S.comp_unit) wasm : import_declaration =
let import_prelude prelude : import_declaration =
decs prelude.it

let inject_decs extra_ds u =
let inject_decs extra_ds =
Copy link
Contributor

Choose a reason for hiding this comment

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

That's fine, but I actually prefer the explict match because then you see the arity of the function in the header.
I wonder if this actually produces more allocation, compiling to a proper curried function rather and a fast 2-argument Ocaml function (not that it matters here, but it could eslewhere).

Copy link
Contributor

@crusso crusso left a comment

Choose a reason for hiding this comment

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

LFTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants