comparison gen/llvmhelpers.h @ 347:6057fdf797d8 trunk

[svn r368] Fixed custom class allocators with arbitrary user arguments. Closes #25 Removed some dead code. Started on a more generalised approach to call misc. D functions.
author lindquist
date Sun, 13 Jul 2008 20:49:10 +0200
parents d59c363fccad
children 44daf304421c
comparison
equal deleted inserted replaced
346:c9d5c711d65a 347:6057fdf797d8
1 #ifndef LLVMDC_GEN_LLVMHELPERS_H 1 #ifndef LLVMDC_GEN_LLVMHELPERS_H
2 #define LLVMDC_GEN_LLVMHELPERS_H 2 #define LLVMDC_GEN_LLVMHELPERS_H
3 3
4 #include "gen/llvm.h"
4 #include "statement.h" 5 #include "statement.h"
5 6
6 // dynamic memory helpers 7 // dynamic memory helpers
7 LLValue* DtoNew(Type* newtype); 8 LLValue* DtoNew(Type* newtype);
8 void DtoDeleteMemory(LLValue* ptr); 9 void DtoDeleteMemory(LLValue* ptr);
85 DValue* DtoBinRem(DValue* lhs, DValue* rhs); 86 DValue* DtoBinRem(DValue* lhs, DValue* rhs);
86 87
87 // target stuff 88 // target stuff
88 void findDefaultTarget(); 89 void findDefaultTarget();
89 90
91 /**
92 * Calls a D function (with D calling conv).
93 * @param fdecl The FuncDeclaration to call
94 * @param arguments The Array of ExpressionS to pass as arguments.
95 * @param type Optionally the TypeClass of the 'this' arguement.
96 * @param thismem Optionally the LLValue for the 'this' argument.
97 * @return The function call's return value.
98 */
99 DValue* DtoCallDFunc(FuncDeclaration* fdecl, Array* arguments, TypeClass* type=0, LLValue* thismem=0);
100
90 #endif 101 #endif