Skip to content

Dynamic invoke for string concatenation #386 #1185

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
merged 4 commits into from
Oct 27, 2022

Conversation

sergeypospelov
Copy link
Member

@sergeypospelov sergeypospelov commented Oct 19, 2022

Description

  • Investigated the way of implementing dynamicInvoke bytecode instruction in a common case. In a few words, we need to symbolically analyze bootstrap methods, which is incredibly hard in known cases, since it operates with combinators and includes many native calls.
  • Implemented a special case of dynamicInvokejava.lang.invoke.StringConcatFactory methods.
  • Added new tests covering the string concatenation mechanism in Java 11.
  • Added a -Xcontext-receivers option to the Kotlin compiler args, which turns on context receivers: https://github.com/Kotlin/KEEP/blob/master/proposals/context-receivers.md
  • Refactored: modifier utils for ClassIds, ExecutableIds and FieldIds

Relates to #386

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Automated Testing

New tests: org.utbot.examples.strings.StringConcatTest

Checklist:

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • The change contains enough commentaries, particularly in hard-to-understand areas
  • No new warnings
  • New tests have been added
  • All tests pass locally with my changes

@sergeypospelov sergeypospelov changed the title Dynamic invoke for string concatenation Dynamic invoke for string concatenation #386 Oct 19, 2022
@sergeypospelov sergeypospelov force-pushed the sergey/strings_concat branch 3 times, most recently from 61366e7 to 63b1e0d Compare October 26, 2022 07:16
Copy link
Member

@Damtev Damtev left a comment

Choose a reason for hiding this comment

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

Code generation changes look good to me

@sergeypospelov sergeypospelov merged commit 50dc51b into main Oct 27, 2022
@sergeypospelov sergeypospelov deleted the sergey/strings_concat branch October 27, 2022 06:11
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.

3 participants