[Top][All Lists]

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

Re: Jitter: new stack primitive (or micro-primitive): quake

From: Jose E. Marchesi
Subject: Re: Jitter: new stack primitive (or micro-primitive): quake
Date: Thu, 28 Nov 2019 14:24:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Luca.
    On 2019-11-27 at 10:09 +0100, Jose E. Marchesi wrote:
    > Nice name for the instruction :)
    > I updated the jitter submodule reference to the tag v0.9.204 and added a
    > quake instruction to the PVM, along with a rewrite rule for rot;swap ->
    > quake.
    I have looked at your manually written instructions, and saw several
    opportunities for simplification.  It is true that you can achieve
    exactly the same performance with rewrite rules (another is
    swap;over -> tuck ), but to me the main motivation is readability; I
    find some of the stack juggling in Poke quite difficult to follow.
    I am bothered by dup rot dup rot , for example.
    If you are not against this kind of change I will prepare a patch, but
    please do not accept it just to please me: you should retain full
    control over the esthetics in Poke.

Yes sure, I will welcome patches in that direction.

The rewrite rule is already working well in compiler-generated code.
See for example:

(poke) defun foo = void: { string @ 2#B = "foo"; }
(poke) .vm dis f foo
        note   "foo"
        push   "foo"
        push   null
        push   0x10UL
        push   0x1UL
        popf   1
        push   null

Note the quake :)

reply via email to

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