Skip to content

Allow extra entry points loads to be specified [TG-4620] #2829

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 2 commits into from
Aug 31, 2018

Conversation

thk123
Copy link
Contributor

@thk123 thk123 commented Aug 23, 2018

The extra entry points is to provide ways of extending the lazy methods entry points.

This also introduces an incidentally used can_cast_type for java_generic_typet

TG bump (using this): diffblue/test-gen#2197

@smowton
Copy link
Contributor

smowton commented Aug 24, 2018

@thk123
Copy link
Contributor Author

thk123 commented Aug 24, 2018

@smowton Gladly - the linked line is a list of functions to determine extra entry points. This list is currently (develop) exclusively populated by regexes generated from --lazy-method-extra-entry-points. Since this list is a private member of java_bytecode_languaget nothing else can add to this list.

This PR allows that same list to be additionally populated by classes implementing build_extra_entry_points. You can see this in action in diffblue/test-gen#2197. This allows extending the behaviour of extra entry points

Copy link
Contributor

@smowton smowton left a comment

Choose a reason for hiding this comment

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

Thanks-- please write a bit of that (when to use the command-line arg, when to override the hook) as docs for the hook method, then lgtm.

@thk123
Copy link
Contributor Author

thk123 commented Aug 28, 2018

@smowton docs updated - could you check they cover what you meant?

@thk123 thk123 force-pushed the allow-extra-entry-points branch 2 times, most recently from 4040cc0 to 26024f8 Compare August 29, 2018 11:01
@thk123 thk123 force-pushed the allow-extra-entry-points branch from 26024f8 to b47f63e Compare August 30, 2018 10:18
thk123 added 2 commits August 30, 2018 17:52
Lazy methods can be extened to load additional methods as entry points.
This allows this to be meaningfully used by subclasses of
java_bytecode_language
Note use is_reference since java_generic_typet inherits from
reference_typet so this stronger requirement more closely matches the
class hierarchy.
@thk123 thk123 force-pushed the allow-extra-entry-points branch from b47f63e to 232da1d Compare August 30, 2018 16:56
@thk123 thk123 merged commit c764708 into diffblue:develop Aug 31, 2018
@thk123 thk123 deleted the allow-extra-entry-points branch August 31, 2018 16:50
@smowton
Copy link
Contributor

smowton commented Sep 10, 2018

Belatedly confirmed this looks good!

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