Skip to content

Remove unused non-bs code #6942

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

Merged

Conversation

DZakh
Copy link
Member

@DZakh DZakh commented Aug 7, 2024

No description provided.

@@ -3072,15 +3002,7 @@ let for_let loc param pat body =
(* fast path, and keep track of simple bindings to unboxable numbers *)
Llet(Strict, Pgenval, id, param, body)
| _ ->
(* Turn off such optimization to reduce diff in the beginning - FIXME*)
Copy link
Member Author

Choose a reason for hiding this comment

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

An interesting optimisation, which might be worth resurrecting in the future
image

Comment on lines 2312 to 2316
let tag = Ident.create "tag" in
let tests =
List.fold_right
(fun (path, act) rem ->
let ext = transl_extension_path ex_pat.pat_env path in
Lifthenelse(Lprim(extension_slot_eq , [Lvar tag; ext], loc),
act, rem))
nonconsts
default
in
Llet(Alias, Pgenval,tag, arg, tests)
List.fold_right
(fun (path, act) rem ->
let ext = transl_extension_path ex_pat.pat_env path in
Lifthenelse(Lprim(extension_slot_eq , [arg; ext], loc),
act, rem))
nonconsts
default
Copy link
Member Author

Choose a reason for hiding this comment

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

@cristianoc this code is commited by mistake from my investigation on how the try/catch compilation works.

I couldn't figure where the tag Llet is used, so I removed it. Could you correct me If I'm wrong.

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

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

Would you undo changes not related to the flag and put them in a separate PR?

@DZakh
Copy link
Member Author

DZakh commented Aug 8, 2024

@cristianoc Done

@cristianoc cristianoc merged commit 8a28daf into rescript-lang:master Aug 8, 2024
12 of 13 checks passed
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.

2 participants