[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [epsilon-devel] How to write a simple code generation which is not t
From: |
Jose E. Marchesi |
Subject: |
Re: [epsilon-devel] How to write a simple code generation which is not terrible |
Date: |
Thu, 31 Jan 2019 12:55:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
It is funny how primitives nested more deeply still get compiled to
temporaries in the correct order, left-to-right, with no effort:
print (1 + 2) * (3 - 4)
plus 1 2 %s
minus 3 4 %s
times %s %s %s
print %s
exitvm
Let's take plus 1 2 %s, for example. Would Jitter generate pushes for 1
and 2? What would be instruction definition look for the `plus'?
Also, how would this support non-consuming instructions? Using an
instruction attribute?