From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93069 invoked by alias); 28 Oct 2015 10:24:56 -0000 Mailing-List: contact infinity-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: infinity-owner@sourceware.org Received: (qmail 92915 invoked by uid 89); 28 Oct 2015 10:24:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.98.7 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_20,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_20,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mx1.redhat.com Date: Wed, 28 Oct 2015 10:24:00 -0000 From: Gary Benson To: infinity@sourceware.org Subject: Language and note format changes coming up Message-ID: <20151028102450.GA32115@blade.nx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: Red Hat UK Ltd, 64 Baker Street, 4th Floor, W1U 7DF, UK. Registered in England and Wales (3798903) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-SW-Source: 2015-q4/txt/msg00003.txt.bz2 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/