-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Store default values of parameters of internal functions in arginfo #5353
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
Conversation
2fbc742
to
809daa8
Compare
Appveyor failures are related. |
} zend_internal_arg_info; | ||
|
||
/* arg_info for user functions */ | ||
typedef struct _zend_arg_info { | ||
zend_string *name; | ||
zend_type type; | ||
zend_string *default_value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe void *_unused;
for now.
d5f0eaa
to
18cfbfe
Compare
This reverts commit 18cfbfe.
This avoids the dependency on language scanner headers. The function is exactly the same as the one used by ext/ast, so this functionality is also more broadly useful.
4616b58
to
1cdbe90
Compare
As a followup, we might want to a) use We will also start working on eliminating On my build, the fast-path now handle everything apart from 234 default values, most of them are constant fetches. We could add fast-path handling for constants as well, though it would be a tad more involved. |
@nikic Thank you very much for all the help! 🎉I'll I fully agree with the first point! Actually, I've wanted to ask you if it's something that's ok to change. Additionally, I thought about lowercasing Regarding |
I would not change
Yeah, I think that removal of @cmb69 It looks like there are segfaults on one of the Windows builders, but I don't really have a clue what could be the cause. Could you please take a look? |
I cannot reproduce the failing test locally. I'll try to figure out what's wrong via AppVeyor, what might take quite a while. |
Looks like this is a ZTS specific issue, reproducing on Linux under valgrind:
FC(imports) is uninitialized. |
Oh, indeed. Is that var ever explicitly initialized? |
AppVeyor is green now. |
@nikic Should I squash your commits or can they go as is? |
@kocsismate Please squash them together (probably into your first commit?) |
Yes. :) (something like cmb69@99fc913 may be fine as well; AppVeyor CI is still running) PS: nope, apparently insufficient |
@nikic OK, there will be only one commit then with you and me as authors. |
@nikic I've just noticed that somehow I didn't commit the |
Patch contributed by Sjon Hortensius. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@350519 c90b9560-bf6c-de11-be94-00142212c4b1
This PR is the same as #4832, just with a cut scope so that it only deals with internal functions.
I made the split because the original one has some complications (storing default parameter values of userland functions) which might be beyond my skills to solve, but this part seems to be useful on its own. Later on, we could try to make the other parts work, but until then, I wouldn't have to keep the whole PR rebased.