public inbox for infinity@sourceware.org
 help / color / mirror / Atom feed
From: Gary Benson <gbenson@redhat.com>
To: infinity@sourceware.org
Subject: Language and note format changes coming up
Date: Wed, 28 Oct 2015 10:24:00 -0000	[thread overview]
Message-ID: <20151028102450.GA32115@blade.nx> (raw)

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/

             reply	other threads:[~2015-10-28 10:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 10:24 Gary Benson [this message]
2015-11-06 16:09 ` Gary Benson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151028102450.GA32115@blade.nx \
    --to=gbenson@redhat.com \
    --cc=infinity@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).