Skip to content
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

Port most extensions to use the new set of constant registering defines #6365

Closed
wants to merge 5 commits into from

Conversation

Orvid
Copy link
Contributor

@Orvid Orvid commented Oct 14, 2015

This ports most extensions, specifically the ones that I build under MSVC and can actually test, to use the new set of macros for registering constants. This is a significant refactor, and, as part of the refactor eliminates a large number of global constants that simply weren't needed (they were the exact same, and the same name as a macro already provided, with the difference that the constant was prefixed with k_), I'd be amazed if this didn't break at least some of FB's internal code.

An example PR of the changes they would allow was requested, so here is the PR, that can be merged after the main one is.

I originally thought about adding a pair of HHVM_RC_SAME_PREF_* macros to replace the MW_CONST macro used by ext_imagick, but decided it's not likely to be a common pattern, so I chose not to add them.

Depends upon #6343 (D48255) - Already merged

@facebook-github-bot
Copy link
Contributor

This pull request has been imported into Phabricator, and discussion and review of the diff will take place at https://reviews.facebook.net/D48705

…ing defines

An example PR of the changes they would allow was requested, so here is the PR, that can be merged after the main one is.

Depends upon facebook#6343 (D48255)
This refactors every extension that I currently build under MSVC to use the new HHVM_RC* macros to register constants. This also removes any global constants that are the same as a define that's already provided, and also removes a few global constants that are never referenced from the C++ side, and registers the constant to a literal value instead.
@Orvid Orvid force-pushed the const-register-macros-changes branch from eecb3ec to 83dab04 Compare October 22, 2015 01:29
@Orvid Orvid changed the title Port ext_imagick and ext_libxml to use a new set of constant registering defines Port most extensions to use the new set of constant registering defines Oct 22, 2015
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
…acros

This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
…acros

This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.

This is one of the largest changesets out of it, simply because ICU has so many constants.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
…cros

This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
…cros

This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
…acros

This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
…acros

This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
This was split out of facebook#6365 (D48705) to make reviewing easier.
Orvid added a commit to Orvid/hhvm that referenced this pull request Oct 31, 2015
…cros

This was split out of facebook#6365 (D48705) to make reviewing easier.
hhvm-bot pushed a commit that referenced this pull request Nov 4, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6462

Reviewed By: JoelMarcey

Differential Revision: D2605993

Pulled By: sgolemon

fb-gh-sync-id: db9656104ad5e64c4361a1720aad965b88f720c3
hhvm-bot pushed a commit that referenced this pull request Nov 4, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6464

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2605998

Pulled By: sgolemon

fb-gh-sync-id: c27351c6732902021f86b2d83060be75650ecf0b
hhvm-bot pushed a commit that referenced this pull request Nov 4, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6465

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606001

Pulled By: sgolemon

fb-gh-sync-id: f6e090046efc6e6882d0d724f61a00ff8e11972f
hhvm-bot pushed a commit that referenced this pull request Nov 4, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6466

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606003

Pulled By: sgolemon

fb-gh-sync-id: 1871eba5af5d30b4af4d5c32a6fa6b10b4bf0aaf
hhvm-bot pushed a commit that referenced this pull request Nov 4, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.

It's worth noting that `k_DISALLOWED` is both not used anywhere, and also not registered as a constant.
Closes #6468

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606019

Pulled By: sgolemon

fb-gh-sync-id: 005195cbaa1274a20aadb3d14556cae1af298fba
hhvm-bot pushed a commit that referenced this pull request Nov 4, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6479

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606934

Pulled By: sgolemon

fb-gh-sync-id: bd693072f518f7ed3cf87cc7ad4e1ed6fc00dbb0
hhvm-bot pushed a commit that referenced this pull request Nov 4, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6478

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606931

Pulled By: sgolemon

fb-gh-sync-id: f07165d1cb1bf2944abf7fcc77b820ca1b060c62
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6480

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606942

Pulled By: sgolemon

fb-gh-sync-id: 677222300f742015db7057cbfe0ad6a581636372
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6474

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606904

Pulled By: sgolemon

fb-gh-sync-id: f18c8c7090dab2eddd29ae19b3e92c857ac56967
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6471

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606037

Pulled By: sgolemon

fb-gh-sync-id: fa7bf12324a7c01956524c4c50c5cabb77ce6d39
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6475

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606909

Pulled By: sgolemon

fb-gh-sync-id: 141484dc37e696fec1e5382d5f10194e98a98ae1
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6470

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606036

Pulled By: sgolemon

fb-gh-sync-id: 10d28e84fdd432f9cdff6cc47e5be55c99cc2011
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6472

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606893

Pulled By: sgolemon

fb-gh-sync-id: 486065469b4f17676806005edf45468dfb8fa294
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6482

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606965

Pulled By: sgolemon

fb-gh-sync-id: cab2d3da342b393e7f652c132315decb7583961d
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6483

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606969

Pulled By: sgolemon

fb-gh-sync-id: 62243f71404c59e08c2560a168ace3148c851e45
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6484

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606973

Pulled By: sgolemon

fb-gh-sync-id: 7241add788467697cdd0138a7c4dec5cedd6edff
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6486

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606986

Pulled By: sgolemon

fb-gh-sync-id: 7045b3d72dd9413ddb41b83dff341dc1c0cf4fa8
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6485

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606980

Pulled By: sgolemon

fb-gh-sync-id: 90d29e71317e3fa30eba9dfe04a533967ea8ddd9
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6473

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606898

Pulled By: sgolemon

fb-gh-sync-id: 044cdf8e5fe14c5c565c441e9e6ba8fd48d7bba7
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6481

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606955

Pulled By: sgolemon

fb-gh-sync-id: 7f4a0238be57fca8a3fa63321dac55eda6df4134
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6487

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606992

Pulled By: sgolemon

fb-gh-sync-id: 0b1687056a5e8a8d07588fba8318362806ffa18b
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6489

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2607003

Pulled By: sgolemon

fb-gh-sync-id: 3c15ee77459910b40ac810317af3af4dbc3226f1
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6490

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2607007

Pulled By: sgolemon

fb-gh-sync-id: 07daea77fbfa4fc00738b1ff048d02aaee17a85f
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6492

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2607019

Pulled By: sgolemon

fb-gh-sync-id: e371b4c23cd8ac3da8acb9fe7255fb9a349d20fd
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6491

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2607015

Pulled By: sgolemon

fb-gh-sync-id: 5fd64b8bc4cc0e3aec5baf7b5b4ed0cea8ae71d6
hhvm-bot pushed a commit that referenced this pull request Nov 5, 2015
Summary: This was split out of #6365 (D48705) to make reviewing easier.
Closes #6476

Reviewed By: sgolemon, JoelMarcey

Differential Revision: D2606913

Pulled By: sgolemon

fb-gh-sync-id: 7c67bdb98b6ad28aca8955bb656d2fdc416aa2bf
sgolemon pushed a commit that referenced this pull request Nov 5, 2015
This was split out of #6365 (D48705) to make reviewing easier.
Closes #6488

Reviewed By: sgolemon, joelm
hhvm-bot pushed a commit that referenced this pull request Jan 15, 2016
Summary:
This was split out of #6365 (D48705) to make reviewing easier.
Closes #6477

Reviewed By: paulbiss

Differential Revision: D2637295

fb-gh-sync-id: 95be9d4f08a4b342e1f57d2a507a31bd52503d2c
Orvid added a commit to Orvid/hhvm that referenced this pull request Jan 25, 2016
This was split out of facebook#6365 (D48705) to make reviewing easier.

It is worth pointing out that I also moved `k_INF` and `k_NAN` from `ext_std_misc` to `ext_std_math`, which is where I believe it should be, and where it also means we have a macro for registering doubles.
The move of those constants has the potential to be a breaking change for some of FB's internal code. I fixed what I found in what I can build under MSVC, but there might be other places as well.
hhvm-bot pushed a commit that referenced this pull request Jul 12, 2016
Summary: This was split out of #6365 (D48705) to make reviewing easier.

Reviewed By: paulbiss

Differential Revision: D2870023

Pulled By: Orvid

fbshipit-source-id: 861cf7c7d326ea104096b7711749cf5e76311f12
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.

None yet

2 participants