aboutsummaryrefslogtreecommitdiff
path: root/src/interp/c-util.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-05-25 02:41:40 +0000
committerdos-reis <gdr@axiomatics.org>2010-05-25 02:41:40 +0000
commitd08100e5c7cc7ebf2c30c490033f1ccd5b57fb86 (patch)
treeee7c772e820813fde4e02de79c2b545f936bfa17 /src/interp/c-util.boot
parent8993bc2fe00eb48b57945b850c14bde8fae1dfb7 (diff)
downloadopen-axiom-d08100e5c7cc7ebf2c30c490033f1ccd5b57fb86.tar.gz
* interp/g-util.boot (expandToVMForm): New. Export.
(getOpcodeExpander): move to here from c-util.boot. ($middleEndOpcodes): Likewise.
Diffstat (limited to 'src/interp/c-util.boot')
-rw-r--r--src/interp/c-util.boot10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot
index e496ad7c..bf47eecb 100644
--- a/src/interp/c-util.boot
+++ b/src/interp/c-util.boot
@@ -1069,21 +1069,13 @@ mutateLETFormWithUnaryFunction(form,fun) ==
$middleEndMacroList ==
'(COLLECT REPEAT SUCHTHATCLAUSE THETA THETA1 SPADREDUCE SPADDO)
-++ List of opcode-expander pairs.
-$middleEndOpcodes == nil
-
-++ Return the expander of a middle-end opcode, or nil if there is none.
-getOpcodeExpander op ==
- x := ASSOC(op,$middleEndOpcodes) => rest x
- nil
-
middleEndExpand: %Form -> %Form
middleEndExpand x ==
isAtomicForm x => x
[op,:args] := x
op in $middleEndMacroList =>
middleEndExpand MACROEXPAND_-1 x
- IDENTP op and (fun := getOpcodeExpander op) => apply(fun,args)
+ IDENTP op and (fun := getOpcodeExpander op) => apply(fun,x,nil)
a := middleEndExpand op
b := middleEndExpand args
EQ(a,op) and EQ(b,args) => x