Replies: 1 comment
-
Agreed - we could improve the documentation. Let's create an issue for this. But to briefly describe it here: by far, the biggest difference is that Another thing to mention:
I think the issue is reversed here: with the current structure, we must inline all the code and that's why we can't support cycles. If we find a way how not to inline some code (the
As mentioned above, We could introduce instructions in the future which would allow copying segments of memory within and between contexts, but for each memory location copied, we's still need to insert a read and a write entry into the memory trace - so, it doesn't save a lot. Right now, the approach for passing lots of data between contexts is to use |
Beta Was this translation helpful? Give feedback.
-
I think first and foremost, I think it would be helpful to have some documentation on when one would choose
call
vsexec
, as aside from the execution context change, the only other difference appears to be thatexec
inlines the callee at the call site, whereascall
does not - but it isn't clear to me that this is a meaningful difference. On the surface, being able to call a function without inlining it appears like it would be useful since it would allow cycles in the call graph (i.e. A calls B which calls C which calls B, which then returns all the way back up to A); but that isn't supported today, unfortunately.On a related note, something that seems to be missing is a
call
operation which lets the callee inherit the callers execution context (or perhaps a portion of it, maybe based on something akin to capabilities). Without one, it looks to me like it is impossible to pass large values into a new context (e.g. a string or large structure allocated in global memory). One other option might be to make execution contexts a first class value in MASM, such that you can create/destroy a context, allocate in it, and either pass it around or be able to provide it tocall
in place of a "fresh" context. At a high level though, the basic issue is that there doesn't appear to be a way to call an external procedure with large values, unless I'm missing something.Beta Was this translation helpful? Give feedback.
All reactions