[compiler] print a backtrace as part of di (#658)

* print a backtrace as part of di

* missing include
This commit is contained in:
water111
2021-06-30 22:13:15 -04:00
committed by GitHub
parent c6ec7578e6
commit fe5635227a
8 changed files with 277 additions and 91 deletions
+2
View File
@@ -63,6 +63,7 @@ void CodeGenerator::do_function(FunctionEnv* env, int f_idx) {
*/
void CodeGenerator::do_goal_function(FunctionEnv* env, int f_idx) {
bool use_new_xmms = true;
auto* debug = &m_debug_info->function_by_name(env->name());
auto f_rec = m_gen.get_existing_function_record(f_idx);
// todo, extra alignment settings
@@ -154,6 +155,7 @@ void CodeGenerator::do_goal_function(FunctionEnv* env, int f_idx) {
InstructionInfo::Kind::PROLOGUE);
}
}
debug->stack_usage = stack_offset;
// emit each IR into x86 instructions.
for (int ir_idx = 0; ir_idx < int(env->code().size()); ir_idx++) {