RFC: Proc External Implementation Setting#3
RFC: Proc External Implementation Setting#3strandsofivy wants to merge 3 commits intoOpenDreamProject:mainfrom
Conversation
|
Echoing @alexkar598 |
My response here is very simple: JIT, static typing, compiler optimizations around external calls, and true C-ABI FFI, none of which can be done with call_ext. ( in other words call_ext is dynamically linked, this is not and can enable proper opts. |
|
Idea: instead of procs with /proc/my_global_proc(my_arg1 as num, my_arg2 as text)
return call_ext("constant_lib_string", "constant_function_string")(my_arg1, my_arg2) |
The thing is it's not a valid optimization anymore if this is done (due to call_ext semantics implying late loaded DLLs, among other issues), though this is a good polyfill to include in procs using the |
Something I just realized is, since Unix and Windows both ban |
the lib string can presumably be a path, so not really. |
i dont think they can? the reference does not mention this im down to do |
|
My main concern with this RFC is needing two separate As moony stated, this RFC has the potential for enabling optimizations down the road, but in its current state I don't think I'd sign off on it until my concern is addressed. That being said, per the RFC process I'm sharing this RFC with the wider community and setting the normal 1 week timer. Let's see if they have ideas. I'm also not fond of making it a list, since what would be a no-op in BYOND is now an error due to not being a constant. People could just use a wrapper macro, but I feel like there's a way we could make this work in both OD and BYOND if we could just come to a consensus on a delimiter between the library and the function name. If everyone else thinks it'd be better to just use a list and a wrapper macro, then I'll concede the point. Also whatever the consensus lands on, the |
|
Apparently custom #ifdef SPACEMAN_DMM
#define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X
#else
#define SHOULD_CALL_PARENT(X)
#endifEt cetera. So we'll need to do something similar and I'm back to being fine with the value being |


This RFC defines an alternative way to define and call external code in DM, using proc settings.
Not sure if I like the separate proc settings, I'd rather them be one, feel free to suggest a better way.