Skip to content

Commit

Permalink
fixing #602
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Mar 19, 2012
1 parent 83e2543 commit 123165d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 0 additions & 13 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 123165d

Please sign in to comment.