inline and expand conditionals whenever possible

This commit is contained in:
Mark Thom
2018-01-23 21:01:53 -07:00
parent 677beedec3
commit 41dc8e8d6a
12 changed files with 250 additions and 166 deletions

View File

@@ -28,12 +28,6 @@ macro_rules! deallocate {
)
}
macro_rules! compare_number {
($cmp: expr, $terms: expr) => (
QueryTerm::Inlined(InlinedQueryTerm::CompareNumber($cmp, $terms))
)
}
macro_rules! compare_number_instr {
($cmp: expr, $at_1: expr, $at_2: expr) => (
Line::BuiltIn(BuiltInInstruction::CompareNumber($cmp, $at_1, $at_2))
@@ -222,9 +216,9 @@ macro_rules! install_new_block {
)
}
macro_rules! goto {
macro_rules! goto_execute {
($line:expr, $arity:expr) => (
Line::Control(ControlInstruction::Goto($line, $arity))
Line::Control(ControlInstruction::GotoExecute($line, $arity))
)
}
@@ -465,3 +459,9 @@ macro_rules! cmp_eq {
CompareNumberQT::Equal
)
}
macro_rules! jmp_call {
($arity:expr, $offset:expr) => (
Line::Control(ControlInstruction::JmpByCall($arity, $offset))
)
}