Skip to content

Split the ast from the parser, remove compiler dep on parser#2320

Merged
youknowone merged 3 commits into
masterfrom
coolreader18/split-ast-parser
Nov 8, 2020
Merged

Split the ast from the parser, remove compiler dep on parser#2320
youknowone merged 3 commits into
masterfrom
coolreader18/split-ast-parser

Conversation

@coolreader18
Copy link
Copy Markdown
Member

@coolreader18 coolreader18 commented Nov 2, 2020

This should improve build times, since now the compiler and the parser can build in parallel, and I think it also just separates concerns a bit more -- the core compiler just needs an AST to be able to do its job, and it's up to the user to provide that. I was thinking of making another crate that would essentially just be vm::compile, but I wasn't sure what to call it or if would even be necessary, since I'm not sure how many uses there would be for an external crate to use the compiler. Although, I gave pyckitup the ability to compile rustpython bytecode, so maybe it would be worth looking into to have that be another crate.

@coolreader18 coolreader18 force-pushed the coolreader18/split-ast-parser branch 2 times, most recently from 3b7c20c to 57f60cb Compare November 3, 2020 04:04
@coolreader18
Copy link
Copy Markdown
Member Author

Maybe something like compiler/porcelain? With the original compiler crate being renamed to rustpython-compiler-core, and the porcelain directory having a crate rustpython-compiler that has the wrapper stuff that's inside of vm/src/compile.rs

@coolreader18 coolreader18 force-pushed the coolreader18/split-ast-parser branch from a562695 to 70907ba Compare November 7, 2020 21:43
@youknowone youknowone merged commit f390f61 into master Nov 8, 2020
@youknowone youknowone deleted the coolreader18/split-ast-parser branch November 8, 2020 11:49
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