Projects
Essentials
lightspark
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 82
View file
build.patch
Changed
@@ -151,7 +151,7 @@ th->FPM=new llvm::FunctionPassManager(th->module); #ifdef LLVM_35 diff --git a/src/scripting/abc_codesynt.cpp b/src/scripting/abc_codesynt.cpp -index 2eb28fe..3034b67 100644 +index 2eb28fe..d07ccd6 100644 --- a/src/scripting/abc_codesynt.cpp +++ b/src/scripting/abc_codesynt.cpp @@ -26,7 +26,11 @@ @@ -167,48 +167,58 @@ #ifdef HAVE_IR_DATALAYOUT_H # include <llvm/IR/Constants.h> # include <llvm/IR/DerivedTypes.h> -@@ -819,13 +823,13 @@ inline llvm::Value* getMultiname(llvm::ExecutionEngine* ex,llvm::IRBuilder<>& Bu +@@ -819,13 +823,25 @@ inline llvm::Value* getMultiname(llvm::ExecutionEngine* ex,llvm::IRBuilder<>& Bu stack_entry rt1=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); /*if(rt1.second==STACK_INT) //TODO: for them, first parameter is call_context, not ABCContext -- name = Builder.CreateCall3(ex->FindFunctionNamed("getMultiname_i"), context, rt1.first, mindx); -+ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname_i"). {context, rt1.first, mindx}); ++#ifdef LLVM_37 ++ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname_i"), {context, rt1.first, mindx}); ++#else + name = Builder.CreateCall3(ex->FindFunctionNamed("getMultiname_i"), context, rt1.first, mindx); ++#endif else if(rt1.second==STACK_NUMBER) -- name = Builder.CreateCall3(ex->FindFunctionNamed("getMultiname_d"), context, rt1.first, mindx); -+ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname_d"). {context, rt1.first, mindx}); ++#ifdef LLVM_37 ++ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname_d"), {context, rt1.first, mindx}); ++#else + name = Builder.CreateCall3(ex->FindFunctionNamed("getMultiname_d"), context, rt1.first, mindx); ++#endif else*/ { abstract_value(ex,Builder,rt1); -- name = Builder.CreateCall4(ex->FindFunctionNamed("getMultiname"), context, rt1.first, constnull, mindx); -+ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname"). {context, rt1.first, constnull, mindx}); ++#ifdef LLVM_37 ++ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname"), {context, rt1.first, constnull, mindx}); ++#else + name = Builder.CreateCall4(ex->FindFunctionNamed("getMultiname"), context, rt1.first, constnull, mindx); ++#endif } } else if(rtdata==2) -@@ -834,7 +838,7 @@ inline llvm::Value* getMultiname(llvm::ExecutionEngine* ex,llvm::IRBuilder<>& Bu +@@ -834,7 +850,11 @@ inline llvm::Value* getMultiname(llvm::ExecutionEngine* ex,llvm::IRBuilder<>& Bu stack_entry rt2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); abstract_value(ex,Builder,rt1); abstract_value(ex,Builder,rt2); -- name = Builder.CreateCall4(ex->FindFunctionNamed("getMultiname"), context, rt1.first, rt2.first, mindx); -+ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname"). {context, rt1.first, rt2.first, mindx}); ++#ifdef LLVM_37 ++ name = Builder.CreateCall(ex->FindFunctionNamed("getMultiname"), {context, rt1.first, rt2.first, mindx}); ++#else + name = Builder.CreateCall4(ex->FindFunctionNamed("getMultiname"), context, rt1.first, rt2.first, mindx); ++#endif } else assert(false); -@@ -1866,9 +1870,12 @@ SyntheticFunction::synt_function method_info::synt_method() - llvm::Function::ArgumentListType::iterator it=llvmf->getArgumentList().begin(); - //The first and only argument to this function is the call_context* +@@ -1868,7 +1888,11 @@ SyntheticFunction::synt_function method_info::synt_method() llvm::Value* context=it; -- + //let's give access to local data storage - value=Builder.CreateStructGEP(context,0); + value=Builder.CreateStructGEP( +#ifdef LLVM_37 + nullptr, +#endif -+ context, 0); ++ context,0); llvm::Value* locals=Builder.CreateLoad(value); //the stack is statically handled as much as possible to allow llvm optimizations -@@ -1876,12 +1883,24 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -1876,12 +1900,24 @@ SyntheticFunction::synt_function method_info::synt_method() vector<stack_entry> static_stack; static_stack.reserve(body->max_stack); //Get the pointer to the dynamic stack @@ -236,834 +246,1134 @@ /* //Allocate a fast dynamic stack based on LLVM alloca instruction //This is used on branches -@@ -2098,7 +2117,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2098,7 +2134,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("getSuper"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("getSuper"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("getSuper"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("getSuper"), context, constant); ++#endif break; } case 0x05: -@@ -2109,7 +2128,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2109,7 +2149,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("setSuper"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("setSuper"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("setSuper"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("setSuper"), context, constant); ++#endif break; } case 0x06: -@@ -2119,7 +2138,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2119,7 +2163,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("dxns"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("dxns"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("dxns"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("dxns"), context, constant); ++#endif break; } case 0x07: -@@ -2128,7 +2147,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2128,7 +2176,11 @@ SyntheticFunction::synt_function method_info::synt_method() LOG(LOG_TRACE, _("synt dxnslate") ); stack_entry v=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); abstract_value(ex,Builder,v); -- Builder.CreateCall2(ex->FindFunctionNamed("dxns"), context, v.first); -+ Builder.CreateCall(ex->FindFunctionNamed("dxns"). {context, v.first}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("dxns"), {context, v.first}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("dxns"), context, v.first); ++#endif break; } case 0x08: -@@ -2179,7 +2198,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2179,7 +2231,11 @@ SyntheticFunction::synt_function method_info::synt_method() { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNLT"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifNLT"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifNLT"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNLT"), v1.first, v2.first); ++#endif } syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2212,7 +2231,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2212,7 +2268,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNLE"), v1.first, v2.first); -+ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifNLE"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifNLE"), {v1.first, v2.first}); ++#else + llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNLE"), v1.first, v2.first); ++#endif syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2245,7 +2264,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2245,7 +2305,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNGT"), v1.first, v2.first); -+ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifNGT"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifNGT"), {v1.first, v2.first}); ++#else + llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNGT"), v1.first, v2.first); ++#endif syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2278,7 +2297,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2278,7 +2342,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNGE"), v1.first, v2.first); -+ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifNGE"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifNGE"), {v1.first, v2.first}); ++#else + llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNGE"), v1.first, v2.first); ++#endif syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2401,7 +2420,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2401,7 +2469,11 @@ SyntheticFunction::synt_function method_info::synt_method() llvm::Value* cond; //Make comparision if(v1.second==STACK_OBJECT && v2.second==STACK_OBJECT) -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifEq"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifEq"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifEq"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifEq"), v1.first, v2.first); ++#endif else if(v1.second==STACK_INT && v2.second==STACK_NUMBER) { v1.first=Builder.CreateSIToFP(v1.first,number_type); -@@ -2411,7 +2430,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2411,7 +2483,11 @@ SyntheticFunction::synt_function method_info::synt_method() { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifEq"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifEq"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifEq"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifEq"), v1.first, v2.first); ++#endif } syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2444,9 +2463,9 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2444,9 +2520,17 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v2= static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); llvm::Value* cond; if(v1.second==STACK_INT && v2.second==STACK_OBJECT) -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNE_oi"), v2.first, v1.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifNE_oi"). {v2.first, v1.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifNE_oi"), {v2.first, v1.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNE_oi"), v2.first, v1.first); ++#endif else if(v1.second==STACK_OBJECT && v2.second==STACK_INT) -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNE_oi"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifNE_oi"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifNE_oi"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNE_oi"), v1.first, v2.first); ++#endif else if(v1.second==STACK_INT && v2.second==STACK_NUMBER) { v1.first=Builder.CreateSIToFP(v1.first,number_type); -@@ -2461,7 +2480,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2461,7 +2545,11 @@ SyntheticFunction::synt_function method_info::synt_method() //Abstract default abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNE"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifNE"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifNE"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifNE"), v1.first, v2.first); ++#endif } syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2494,18 +2513,18 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2494,18 +2582,34 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v2= static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); llvm::Value* cond; if(v1.second==STACK_OBJECT && v2.second==STACK_OBJECT) -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLT"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLT"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLT"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLT"), v1.first, v2.first); ++#endif else if(v1.second==STACK_INT && v2.second==STACK_OBJECT) -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLT_io"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLT_io"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLT_io"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLT_io"), v1.first, v2.first); ++#endif else if(v1.second==STACK_OBJECT && v2.second==STACK_INT) -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLT_oi"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLT_oi"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLT_oi"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLT_oi"), v1.first, v2.first); ++#endif else if(v1.second==STACK_INT && v2.second==STACK_INT) cond=Builder.CreateICmpSLT(v2.first,v1.first); else { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLT"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLT"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLT"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLT"), v1.first, v2.first); ++#endif } syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2538,12 +2557,12 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2538,12 +2642,20 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); llvm::Value* cond; if(v1.second==STACK_OBJECT && v2.second==STACK_OBJECT) -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLE"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLE"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLE"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLE"), v1.first, v2.first); ++#endif else { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLE"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLE"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifLE"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifLE"), v1.first, v2.first); ++#endif } syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2578,7 +2597,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2578,7 +2690,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifGT"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifGT"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifGT"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifGT"), v1.first, v2.first); ++#endif syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2612,7 +2631,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2612,7 +2728,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifGE"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifGE"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifGE"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifGE"), v1.first, v2.first); ++#endif syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2644,7 +2663,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2644,7 +2764,11 @@ SyntheticFunction::synt_function method_info::synt_method() static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index).first; llvm::Value* v2= static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index).first; -- llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifStrictEq"), v1, v2); -+ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifStrictEq"). {v1, v2}); ++#ifdef LLVM_37 ++ llvm::Value* cond=Builder.CreateCall(ex->FindFunctionNamed("ifStrictEq"), {v1, v2}); ++#else + llvm::Value* cond=Builder.CreateCall2(ex->FindFunctionNamed("ifStrictEq"), v1, v2); ++#endif syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2677,7 +2696,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2677,7 +2801,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- cond=Builder.CreateCall2(ex->FindFunctionNamed("ifStrictNE"), v1.first, v2.first); -+ cond=Builder.CreateCall(ex->FindFunctionNamed("ifStrictNE"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ cond=Builder.CreateCall(ex->FindFunctionNamed("ifStrictNE"), {v1.first, v2.first}); ++#else + cond=Builder.CreateCall2(ex->FindFunctionNamed("ifStrictNE"), v1.first, v2.first); ++#endif syncStacks(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index); -@@ -2771,7 +2790,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2771,7 +2899,11 @@ SyntheticFunction::synt_function method_info::synt_method() llvm::Value* v2= static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index).first; -- value=Builder.CreateCall2(ex->FindFunctionNamed("nextName"), v1, v2); -+ value=Builder.CreateCall(ex->FindFunctionNamed("nextName"). {v1, v2}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("nextName"), {v1, v2}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("nextName"), v1, v2); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -2800,7 +2819,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2800,7 +2932,11 @@ SyntheticFunction::synt_function method_info::synt_method() llvm::Value* v2= static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index).first; -- value=Builder.CreateCall2(ex->FindFunctionNamed("nextValue"), v1, v2); -+ value=Builder.CreateCall(ex->FindFunctionNamed("nextValue"). {v1, v2}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("nextValue"), {v1, v2}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("nextValue"), v1, v2); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -2898,7 +2917,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2898,7 +3034,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- value=Builder.CreateCall2(ex->FindFunctionNamed("pushString"), context, constant); -+ value=Builder.CreateCall(ex->FindFunctionNamed("pushString"). {context, constant}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("pushString"), {context, constant}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("pushString"), context, constant); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -2911,7 +2930,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2911,7 +3051,11 @@ SyntheticFunction::synt_function method_info::synt_method() if(Log::getLevel()>=LOG_CALLS) { constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("pushInt"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("pushInt"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("pushInt"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("pushInt"), context, constant); ++#endif } s32 i=this->context->constant_pool.integer[t]; constant = llvm::ConstantInt::get(int_type, i); -@@ -2927,7 +2946,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2927,7 +3071,11 @@ SyntheticFunction::synt_function method_info::synt_method() if(Log::getLevel()>=LOG_CALLS) { constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("pushUInt"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("pushUInt"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("pushUInt"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("pushUInt"), context, constant); ++#endif } u32 i=this->context->constant_pool.uinteger[t]; constant = llvm::ConstantInt::get(int_type, i); -@@ -2944,7 +2963,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2944,7 +3092,11 @@ SyntheticFunction::synt_function method_info::synt_method() if(Log::getLevel()>=LOG_CALLS) { constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("pushDouble"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("pushDouble"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("pushDouble"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("pushDouble"), context, constant); ++#endif } number_t d=this->context->constant_pool.doubles[t]; constant = llvm::ConstantFP::get(number_type,d); -@@ -2966,7 +2985,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -2966,7 +3118,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- value = Builder.CreateCall2(ex->FindFunctionNamed("pushNamespace"), context, constant); -+ value = Builder.CreateCall(ex->FindFunctionNamed("pushNamespace"). {context, constant}); ++#ifdef LLVM_37 ++ value = Builder.CreateCall(ex->FindFunctionNamed("pushNamespace"), {context, constant}); ++#else + value = Builder.CreateCall2(ex->FindFunctionNamed("pushNamespace"), context, constant); ++#endif static_stack_push(static_stack, stack_entry(value,STACK_OBJECT)); break; } -@@ -3000,7 +3019,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3000,7 +3156,11 @@ SyntheticFunction::synt_function method_info::synt_method() static_locals[t2].second=STACK_NONE; } -- value=Builder.CreateCall3(ex->FindFunctionNamed("hasNext2"), context, constant, constant2); -+ value=Builder.CreateCall(ex->FindFunctionNamed("hasNext2"). {context, constant, constant2}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("hasNext2"), {context, constant, constant2}); ++#else + value=Builder.CreateCall3(ex->FindFunctionNamed("hasNext2"), context, constant, constant2); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -3011,7 +3030,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3011,7 +3171,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- value=Builder.CreateCall2(ex->FindFunctionNamed("newFunction"), context, constant); -+ value=Builder.CreateCall(ex->FindFunctionNamed("newFunction"). {context, constant}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("newFunction"), {context, constant}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("newFunction"), context, constant); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -3024,7 +3043,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3024,7 +3188,11 @@ SyntheticFunction::synt_function method_info::synt_method() code >> t; constant = llvm::ConstantInt::get(int_type, t); constant2 = llvm::ConstantInt::get(int_type, 0); -- Builder.CreateCall3(ex->FindFunctionNamed("call"), context, constant, constant2); -+ Builder.CreateCall(ex->FindFunctionNamed("call"). {context, constant, constant2}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("call"), {context, constant, constant2}); ++#else + Builder.CreateCall3(ex->FindFunctionNamed("call"), context, constant, constant2); ++#endif break; } case 0x42: -@@ -3035,7 +3054,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3035,7 +3203,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("construct"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("construct"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("construct"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("construct"), context, constant); ++#endif break; } case 0x45: -@@ -3050,7 +3069,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3050,7 +3222,11 @@ SyntheticFunction::synt_function method_info::synt_method() constant2 = llvm::ConstantInt::get(int_type, t); constant3 = llvm::ConstantInt::get(int_type, 0); constant4 = llvm::ConstantInt::get(bool_type, 1); -- Builder.CreateCall5(ex->FindFunctionNamed("callSuper"), context, constant, constant2, constant3, constant4); -+ Builder.CreateCall(ex->FindFunctionNamed("callSuper"). {context, constant, constant2, constant3, constant4}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("callSuper"), {context, constant, constant2, constant3, constant4}); ++#else + Builder.CreateCall5(ex->FindFunctionNamed("callSuper"), context, constant, constant2, constant3, constant4); ++#endif break; } case 0x4c: //callproplex -@@ -3072,7 +3091,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3072,7 +3248,11 @@ SyntheticFunction::synt_function method_info::synt_method() for(int i=0;i<t;i++) args[t-i]=static_stack_pop(Builder,static_stack,m).first;*/ //Call the function resolver, static case could be resolved at this time (TODO) -- Builder.CreateCall5(ex->FindFunctionNamed("callProperty"), context, constant, constant2, constant3, constant4); -+ Builder.CreateCall(ex->FindFunctionNamed("callProperty"). {context, constant, constant2, constant3, constant4}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("callProperty"), {context, constant, constant2, constant3, constant4}); ++#else + Builder.CreateCall5(ex->FindFunctionNamed("callProperty"), context, constant, constant2, constant3, constant4); ++#endif /* //Pop the function object, and then the object itself llvm::Value* fun=static_stack_pop(Builder,static_stack,m).first; -@@ -3141,7 +3160,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3141,7 +3321,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("constructSuper"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("constructSuper"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("constructSuper"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("constructSuper"), context, constant); ++#endif break; } case 0x4a: -@@ -3154,7 +3173,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3154,7 +3338,11 @@ SyntheticFunction::synt_function method_info::synt_method() constant = llvm::ConstantInt::get(int_type, t); code >> t; constant2 = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall3(ex->FindFunctionNamed("constructProp"), context, constant, constant2); -+ Builder.CreateCall(ex->FindFunctionNamed("constructProp"). {context, constant, constant2}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("constructProp"), {context, constant, constant2}); ++#else + Builder.CreateCall3(ex->FindFunctionNamed("constructProp"), context, constant, constant2); ++#endif break; } case 0x4e: -@@ -3169,7 +3188,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3169,7 +3357,11 @@ SyntheticFunction::synt_function method_info::synt_method() constant2 = llvm::ConstantInt::get(int_type, t); constant3 = llvm::ConstantInt::get(int_type, 0); constant4 = llvm::ConstantInt::get(bool_type, 0); -- Builder.CreateCall5(ex->FindFunctionNamed("callSuper"), context, constant, constant2, constant3, constant4); -+ Builder.CreateCall(ex->FindFunctionNamed("callSuper"). {context, constant, constant2, constant3, constant4}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("callSuper"), {context, constant, constant2, constant3, constant4}); ++#else + Builder.CreateCall5(ex->FindFunctionNamed("callSuper"), context, constant, constant2, constant3, constant4); ++#endif break; } case 0x4f: -@@ -3184,7 +3203,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3184,7 +3376,11 @@ SyntheticFunction::synt_function method_info::synt_method() constant2 = llvm::ConstantInt::get(int_type, t); constant3 = llvm::ConstantInt::get(int_type, 0); constant4 = llvm::ConstantInt::get(bool_type, 0); -- Builder.CreateCall5(ex->FindFunctionNamed("callProperty"), context, constant, constant2, constant3, constant4); -+ Builder.CreateCall(ex->FindFunctionNamed("callProperty"). {context, constant, constant2, constant3, constant4}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("callProperty"), {context, constant, constant2, constant3, constant4}); ++#else + Builder.CreateCall5(ex->FindFunctionNamed("callProperty"), context, constant, constant2, constant3, constant4); ++#endif break; } case 0x53: -@@ -3195,7 +3214,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3195,7 +3391,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("constructGenericType"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("constructGenericType"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("constructGenericType"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("constructGenericType"), context, constant); ++#endif break; } case 0x55: -@@ -3206,7 +3225,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3206,7 +3406,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("newObject"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("newObject"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("newObject"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("newObject"), context, constant); ++#endif break; } case 0x56: -@@ -3217,14 +3236,14 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3217,14 +3421,22 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("newArray"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("newArray"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("newArray"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("newArray"), context, constant); ++#endif break; } case 0x57: { //newactivation LOG(LOG_TRACE, _("synt newactivation") ); -- value=Builder.CreateCall2(ex->FindFunctionNamed("newActivation"), context, th); -+ value=Builder.CreateCall(ex->FindFunctionNamed("newActivation"). {context, th}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("newActivation"), {context, th}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("newActivation"), context, th); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -3236,7 +3255,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3236,7 +3448,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("newClass"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("newClass"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("newClass"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("newClass"), context, constant); ++#endif break; } case 0x59: -@@ -3247,7 +3266,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3247,7 +3463,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("getDescendants"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("getDescendants"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("getDescendants"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("getDescendants"), context, constant); ++#endif break; } case 0x5a: -@@ -3257,7 +3276,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3257,7 +3477,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- value=Builder.CreateCall2(ex->FindFunctionNamed("newCatch"), context, constant); -+ value=Builder.CreateCall(ex->FindFunctionNamed("newCatch"). {context, constant}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("newCatch"), {context, constant}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("newCatch"), context, constant); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -3268,7 +3287,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3268,7 +3492,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; llvm::Value* name = getMultiname(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index,this->context,t); -- value=Builder.CreateCall2(ex->FindFunctionNamed("findPropStrict"), context, name); -+ value=Builder.CreateCall(ex->FindFunctionNamed("findPropStrict"). {context, name}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("findPropStrict"), {context, name}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("findPropStrict"), context, name); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -3279,7 +3298,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3279,7 +3507,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; llvm::Value* name = getMultiname(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index,this->context,t); -- value=Builder.CreateCall2(ex->FindFunctionNamed("findProperty"), context, name); -+ value=Builder.CreateCall(ex->FindFunctionNamed("findProperty"). {context, name}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("findProperty"), {context, name}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("findProperty"), context, name); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -3291,7 +3310,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3291,7 +3523,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("getLex"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("getLex"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("getLex"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("getLex"), context, constant); ++#endif break; } case 0x61: -@@ -3304,11 +3323,11 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3304,11 +3540,19 @@ SyntheticFunction::synt_function method_info::synt_method() llvm::Value* name = getMultiname(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index,this->context,t); stack_entry obj=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); if(value.second==STACK_INT) -- Builder.CreateCall3(ex->FindFunctionNamed("setProperty_i"),value.first, obj.first, name); ++#ifdef LLVM_37 + Builder.CreateCall(ex->FindFunctionNamed("setProperty_i"),{value.first, obj.first, name}); ++#else + Builder.CreateCall3(ex->FindFunctionNamed("setProperty_i"),value.first, obj.first, name); ++#endif else { abstract_value(ex,Builder,value); -- Builder.CreateCall3(ex->FindFunctionNamed("setProperty"),value.first, obj.first, name); ++#ifdef LLVM_37 + Builder.CreateCall(ex->FindFunctionNamed("setProperty"),{value.first, obj.first, name}); ++#else + Builder.CreateCall3(ex->FindFunctionNamed("setProperty"),value.first, obj.first, name); ++#endif } break; } -@@ -3331,7 +3350,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3331,7 +3575,11 @@ SyntheticFunction::synt_function method_info::synt_method() Builder.CreateCall(ex->FindFunctionNamed("incRef"), t); Builder.CreateCall(ex->FindFunctionNamed("incRef"), t); if(Log::getLevel()>=LOG_CALLS) -- Builder.CreateCall2(ex->FindFunctionNamed("getLocal"), t, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("getLocal"). {t, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("getLocal"), {t, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("getLocal"), t, constant); ++#endif } else if(static_locals[i].second==STACK_OBJECT) -@@ -3339,14 +3358,14 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3339,14 +3587,22 @@ SyntheticFunction::synt_function method_info::synt_method() Builder.CreateCall(ex->FindFunctionNamed("incRef"), static_locals[i].first); static_stack_push(static_stack,static_locals[i]); if(Log::getLevel()>=LOG_CALLS) -- Builder.CreateCall2(ex->FindFunctionNamed("getLocal"), static_locals[i].first, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("getLocal"). {static_locals[i].first, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("getLocal"), {static_locals[i].first, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("getLocal"), static_locals[i].first, constant); ++#endif } else if(static_locals[i].second==STACK_INT || static_locals[i].second==STACK_UINT) { static_stack_push(static_stack,static_locals[i]); if(Log::getLevel()>=LOG_CALLS) -- Builder.CreateCall2(ex->FindFunctionNamed("getLocal_int"), constant, static_locals[i].first); -+ Builder.CreateCall(ex->FindFunctionNamed("getLocal_int"). {constant, static_locals[i].first}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("getLocal_int"), {constant, static_locals[i].first}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("getLocal_int"), constant, static_locals[i].first); ++#endif } else if(static_locals[i].second==STACK_NUMBER || static_locals[i].second==STACK_BOOLEAN) -@@ -3375,7 +3394,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3375,7 +3631,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- value=Builder.CreateCall2(ex->FindFunctionNamed("getScopeObject"), context, constant); -+ value=Builder.CreateCall(ex->FindFunctionNamed("getScopeObject"). {context, constant}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("getScopeObject"), {context, constant}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("getScopeObject"), context, constant); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -3389,17 +3408,17 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3389,17 +3649,29 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry obj=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); abstract_value(ex,Builder,obj); -- value=Builder.CreateCall2(ex->FindFunctionNamed("getProperty"), obj.first, name); -+ value=Builder.CreateCall(ex->FindFunctionNamed("getProperty"). {obj.first, name}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("getProperty"), {obj.first, name}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("getProperty"), obj.first, name); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); /*if(cur_block->push_types[local_ip]==STACK_OBJECT || cur_block->push_types[local_ip]==STACK_BOOLEAN) { -- value=Builder.CreateCall2(ex->FindFunctionNamed("getProperty"), obj.first, name); -+ value=Builder.CreateCall(ex->FindFunctionNamed("getProperty"). {obj.first, name}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("getProperty"), {obj.first, name}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("getProperty"), obj.first, name); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); } else if(cur_block->push_types[local_ip]==STACK_INT) { -- value=Builder.CreateCall2(ex->FindFunctionNamed("getProperty_i"), obj.first, name); -+ value=Builder.CreateCall(ex->FindFunctionNamed("getProperty_i"). {obj.first, name}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("getProperty_i"), {obj.first, name}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("getProperty_i"), obj.first, name); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_INT)); } else -@@ -3417,7 +3436,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3417,7 +3689,11 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry val=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); llvm::Value* name = getMultiname(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index,this->context,t); stack_entry obj=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); -- Builder.CreateCall3(ex->FindFunctionNamed("initProperty"), obj.first, val.first, name); -+ Builder.CreateCall(ex->FindFunctionNamed("initProperty"). {obj.first, val.first, name}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("initProperty"), {obj.first, val.first, name}); ++#else + Builder.CreateCall3(ex->FindFunctionNamed("initProperty"), obj.first, val.first, name); ++#endif break; } case 0x6a: -@@ -3429,7 +3448,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3429,7 +3705,11 @@ SyntheticFunction::synt_function method_info::synt_method() llvm::Value* name = getMultiname(ex,Builder,static_stack,dynamic_stack,dynamic_stack_index,this->context,t); stack_entry v=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); abstract_value(ex,Builder,v); -- value=Builder.CreateCall2(ex->FindFunctionNamed("deleteProperty"), v.first, name); -+ value=Builder.CreateCall(ex->FindFunctionNamed("deleteProperty"). {v.first, name}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("deleteProperty"), {v.first, name}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("deleteProperty"), v.first, name); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -3442,7 +3461,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3442,7 +3722,11 @@ SyntheticFunction::synt_function method_info::synt_method() constant = llvm::ConstantInt::get(int_type, t); llvm::Value* v1= static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index).first; -- value=Builder.CreateCall2(ex->FindFunctionNamed("getSlot"), v1, constant); -+ value=Builder.CreateCall(ex->FindFunctionNamed("getSlot"). {v1, constant}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("getSlot"), {v1, constant}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("getSlot"), v1, constant); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -3458,7 +3477,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3458,7 +3742,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- Builder.CreateCall3(ex->FindFunctionNamed("setSlot"), v1.first, v2.first, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("setSlot"). {v1.first, v2.first, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("setSlot"), {v1.first, v2.first, constant}); ++#else + Builder.CreateCall3(ex->FindFunctionNamed("setSlot"), v1.first, v2.first, constant); ++#endif break; } case 0x70: -@@ -3551,7 +3570,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3551,7 +3839,11 @@ SyntheticFunction::synt_function method_info::synt_method() u30 t; code >> t; constant = llvm::ConstantInt::get(int_type, t); -- Builder.CreateCall2(ex->FindFunctionNamed("coerce"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("coerce"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("coerce"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("coerce"), context, constant); ++#endif break; } case 0x82: -@@ -3585,7 +3604,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3585,7 +3877,11 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v1=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); stack_entry v2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); assert_and_throw(v1.second==STACK_OBJECT && v2.second==STACK_OBJECT); -- value=Builder.CreateCall2(ex->FindFunctionNamed("asTypelate"),v1.first,v2.first); ++#ifdef LLVM_37 + value=Builder.CreateCall(ex->FindFunctionNamed("asTypelate"),{v1.first,v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("asTypelate"),v1.first,v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); break; } -@@ -3673,19 +3692,19 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3673,19 +3969,31 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); if(v1.second==STACK_OBJECT && v2.second==STACK_INT) { -- value=Builder.CreateCall2(ex->FindFunctionNamed("add_oi"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("add_oi"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("add_oi"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("add_oi"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); } else if(v1.second==STACK_OBJECT && v2.second==STACK_NUMBER) { -- value=Builder.CreateCall2(ex->FindFunctionNamed("add_od"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("add_od"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("add_od"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("add_od"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); } else if(v1.second==STACK_OBJECT || v2.second==STACK_OBJECT) { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("add"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("add"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("add"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("add"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_OBJECT)); } else /* v1 and v2 are BOOLEAN, UINT, INT or NUMBER */ -@@ -3726,24 +3745,24 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3726,24 +4034,40 @@ SyntheticFunction::synt_function method_info::synt_method() } else if(v1.second==STACK_OBJECT && v2.second==STACK_INT) { -- value=Builder.CreateCall2(ex->FindFunctionNamed("subtract_oi"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("subtract_oi"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("subtract_oi"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("subtract_oi"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_NUMBER)); } else if(v1.second==STACK_NUMBER && v2.second==STACK_OBJECT) { -- value=Builder.CreateCall2(ex->FindFunctionNamed("subtract_do"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("subtract_do"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("subtract_do"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("subtract_do"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_NUMBER)); } else if(v1.second==STACK_INT && v2.second==STACK_OBJECT) { -- value=Builder.CreateCall2(ex->FindFunctionNamed("subtract_io"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("subtract_io"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("subtract_io"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("subtract_io"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_NUMBER)); } else { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("subtract"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("subtract"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("subtract"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("subtract"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_NUMBER)); } -@@ -3757,12 +3776,12 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3757,12 +4081,20 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v2= static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); if(v1.second==STACK_INT && v2.second==STACK_OBJECT) { -- value=Builder.CreateCall2(ex->FindFunctionNamed("multiply_oi"), v2.first, v1.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("multiply_oi"). {v2.first, v1.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("multiply_oi"), {v2.first, v1.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("multiply_oi"), v2.first, v1.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_NUMBER)); } else if(v1.second==STACK_OBJECT && v2.second==STACK_INT) { -- value=Builder.CreateCall2(ex->FindFunctionNamed("multiply_oi"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("multiply_oi"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("multiply_oi"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("multiply_oi"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_NUMBER)); } else if(v1.second==STACK_INT && v2.second==STACK_INT) -@@ -3791,7 +3810,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3791,7 +4123,11 @@ SyntheticFunction::synt_function method_info::synt_method() { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("multiply"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("multiply"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("multiply"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("multiply"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_NUMBER)); } -@@ -3822,7 +3841,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3822,7 +4158,11 @@ SyntheticFunction::synt_function method_info::synt_method() { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("divide"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("divide"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("divide"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("divide"), v1.first, v2.first); ++#endif } static_stack_push(static_stack,stack_entry(value,STACK_NUMBER)); break; -@@ -3846,7 +3865,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3846,7 +4186,11 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v1=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); stack_entry v2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); if(v1.second==STACK_INT && v2.second==STACK_OBJECT) -- value=Builder.CreateCall2(ex->FindFunctionNamed("lShift_io"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("lShift_io"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("lShift_io"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("lShift_io"), v1.first, v2.first); ++#endif else if(v1.second==STACK_INT && v2.second==STACK_INT) { constant = llvm::ConstantInt::get(int_type, 31); //Mask for v1 -@@ -3857,7 +3876,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3857,7 +4201,11 @@ SyntheticFunction::synt_function method_info::synt_method() { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("lShift"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("lShift"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("lShift"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("lShift"), v1.first, v2.first); ++#endif } static_stack_push(static_stack,stack_entry(value,STACK_INT)); -@@ -3872,7 +3891,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3872,7 +4220,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("rShift"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("rShift"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("rShift"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("rShift"), v1.first, v2.first); ++#endif static_stack_push(static_stack,make_pair(value,STACK_INT)); break; -@@ -3884,7 +3903,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3884,7 +4236,11 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v1=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); stack_entry v2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); if(v1.second==STACK_INT && v2.second==STACK_OBJECT) -- value=Builder.CreateCall2(ex->FindFunctionNamed("urShift_io"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("urShift_io"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("urShift_io"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("urShift_io"), v1.first, v2.first); ++#endif else if(v1.second==STACK_INT && v2.second==STACK_INT) { v2.first=Builder.CreateIntCast(v2.first,int_type,false); -@@ -3901,7 +3920,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3901,7 +4257,11 @@ SyntheticFunction::synt_function method_info::synt_method() { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("urShift"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("urShift"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("urShift"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("urShift"), v1.first, v2.first); ++#endif } static_stack_push(static_stack,stack_entry(value,STACK_INT)); -@@ -3915,9 +3934,9 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3915,9 +4275,17 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); if(v1.second==STACK_INT && v2.second==STACK_OBJECT) -- value=Builder.CreateCall2(ex->FindFunctionNamed("bitAnd_oi"), v2.first, v1.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("bitAnd_oi"). {v2.first, v1.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("bitAnd_oi"), {v2.first, v1.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("bitAnd_oi"), v2.first, v1.first); ++#endif else if(v1.second==STACK_OBJECT && v2.second==STACK_INT) -- value=Builder.CreateCall2(ex->FindFunctionNamed("bitAnd_oi"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("bitAnd_oi"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("bitAnd_oi"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("bitAnd_oi"), v1.first, v2.first); ++#endif else if(v1.second==STACK_INT && v2.second==STACK_INT) value=Builder.CreateAnd(v1.first,v2.first); else if(v1.second==STACK_NUMBER && v2.second==STACK_INT) -@@ -3934,7 +3953,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3934,7 +4302,11 @@ SyntheticFunction::synt_function method_info::synt_method() { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("bitAnd_oo"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("bitAnd_oo"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("bitAnd_oo"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("bitAnd_oo"), v1.first, v2.first); ++#endif } static_stack_push(static_stack,stack_entry(value,STACK_INT)); -@@ -3949,14 +3968,14 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3949,14 +4321,26 @@ SyntheticFunction::synt_function method_info::synt_method() if(v1.second==STACK_INT && v2.second==STACK_INT) value=Builder.CreateOr(v1.first,v2.first); else if(v1.second==STACK_OBJECT && v2.second==STACK_INT) -- value=Builder.CreateCall2(ex->FindFunctionNamed("bitOr_oi"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("bitOr_oi"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("bitOr_oi"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("bitOr_oi"), v1.first, v2.first); ++#endif else if(v1.second==STACK_INT && v2.second==STACK_OBJECT) -- value=Builder.CreateCall2(ex->FindFunctionNamed("bitOr_oi"), v2.first, v1.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("bitOr_oi"). {v2.first, v1.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("bitOr_oi"), {v2.first, v1.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("bitOr_oi"), v2.first, v1.first); ++#endif else { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("bitOr"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("bitOr"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("bitOr"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("bitOr"), v1.first, v2.first); ++#endif } static_stack_push(static_stack,stack_entry(value,STACK_INT)); -@@ -3974,7 +3993,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3974,7 +4358,11 @@ SyntheticFunction::synt_function method_info::synt_method() { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("bitXor"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("bitXor"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("bitXor"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("bitXor"), v1.first, v2.first); ++#endif } static_stack_push(static_stack,stack_entry(value,STACK_INT)); -@@ -3992,7 +4011,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -3992,7 +4380,11 @@ SyntheticFunction::synt_function method_info::synt_method() { abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("equals"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("equals"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("equals"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("equals"), v1.first, v2.first); ++#endif } static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; -@@ -4005,7 +4024,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4005,7 +4397,11 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("strictEquals"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("strictEquals"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("strictEquals"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("strictEquals"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -4018,7 +4037,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4018,7 +4414,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("lessThan"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("lessThan"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("lessThan"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("lessThan"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -4031,7 +4050,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4031,7 +4431,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("lessEquals"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("lessEquals"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("lessEquals"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("lessEquals"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -4044,7 +4063,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4044,7 +4448,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("greaterThan"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("greaterThan"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("greaterThan"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("greaterThan"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -4057,7 +4076,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4057,7 +4465,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("greaterEquals"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("greaterEquals"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("greaterEquals"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("greaterEquals"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -4070,7 +4089,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4070,7 +4482,11 @@ SyntheticFunction::synt_function method_info::synt_method() abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("instanceOf"), v1.first, v2.first); -+ value=Builder.CreateCall(ex->FindFunctionNamed("instanceOf"). {v1.first, v2.first}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("instanceOf"), {v1.first, v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("instanceOf"), v1.first, v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -4082,7 +4101,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4082,7 +4498,11 @@ SyntheticFunction::synt_function method_info::synt_method() stack_entry v2=static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index); abstract_value(ex,Builder,v1); abstract_value(ex,Builder,v2); -- value=Builder.CreateCall2(ex->FindFunctionNamed("isTypelate"),v1.first,v2.first); ++#ifdef LLVM_37 + value=Builder.CreateCall(ex->FindFunctionNamed("isTypelate"),{v1.first,v2.first}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("isTypelate"),v1.first,v2.first); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -4094,7 +4113,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4094,7 +4514,11 @@ SyntheticFunction::synt_function method_info::synt_method() static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index).first; llvm::Value* v2= static_stack_pop(Builder,static_stack,dynamic_stack,dynamic_stack_index).first; -- value=Builder.CreateCall2(ex->FindFunctionNamed("in"), v1, v2); -+ value=Builder.CreateCall(ex->FindFunctionNamed("in"). {v1, v2}); ++#ifdef LLVM_37 ++ value=Builder.CreateCall(ex->FindFunctionNamed("in"), {v1, v2}); ++#else + value=Builder.CreateCall2(ex->FindFunctionNamed("in"), v1, v2); ++#endif static_stack_push(static_stack,stack_entry(value,STACK_BOOLEAN)); break; } -@@ -4150,7 +4169,7 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4150,7 +4574,11 @@ SyntheticFunction::synt_function method_info::synt_method() Builder.CreateStore(static_locals[t].first,gep); static_locals[t].second=STACK_NONE; } -- Builder.CreateCall2(ex->FindFunctionNamed("incLocal_i"), context, constant); -+ Builder.CreateCall(ex->FindFunctionNamed("incLocal_i"). {context, constant}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("incLocal_i"), {context, constant}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("incLocal_i"), context, constant); ++#endif break; } case 0x63: //setlocal -@@ -4172,9 +4191,9 @@ SyntheticFunction::synt_function method_info::synt_method() +@@ -4172,9 +4600,17 @@ SyntheticFunction::synt_function method_info::synt_method() { constant = llvm::ConstantInt::get(int_type, i); if(e.second==STACK_INT) -- Builder.CreateCall2(ex->FindFunctionNamed("setLocal_int"), constant, e.first); -+ Builder.CreateCall(ex->FindFunctionNamed("setLocal_int"). {constant, e.first}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("setLocal_int"), {constant, e.first}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("setLocal_int"), constant, e.first); ++#endif else if(e.second==STACK_OBJECT) -- Builder.CreateCall2(ex->FindFunctionNamed("setLocal_obj"), constant, e.first); -+ Builder.CreateCall(ex->FindFunctionNamed("setLocal_obj"). {constant, e.first}); ++#ifdef LLVM_37 ++ Builder.CreateCall(ex->FindFunctionNamed("setLocal_obj"), {constant, e.first}); ++#else + Builder.CreateCall2(ex->FindFunctionNamed("setLocal_obj"), constant, e.first); ++#endif else Builder.CreateCall(ex->FindFunctionNamed("setLocal"), constant); }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.