Revision: 3172 http://trac.macosforge.org/projects/ruby/changeset/3172 Author: emoy@apple.com Date: 2009-12-24 15:18:43 -0800 (Thu, 24 Dec 2009) Log Message: ----------- Branch ticket159: fix compiler warning and minor clean up Modified Paths: -------------- MacRuby/branches/ticket159/compiler.cpp Modified: MacRuby/branches/ticket159/compiler.cpp =================================================================== --- MacRuby/branches/ticket159/compiler.cpp 2009-12-24 04:39:30 UTC (rev 3171) +++ MacRuby/branches/ticket159/compiler.cpp 2009-12-24 23:18:43 UTC (rev 3172) @@ -2470,13 +2470,6 @@ } } - if (newFloatFunc == NULL) { - // VALUE rb_float_new_retained(double) - newFloatFunc = cast<Function> - (module->getOrInsertFunction("rb_float_new_retained", - RubyObjTy, DoubleTy, NULL)); - } - rb_vm_immediate_val_t leftImm, rightImm; const bool leftIsImmediateConst = unbox_immediate_val(leftRVal, &leftImm); @@ -2586,8 +2579,8 @@ BranchInst::Create(not_redefined_bb, dispatch_bb, isOpRedefined, bb); - BasicBlock *div_by_zero_bb; - BasicBlock *optimize_fixnum_cont_bb; + BasicBlock *div_by_zero_bb = NULL; + BasicBlock *optimize_fixnum_cont_bb = NULL; BasicBlock *optimize_fixnum_ret_bb; /* * In the case of integer division, we need to test for the @@ -2763,6 +2756,13 @@ if (!result_is_predicate) { // Box the float. + if (newFloatFunc == NULL) { + // VALUE rb_float_new_retained(double) + newFloatFunc = cast<Function> + (module->getOrInsertFunction("rb_float_new_retained", + RubyObjTy, DoubleTy, + NULL)); + } std::vector<Value *> params; params.push_back(flp_op_res); flp_op_res = CallInst::Create(newFloatFunc, params.begin(),
participants (1)
-
source_changes@macosforge.org