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

[6.0] Serialize SFunc in TypeSerializer #1020

Merged
merged 1 commit into from
Sep 3, 2024
Merged

[6.0] Serialize SFunc in TypeSerializer #1020

merged 1 commit into from
Sep 3, 2024

Conversation

kushti
Copy link
Member

@kushti kushti commented Jul 16, 2024

This PR is adding higher-order lambdas support in serialization, thus making them useful.

Example:

{
   val c = Coll(Coll(1))
   def fn(xs: Coll[Int]) = {
     val inc = { (x: Int) => x + 1 }
     def apply(in: (Int => Int, Int)) = in._1(in._2)
     val ys = xs.map { (x: Int) => apply((inc, x)) }
     ys.size == xs.size && ys != xs
   }
   c.exists(fn)
 }

Close #847

@kushti kushti changed the base branch from develop to v6.0.0 July 16, 2024 19:14
@kushti kushti added the 6.0 label Sep 2, 2024
@kushti kushti added this to the 6.0.0 milestone Sep 2, 2024
@kushti kushti self-assigned this Sep 2, 2024
Copy link
Member

@aslesarenko aslesarenko left a comment

Choose a reason for hiding this comment

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

LGTM, but also see the comment

case _ =>
// todo: 6.0: replace 1008 check with identical but other opcode
Copy link
Member

Choose a reason for hiding this comment

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

please clarify "identical but other".

Copy link
Member Author

Choose a reason for hiding this comment

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

done, // todo: 6.0: replace 1008 check with identical behavior but other opcode, to activate
// ReplacedRule(1008 -> new opcode) during 6.0 activation

@kushti kushti merged commit 1990030 into v6.0.0 Sep 3, 2024
0 of 4 checks passed
@kushti kushti deleted the i847 branch September 3, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants