libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libjit] Recursive struct types


From: Gil Barbosa
Subject: Re: [Libjit] Recursive struct types
Date: Mon, 9 Apr 2018 00:33:42 -0300

Hi,

I had totally missed this line from `jit_type_set_tagged_type` docs: "This function is typically used to flesh out the body of a forward-declared type. The tag is used as a placeholder until the definition can be located."
Thank you very much, this seems exactly what I needed =]

Best regards,


2018-04-08 13:59 GMT-03:00 Aleksey Demakov <address@hidden>:
Hi,

On Sat, Apr 7, 2018 at 3:51 PM, Gil Barbosa <address@hidden> wrote:
>
> I want to know if there is a way to create struct types that contains fields
> that are pointer to other instances of itself, like linked lists.
> `jit_type_create_struct` expects the fields' types, so I don't know if I can
> create it beforehand and pass a pointer as a field.
>

The combination of jit_type_create_tagged() and
jit_type_set_tagged_type() calls should solve such a problem.

Regards,
Aleksey
​​
​Gil ​Barbosa Reis


reply via email to

[Prev in Thread] Current Thread [Next in Thread]