search for: boundmethod

Displaying 2 results from an estimated 2 matches for "boundmethod".

2005 Oct 28
3
[LLVMdev] "Bound Methods" in LLVM Bytecode
...) functionObject->functionPointer() The challenge is that if "method" is actually a method, calling it magically adds "a" as the first parameter. If it is NOT a method, then no messing with the arguments occurs. As far as can tell, this forces an implementation to create BoundMethod objects that wrap the actual method calls. The question is, how can I implement this efficiently, ideally using LLVM? My idea is to add a NULL pointer as the first parameter to all function calls. "Normal" functions would ignore it, but methods would look at the first parameter to fi...
2005 Oct 29
0
[LLVMdev] "Bound Methods" in LLVM Bytecode
...nPointer() > > > The challenge is that if "method" is actually a method, calling it magically > adds "a" as the first parameter. If it is NOT a method, then no messing with > the arguments occurs. As far as can tell, this forces an implementation to > create BoundMethod objects that wrap the actual method calls. The question > is, how can I implement this efficiently, ideally using LLVM? Okay. One simple option would be to insert code like this: if (isamethod(functionObject)) functionObject->functionPointer(a) else functionObject->functionPointe...