aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Dos Reis <GabrielDosReis@users.noreply.github.com>2022-08-30 01:54:45 -0700
committerGitHub <noreply@github.com>2022-08-30 01:54:45 -0700
commitc6187dc679a536686afbdeb0999346699df625ce (patch)
treefa641abe792d45e944a15a175768b5bd71431de5
parent858498e27c7266675e81850c8bda624f6ae89429 (diff)
downloadopen-axiom-c6187dc679a536686afbdeb0999346699df625ce.tar.gz
Use `LETT` less often (#22)
This patch has the Lisp backend use less often the `LETT` opcode. In fact, it is no longer used by the Spad compiler codegen. However, a few cases in the interpreter continues to use it.
-rw-r--r--src/interp/lisp-backend.boot9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot
index 8894db4f..722fa9b0 100644
--- a/src/interp/lisp-backend.boot
+++ b/src/interp/lisp-backend.boot
@@ -842,11 +842,14 @@ massageBackendCode x ==
atomic? x => nil
-- temporarily have TRACELET report MAKEPROPs.
if (u := first x) = "MAKEPROP" and $TRACELETFLAG then
- x.first := "MAKEPROP-SAY"
+ x.op := "MAKEPROP-SAY"
u in '(DCQ SPADLET SETQ %LET) =>
if u in '(SPADLET %LET) then
- append!(x,$FUNNAME__TAIL)
- x.first := "LETT"
+ if x.args is [y,.] and ident? y then
+ x.op := "SETQ"
+ else
+ x.op := "LETT"
+ append!(x,$FUNNAME__TAIL)
massageBackendCode CDDR x
if u ~= "SETQ" then
ident? second x => pushLocalVariable second x