Commit Graph

3 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
6db94bb980 Switch InstrBuilder to the one-shot builder pattern.
All the InstrBuilder methods now consume the builder, and the non-leaf
methods return the dfg mutable reference they were holding.

This makes it possible to construct instruction builders that are only
safe to use once because they are doing more advanced value rewriting.
2016-10-19 19:33:48 -07:00
Jakob Stoklund Olesen
58168bcd07 Generate an InstBuilder trait.
All of the instruction format an opcode methods are emitted as an
InstBuilder trait instead of adding them to the Bulder struct directly.
The methods only make use of the InstBuilderBase methods to create new
instructions.

This makes it possible to reuse the InstBuilder trait for different ways
of inserting instructions.
2016-10-19 18:21:17 -07:00
Jakob Stoklund Olesen
e7f30a40b4 Move the 'meta' dir to 'lib/cretonne/meta'.
The 'lib/cretonne' directory will be the new root of a stand-alone
cretonne crate containg both Python and Rust sources.

This is in preparation for publishing crates on crates.io.
2016-10-17 14:19:23 -07:00