Skip to content

[rfc] new (better?) class & function filtering #698

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 1 commit into from
Aug 5, 2019

Conversation

jjergus
Copy link
Contributor

@jjergus jjergus commented Aug 3, 2019

This uses a list of classes/functions downloaded from php.net (see included script) to determine if a function/class is HH-specific.

This results in a bunch of function/classes being added. See https://gist.github.com/jjergus/638f90531974f3b205dd5d025f855ffb for the full lists before/after and diff between them.

Most of the additions seem correct but there are some that we probably want to exclude (__hhvm_intrinsics, ImageMagick stuff, any others?).

We still use the original heuristics (in addition to the new list) -- these functions/classes would have been excluded if we only used the PHP list, but are included thanks to the heuristics:

> ~~~ class.DOMNamedNodeMap
> ~~~ class.DOMNode
> ~~~ class.DOMNodeList
> ~~~ class.ReflectionClass
> ~~~ class.ReflectionFunction
> ~~~ class.ReflectionMethod
> ~~~ class.ReflectionParameter
> ~~~ class.WeakRef
> ~~~ function.xhprof_disable
> ~~~ function.xhprof_enable
> ~~~ function.xhprof_sample_disable
> ~~~ function.xhprof_sample_enable

@jjergus jjergus requested a review from fredemmott August 3, 2019 00:24
@jjergus jjergus mentioned this pull request Aug 3, 2019
@fredemmott
Copy link
Contributor

looks good; could you extend the tests to cover this?

@jjergus jjergus force-pushed the fix-filter branch 2 times, most recently from 3c95734 to cb10ee3 Compare August 5, 2019 17:56
@jjergus
Copy link
Contributor Author

jjergus commented Aug 5, 2019

Final list after adding PHP functions from older documentation and other sources + a few manual additions: https://gist.github.com/jjergus/77563dbd1a1786d4f09ad3c5c75420c1

@jjergus jjergus merged commit 2116ae0 into hhvm:master Aug 5, 2019
@jjergus jjergus deleted the fix-filter branch August 5, 2019 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants