This is the mail archive of the infinity@sourceware.org mailing list for the Infinity project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Language and note format changes coming up


This is all in https://github.com/gbenson/i8c now.  I'll spend some
time working with it next week and maybe release 0.0.2 if it's all
good.

Gary Benson wrote:
> Hi all,
> 
> I don't know if anybody is playing with Infinity yet, but I have some
> compatibility-breaking source language and note format changes in the
> pipeline.
> 
> SOURCE LANGUAGE
> ===============
> 
>  1. Operators with more than one argument (i.e. "name" and "cast"
>     will require a comma between their argument.  This is for
>     consistency with #3.  (I could make this optional, but pretty
>     much all source will need rewriting because of #2 so...)
> 
>  2. Externals will no longer be pushed onto the stack at function
>     entry.  You will need to use "load" to access them.
> 
>  3. As a shortcut, several operators will gain an optional first
>     argument which incorporates a "load".  e.g. instead of:
> 
>       load some::function
>       call
> 
>     you may use the shortcut:
> 
>       call some::function
> 
>     I'll likely add this to the branch operators too, so instead of:
> 
>       load NULL
>       beq label
> 
>     you can do:
> 
>       beq NULL, label
> 
>     The folded loads are optional (i.e. you can still use the original
>     form) and both will generate the same bytecode.
> 
> This is all basically because of #2.  Originally it seemed pushing
> externals onto the stack at function entry would minimize the
> differences between Infinity and "standard" DWARF, but actually it
> just means you have more things to keep track of while writing the
> notes.  I'd thought this change would result in longer notes (because
> of the extra operations to load the constants) but the ones I've
> converted are shorter because the extra operations are offset by
> not requiring so many stack-shuffling operations.
> 
> NOTE FORMAT
> ===========
> 
>  4. The "max_stack" field from the info chunk and the byteorder mark
>     field from the code chunk are being moved into a new code info
>     chunk with a type_id of 6.
> 
>  5. The info chunk now contains only the function's signature.  It's
>     being renamed the signature chunk with a type_id of 5.
> 
>  6. The code chunk now contains only bytecode and has had its version
>     bumped to 2 to indicate this.
> 
> Aside from a cleaner structure, this change makes it possible to add
> further information about the code.  Previously this would have had
> to go in the info chunk or in a new chunk--the code chunk was pretty
> much unmodifyable.  But that left the info chunk into a kind of
> kitchen sink, full of stuff that should really have been somewhere
> else.
>     
> I8X 0.0.2 will support 0.0.1's note format (with info and v1 code
> chunks) but this is deprecated and will be removed (probably just
> after 0.0.2 is released but certainly before 1.0.0).
> 
> I8X 0.0.2 will push externals onto the entry stack only if the code
> chunk in the note is version 1.  This also is deprecated and will
> be removed.
> 
> Cheers,
> Gary
> 
> --
> http://gbenson.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]