Displaying 4 results from an estimated 4 matches for "myunionptr".
2010 Jan 15
2
[LLVMdev] [PATCH] - Union types, attempt 2
...extracted. But if you want to make it a bit
less syntactically noisy, and also allow the same flexibility that
getelementptr would allow in accessing a single member through a
pointer, you could allow
; Load/store of one particular union field
store i32 %myValue, union {i32, float}* %myUnionPtr
%fieldValue = load union {i32, float}* %myUnionPtr as i32
; %fieldValue == %myValue
Where I've added a preposition 'as' to the load instruction by analogy
with what the cast operators do with 'to'.
I don't know that I'd argue the point much, but offhand it &...
2010 Jan 16
0
[LLVMdev] [PATCH] - Union types, attempt 2
...to make it a bit
> less syntactically noisy, and also allow the same flexibility that
> getelementptr would allow in accessing a single member through a
> pointer, you could allow
>
> ; Load/store of one particular union field
> store i32 %myValue, union {i32, float}* %myUnionPtr
> %fieldValue = load union {i32, float}* %myUnionPtr as i32
> ; %fieldValue == %myValue
>
> Where I've added a preposition 'as' to the load instruction by analogy
> with what the cast operators do with 'to'.
>
> I don't know that I'd argu...
2010 Jan 15
0
[LLVMdev] [PATCH] - Union types, attempt 2
On Fri, Jan 15, 2010 at 12:41 AM, Joachim Durchholz <jo at durchholz.org>wrote:
> Talin schrieb:
>
> Well, the fact that union members have to be indexed by number means that
>> the ordering has to be part of the type - so even though type-theoretically
>> union { i32, float } is the same as union { float, i32 }, in my
>> implementation they are distinct types.
2010 Jan 15
2
[LLVMdev] [PATCH] - Union types, attempt 2
Talin schrieb:
> Well, the fact that union members have to be indexed by number means
> that the ordering has to be part of the type - so even though
> type-theoretically union { i32, float } is the same as union { float,
> i32 }, in my implementation they are distinct types. However, from the
> standpoint of a frontend, this is not a great concern, because the
> frontend