From 18a9fa735503e96d69efd968c542e490abe69be0 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 12 May 2018 10:27:55 +0100 Subject: Improve minimal dependency system --- src/ir.cpp | 71 +++++++++++++++++++++++++++++--------------------------------- 1 file changed, 33 insertions(+), 38 deletions(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 9ed06a617..18e7eed6a 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -3149,39 +3149,39 @@ irValue *ir_emit_conv(irProcedure *proc, irValue *value, Type *t) { gbAllocator a = proc->module->allocator; i64 sz = type_size_of(src); i64 dz = type_size_of(dst); - if (sz == 2) { - switch (dz) { - case 2: return value; - case 4: { - auto args = array_make(proc->module->allocator, 1); - args[0] = value; - return ir_emit_global_call(proc, "__gnu_h2f_ieee", args); - break; - } - case 8: { - auto args = array_make(proc->module->allocator, 1); - args[0] = value; - return ir_emit_global_call(proc, "__f16_to_f64", args); - break; - } - } - } else if (dz == 2) { - switch (sz) { - case 2: return value; - case 4: { - auto args = array_make(proc->module->allocator, 1); - args[0] = value; - return ir_emit_global_call(proc, "__gnu_f2h_ieee", args); - break; - } - case 8: { - auto args = array_make(proc->module->allocator, 1); - args[0] = value; - return ir_emit_global_call(proc, "__truncdfhf2", args); - break; - } - } - } + // if (sz == 2) { + // switch (dz) { + // case 2: return value; + // case 4: { + // auto args = array_make(proc->module->allocator, 1); + // args[0] = value; + // return ir_emit_global_call(proc, "__gnu_h2f_ieee", args); + // break; + // } + // case 8: { + // auto args = array_make(proc->module->allocator, 1); + // args[0] = value; + // return ir_emit_global_call(proc, "__f16_to_f64", args); + // break; + // } + // } + // } else if (dz == 2) { + // switch (sz) { + // case 2: return value; + // case 4: { + // auto args = array_make(proc->module->allocator, 1); + // args[0] = value; + // return ir_emit_global_call(proc, "__gnu_f2h_ieee", args); + // break; + // } + // case 8: { + // auto args = array_make(proc->module->allocator, 1); + // args[0] = value; + // return ir_emit_global_call(proc, "__truncdfhf2", args); + // break; + // } + // } + // } irConvKind kind = irConv_fptrunc; if (dz >= sz) { @@ -5113,11 +5113,6 @@ irValue *ir_build_expr_internal(irProcedure *proc, AstNode *expr) { id = cast(BuiltinProcId)e->Builtin.id; } else { id = BuiltinProc_DIRECTIVE; - if (ce->proc->kind == AstNode_Implicit) { - ast_node(i, Implicit, ce->proc); - GB_ASSERT(i->kind == Token_type_info_of); - id = BuiltinProc_type_info_of; - } } return ir_build_builtin_proc(proc, expr, tv, id); } -- cgit v1.2.3