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
Remove dumb CodeBlock duplication in the emitters. #253
Conversation
|
lgtm |
| void ClearCodeSpace() | ||
| { | ||
| // x86/64: 0xCC = breakpoint | ||
| memset(region, 0xCC, region_size); |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
All comments addressed, when changing the CodeBlock class to NonCopyable, I had to drop it from the VertexLoader and DSPEmitter since they inherit from the CodeBlock class. |
| // You get memory management for free, plus, you can use all emitter functions without | ||
| // having to prefix them with gen-> or something similar. | ||
| // Example implementation: | ||
| // class JIT : public CodeBlock<ARMXEmitter> {} |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Comments have been addressed |
| template<class T> class CodeBlock : public T, NonCopyable | ||
| { | ||
| private: | ||
| // A privately use function to set the executable RAM space to something invalid. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Fixes issue 6990. This uses a bit of templating to remove the duplicate code that is the CodeBlocks in each emitter headers. No actual functionality change in this.
|
LGTM, I'll wait a bit for Buildbot to complete and will merge unless someone has an objection in the next 5min. |
Remove dumb CodeBlock duplication in the emitters.
Fixes issue 6990.
This uses a bit of templating to remove the duplicate code that is the CodeBlocks in each emitter headers.
No actual functionality change in this.