From 123165d154efc743eb259e4081eef99ec455b1e7 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Sun, 18 Mar 2012 22:00:42 -0400 Subject: [PATCH] fixing #602 --- src/ast.c | 4 ++-- src/cgutils.cpp | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/ast.c b/src/ast.c index 0f2587c8dcbb2..5ad6155d2e010 100644 --- a/src/ast.c +++ b/src/ast.c @@ -435,8 +435,8 @@ void jl_load_file_string(const char *text) jl_value_t *jl_expand(jl_value_t *expr) { int np = jl_gc_n_preserved_values(); - value_t e = fl_applyn(1, symbol_value(symbol("jl-expand-to-thunk")), - julia_to_scm(expr)); + value_t arg = julia_to_scm(expr); + value_t e = fl_applyn(1, symbol_value(symbol("jl-expand-to-thunk")), arg); jl_value_t *result; if (e == FL_T || e == FL_F || e == FL_EOF) { result = NULL; diff --git a/src/cgutils.cpp b/src/cgutils.cpp index a93409829e5e9..0c12ef2ba4c86 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -366,19 +366,6 @@ static jl_value_t *julia_type_of(Value *v) return jl_typeid_to_type(id); } -// see if a julia type maps directly to an llvm type -static bool is_julia_type_representable(jl_value_t *jt) -{ - return - (jt == (jl_value_t*)jl_bool_type || jt == (jl_value_t*)jl_int8_type || - jt == (jl_value_t*)jl_int16_type || jt == (jl_value_t*)jl_int32_type || - jt == (jl_value_t*)jl_int64_type || - jt == (jl_value_t*)jl_float32_type || - jt == (jl_value_t*)jl_float64_type || - (jl_is_cpointer_type(jt) && - is_julia_type_representable(jl_tparam0(jt)))); -} - static Value *NoOpCast(Value *v) { v = CastInst::Create(Instruction::BitCast, v, v->getType());