freenode/#clasp - IRC Chatlog
Search
16:09:11
drmeister
No - they do. What you don't get is (in the case of cl__cons) the LTO inlining of the core::cl__cons into the wrapped_cl__cons
16:11:16
drmeister
Uh - I misspoke. core::cl__cons can be inlined in wrapped_cl__cons - thats all on the C++ side. You are correct wrapped_cl__cons won't be inlined into cl:cons
16:13:29
drmeister
We would need to LTO link a 'bclasp-boehm' if we wanted to take advantage of LTO for building.
16:16:30
drmeister
We could get a measure of the value by timing compile-file using 'iclasp-boehm' vs 'cclasp-boehm'
16:32:15
drmeister
Rather, the function signature is appearing somewhere earlier - in a C++ header somewhere.
16:40:41
Bike
well, if the externs are for stuff like normalize triple that we don't call very much, that's kind of dumb but probably tolerable?
17:06:38
drmeister
CL_EXTERN_DEFUN((llvm::ConstantInt *(*)(llvm::LLVMContext &, const llvm::APInt &)) &llvm::ConstantInt::get);
17:07:35
drmeister
I have to provide the function signature in some cases to select between C++ overloads.
17:08:23
drmeister
It's a good idea because if the function signature changes in the header file - then there will be a C++ compile time error and then we have to fix things - that's pretty normal.
17:09:36
drmeister
For a definition like this: CL_EXTERN_DEFUN( &llvm::Type::getInt64Ty); the function signature can change in the C++ code and only be discovered in a call from Common Lisp.
17:10:17
drmeister
So, what if we provide the function signature for all of these CL_EXTERN_DEFUN's in the form of the pointer cast and parse them - then we can generate wrappers.
17:10:48
drmeister
It's only a few dozen changes and there is already a C++ function signature parser in the scraper.
17:15:26
drmeister
Once we convert CL_DEFMETHOD to generic function wrappers we can do these as well if they have signatures.
17:20:13
drmeister
The pointer type info is recorded in the tag and that can be used to construct a signature.
17:20:32
drmeister
{ TAGS:CL-EXTERN-DEFUN-TAG ((TAGS:FILE% . "/Users/meister/Development/clasp/src/llvmo/llvmoExpose.cc") (TAGS:LINE% . 2005) (TAGS:CHARACTER-OFFSET%) (TAGS:POINTER% . "(llvm::ConstantFP *(*)(llvm::LLVMContext &, const llvm::APFloat &)) &llvm::ConstantFP::get"))}
20:41:07
drmeister
I learned enough esrap to be dangerous and wrote an esrap parser for C++ function pointer syntax.
20:49:22
drmeister
And: (convert-function-ptr-to-c++-types (esrap:parse 'function-ptr "(llvm::ConstantFP *(*)(llvm::LLVMContext &, const llvm::APFloat &)) &llvm::ConstantFP::get"))
2:20:53
nicholas
thanks for responding. My question is how small and efficient does CLASP compile down to as standalone executables? I am looking for a lisp that will bundle into a small library for inclusing in mobile applications.?
2:21:42
Bike
among other problems, clasp is x86 64 only at the moment, you can't use it on an arm phone or anything
2:27:20
drmeister
Bike: The parser for pointer types is working now - when you provide the pointer type - then it creates a wrapper function. I added pointer types for all of the type functions
3:10:00
drmeister
I can't get timing on linut because it keeps failing at the exact same inexplicable place
3:11:12
drmeister
::notify Shinmera Is the disk full on linut? If not I've got another weird problem to deal with.
3:44:49
drmeister
All of the IRBuilder methods are going through LambdaListHandler_O and VariadicFunctors
3:46:49
drmeister
I know what to do - (1) I just don't have the time and (2) maybe you can find something wrong with what we are doing
3:47:28
drmeister
CL_DEFMETHOD and CL_EXTERN_DEFMETHOD. Most of the llvm methods that create instructions are CL_EXTERN_DEFMETHOD.
3:48:49
drmeister
We will extend the esrap parser for C++ method signatures and pointer to method signatures and hook them in as fastgf generic functions using satiation.
3:50:11
drmeister
Actually, most of them don't need to be redefined - so we could do something more compile-timey