   return Builder.createCall(CalleeF, ArgsV, "calltmp")
 
 IfExprAST::Codegen = ->
-  CondV = @Cond.Codegen()
+  CondV = @cond.Codegen()
   if not CondV then return null
   
   # Convert condition to a bool by comparing equal to 0.0.
-  CondV = Builder.CreateFCmpONE(CondV, Context.getDouble(0.0), "ifcond")
-  
-  TheFunction = Builder.GetInsertBlock().parent
+  CondV = Builder.createFCmpONE(CondV, Context.getDouble(0.0), "ifcond")
+  
+  TheFunction = Builder.insertBlock.parent
   
   # Create blocks for the then and else cases.
-  ThenBB = new llvm.BasicBlock::Create(llvm.globalContext, "then",)
-  ElseBB = new llvm.BasicBlock::Create(llvm.globalContext, "else")
-  MergeBB = new llvm.BasicBlock::Create(llvm.globalContext, "ifcont")
+  ThenBB = new llvm.BasicBlock(llvm.globalContext, "then",)
+  ElseBB = new llvm.BasicBlock(llvm.globalContext, "else")
+  MergeBB = new llvm.BasicBlock(llvm.globalContext, "ifcont")
   
   # Insert the 'then' block at the end of the function.
   TheFunction.addBasicBlock(ThenBB)
   
-  Builder.CreateCondBr(CondV, ThenBB, ElseBB)
+  Builder.createCondBr(CondV, ThenBB, ElseBB)
   
   # Emit then value.
   Builder.setInsertPoint(ThenBB)
   
-  ThenV = Then.Codegen()
+  ThenV = @then.Codegen()
   if not ThenV then return null
   
-  Builder.CreateBr(MergeBB)
+  Builder.createBr(MergeBB)
   # Codegen of 'Then' can change the current block, update ThenBB for the PHI.
-  ThenBB = Builder.GetInsertBlock()
+  ThenBB = Builder.insertBlock
   
   # Emit else block.
-  TheFunction.getBasicBlockList().push_back(ElseBB)
+  TheFunction.addBasicBlock(ElseBB)
   Builder.setInsertPoint(ElseBB)
   
-  ElseV = Else.Codegen()
+  ElseV = @else.Codegen()
   if not ElseV then return null
   
-  Builder.CreateBr(MergeBB)
+  Builder.createBr(MergeBB)
   # Codegen of 'Else' can change the current block, update ElseBB for the PHI.
-  ElseBB = Builder.GetInsertBlock()
+  ElseBB = Builder.insertBlock
   
   # Emit merge block.
-  TheFunction.getBasicBlockList().push_back(MergeBB)
+  TheFunction.addBasicBlock(MergeBB)
   Builder.setInsertPoint(MergeBB)
-  PN = Builder.CreatePHI(Type::getDoubleTy(getGlobalContext()), 2, "iftmp")
+  PN = Builder.createPHI(doubleTy, "iftmp")
   PN.addIncoming(ThenV, ThenBB)
   PN.addIncoming(ElseV, ElseBB)
   return PN

    when '<'
      L = Builder.createFCmpULT(L, R, "cmptmp")
      # Convert bool 0/1 to double 0.0 or 1.0
      return Builder.CreateUIToFP(L, Type::getDoubleTy(getGlobalContext()), "booltmp")
  
  # If it wasn't a builtin binary operator, it must be a user defined one. Emit
  # a call to it.

  TheFunction = Builder.insertBlock.parent

  # Create an alloca for the variable in the entry block.
  Alloca = CreateEntryBlockAlloca(TheFunction, @varName)
  
  # Emit the start code first, without 'variable' in scope.
  StartVal = @start.Codegen()
  if not StartVal then return null
  
  # Store the value into the alloca.
