Skip to content

Add support for generating method entries from stubs #5363

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

Closed
wants to merge 1 commit into from

Conversation

kocsismate
Copy link
Member

Not yet finished. Hopefully the @mapping PHPDoc makes sense.

@nikic
Copy link
Member

nikic commented Apr 9, 2020

Shouldn't @mapping just reuse @alias?

@kocsismate
Copy link
Member Author

kocsismate commented Apr 9, 2020

So you mean that FuncInfo::alias should store the value coming from either @mapping or @alias?

My problem is that mappings and aliases won't be mapped to the same ZEND_RAW_FENTRY, since the class name is also stored for aliases (zim_##classname##_##alias), while not for mappings (zif_##func_nam). As far as I see, the only solution in this case would be to generate ZEND_RAW_FENTRYs - which is a no-go I think. But maybe do you know something else? Or did I misunderstand you?

@nikic
Copy link
Member

nikic commented Apr 9, 2020

@kocsismate What I mean is that (assuming we're on a method) @alias Foo::bar would end up being an MALIAS and @alias bar would end up being a MAPPING.

@kocsismate
Copy link
Member Author

@nikic I see! I like this idea! I'll continue the PR later :)

@kocsismate kocsismate force-pushed the method-entry-from-stub branch from a831698 to 43ebbcb Compare April 10, 2020 12:42
@kocsismate kocsismate force-pushed the method-entry-from-stub branch from 43ebbcb to 7484ef0 Compare April 10, 2020 14:07
@kocsismate kocsismate changed the title [WIP] Generate method entries from stubs Generate method entries from stubs Apr 10, 2020
@kocsismate kocsismate force-pushed the method-entry-from-stub branch 3 times, most recently from eaf656d to cb1d589 Compare April 10, 2020 14:22
@kocsismate kocsismate changed the title Generate method entries from stubs Add support for generating method entries from stubs Apr 10, 2020
@kocsismate kocsismate force-pushed the method-entry-from-stub branch from cb1d589 to fa50349 Compare April 10, 2020 20:47
@kocsismate
Copy link
Member Author

Hopefully, my latest commit addresses all the comments. :)

@php-pulls php-pulls closed this in 1d05771 Apr 11, 2020
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