search for: castedfunction

Displaying 3 results from an estimated 3 matches for "castedfunction".

Did you mean: calledfunction
2005 Apr 21
0
[LLVMdev] Using LLVM for a dynamically typed language
...ype::get( Type::getPrimitiveType( Type::SByteTyID ) ) ); FunctionType* pthreadFunctionType = FunctionType::get( PointerType::get( Type::getPrimitiveType( Type::SByteTyID ) ), paramTypes, false ); assert( pthreadFunctionType != NULL ); // Cast the function to the pthread function type Value* castedFunction = new CastInst( function, PointerType::get( pthreadFunctionType ), "", &terminator ); I hope this helps, Evan Jones
2005 Apr 21
2
[LLVMdev] Using LLVM for a dynamically typed language
I recently ran into the following problem. I'm prototyping a compiler for a dynamically typed language in which functions are first class objects. Assuming I have something like this: if(rand() > 5) i = define(x, y, z) { return x + y + z; } else i = define(x, y) { return x + y; } At this point I cannot know the type of 'i' at compile time. At runtime 'i' is a
2005 Apr 21
5
[LLVMdev] Using LLVM for a dynamically typed language
...) ) ); > > FunctionType* pthreadFunctionType = FunctionType::get( > PointerType::get( Type::getPrimitiveType( Type::SByteTyID ) ), > paramTypes, false ); > assert( pthreadFunctionType != NULL ); > > // Cast the function to the pthread function type > Value* castedFunction = new CastInst( function, > PointerType::get( pthreadFunctionType ), "", &terminator ); > > I hope this helps, > > Evan Jones > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http:...