Complex stack objects

43 views
Skip to first unread message

Serg Ief

unread,
Mar 29, 2013, 5:09:09 PM3/29/13
to asmji...@googlegroups.com
Hi Petr, thank you for this nice library. I'm using it as my Jit compiler backend, and it works great.
My question, is there a way to allocate memory on stack for complex objects like structs or allocate some variables contiguously to be passed as array and than back converted to variables in callee code? If no, what do you think the best solution to implement this?
 
Thank you!

Petr Kobalíček

unread,
Mar 30, 2013, 8:59:36 PM3/30/13
to asmji...@googlegroups.com
Hi Serg,

currently there is no way how to allocate a memory inside a function,
but I think that this would be nice addition to asmjit.

I created an issue for it:

https://code.google.com/p/asmjit/issues/detail?id=84

I did extensive changes to asmjit recently and I'm preparing to commit
my work; after I finish I will add this feature.

Regarding the second part of the question, what exactly did you mean
by "an array converted to variables"?

Thanks:)

Best regards
Petr Kobalicek
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "asmjit-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to asmjit-dev+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Serg Ief

unread,
Mar 31, 2013, 6:13:37 AM3/31/13
to asmji...@googlegroups.com
Hi, thank you, memory allocation would be really nice feature.
 
The idea of second part of my question is that you can pass allocated array by pointer to it and than, in callee code, use parts of this array as initial data and memory storage for new variables. Those variables could be spilled back into array on return and all modifications could be visible by caller.
 
Thank you!
Reply all
Reply to author
Forward
0 new messages