Add the push operation in code in compiler series

This commit is contained in:
2019-11-06 13:23:59 -08:00
parent 9ca1b177ef
commit f7b5bb48d1
14 changed files with 67 additions and 7 deletions

View File

@@ -104,7 +104,7 @@ void ast_binop::compile(const env_ptr& env, std::vector<instruction_ptr>& into)
right->compile(env, into);
left->compile(env_ptr(new env_offset(1, env)), into);
into.push_back(instruction_ptr(new instruction_pushglobal(op_name(op))));
into.push_back(instruction_ptr(new instruction_pushglobal(op_action(op))));
into.push_back(instruction_ptr(new instruction_mkapp()));
into.push_back(instruction_ptr(new instruction_mkapp()));
}