[macruby-changes] [2456] MacRuby/branches/llvm26/compiler.cpp

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 2 01:53:55 PDT 2009


Revision: 2456
          http://trac.macosforge.org/projects/ruby/changeset/2456
Author:   lsansonetti at apple.com
Date:     2009-09-02 01:53:50 -0700 (Wed, 02 Sep 2009)
Log Message:
-----------
fixed compilation of boolean test

Modified Paths:
--------------
    MacRuby/branches/llvm26/compiler.cpp

Modified: MacRuby/branches/llvm26/compiler.cpp
===================================================================
--- MacRuby/branches/llvm26/compiler.cpp	2009-09-02 08:41:17 UTC (rev 2455)
+++ MacRuby/branches/llvm26/compiler.cpp	2009-09-02 08:53:50 UTC (rev 2456)
@@ -269,7 +269,9 @@
     bb = nextTestBB;
 }
 
-void RoxorCompiler::compile_boolean_test(Value *condVal, BasicBlock *ifTrueBB, BasicBlock *ifFalseBB)
+void
+RoxorCompiler::compile_boolean_test(Value *condVal, BasicBlock *ifTrueBB,
+	BasicBlock *ifFalseBB)
 {
     Function *f = bb->getParent();
     BasicBlock *notFalseBB = BasicBlock::Create(context, "not_false", f);
@@ -277,7 +279,8 @@
     Value *notFalseCond = new ICmpInst(*bb, ICmpInst::ICMP_NE, condVal,
 	    falseVal);
     BranchInst::Create(notFalseBB, ifFalseBB, notFalseCond, bb);
-    Value *notNilCond = new ICmpInst(*bb, ICmpInst::ICMP_NE, condVal, nilVal);
+    Value *notNilCond = new ICmpInst(*notFalseBB, ICmpInst::ICMP_NE, condVal,
+	    nilVal);
     BranchInst::Create(ifTrueBB, ifFalseBB, notNilCond, notFalseBB);
 }
 
@@ -1509,7 +1512,8 @@
 		    "rb_str_new_fast", ft));
     }
 
-    return CallInst::Create(newStringFunc, params.begin(), params.end(), "", bb);
+    return CallInst::Create(newStringFunc, params.begin(), params.end(), "",
+	    bb);
 }
 
 Value *
@@ -1536,7 +1540,8 @@
     Value *dvars_ary = fargs_i;
 
     Value *index = ConstantInt::get(Int32Ty, idx);
-    Value *slot = GetElementPtrInst::Create(dvars_ary, index, rb_id2name(name), bb);
+    Value *slot = GetElementPtrInst::Create(dvars_ary, index, rb_id2name(name),
+	    bb);
     return new LoadInst(slot, "", bb);
 }
 
@@ -1696,7 +1701,8 @@
     return val;
 }
 
-void RoxorCompiler::compile_simple_return(Value *val)
+void
+RoxorCompiler::compile_simple_return(Value *val)
 {
     if (ensure_bb != NULL) {
 	BranchInst::Create(ensure_bb, bb);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090902/67588a06/attachment.html>


More information about the macruby-changes mailing list