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

Tsee/xs code split #20

Merged
merged 5 commits into from
Jan 12, 2017
Merged

Tsee/xs code split #20

merged 5 commits into from
Jan 12, 2017

Conversation

tsee
Copy link
Contributor

@tsee tsee commented Jan 11, 2017

This implements a start of what I'm musing about in #19

In a nutshell, this moves the custom OP logic to its own source file as well as the executable memory bit.

I think the "extract C code" / parsing logic can/should go into its own thing but I ran out of time and IIRC it's not a clean parser/lexer in the sense that there's actions taken/code being generated on the basis of the parse already there. That makes a bit murky to extract. Anyway - code style preferences I suppose.

Adds src/ subdir to include and c_source properties during build.
Missing: The logic that actually creates the custom OP instances.
This slightly refactors it so that the TCC and keyword-type related
logic isn't in it. For now, this seems the cleanest in intent. If a lot
of additional logic was added (eg. OPs owning miscellaneous data that
would have to be cleaned up at global destruction time), that should be
revisited to move that logic into the new source file as well.
@run4flat
Copy link
Owner

I think this is a great idea. I'll be tied up for the next couple of days so I may not get to merging this for a little bit. Feel free to continue, or not, as I'll contribute to this as soon as I have some time (maybe this weekend, certainly some time next week).

@run4flat
Copy link
Owner

Something I've always struggled with: do the compiled object files get linked to all compiled xs files? In other words, will this functionality get baked into PerlAPI's shared library? As far as I can tell, this is what Module::Build does by default.

@run4flat run4flat merged commit 840ae20 into run4flat:master Jan 12, 2017
@tsee tsee deleted the tsee/xs_code_split branch January 12, 2017 13:04
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