From 60cfbcfe19b208e2978c0e710179149b86ea4f55 Mon Sep 17 00:00:00 2001 From: Mark Friedman Date: Mon, 22 Aug 1988 20:33:53 +0000 Subject: [PATCH] Added support for the open coding of generic arithmetic. --- v7/src/compiler/rtlbase/rtlcon.scm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/v7/src/compiler/rtlbase/rtlcon.scm b/v7/src/compiler/rtlbase/rtlcon.scm index 7c4afd6ce..85f3251fb 100644 --- a/v7/src/compiler/rtlbase/rtlcon.scm +++ b/v7/src/compiler/rtlbase/rtlcon.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlbase/rtlcon.scm,v 4.9 1988/06/14 08:37:00 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/rtlbase/rtlcon.scm,v 4.10 1988/08/22 20:33:53 markf Exp $ Copyright (c) 1988 Massachusetts Institute of Technology @@ -523,5 +523,24 @@ MIT in each case. |# operator s-operand)))))) +(define-expression-method 'GENERIC-BINARY + (lambda (receiver scfg-append! operator operand1 operand2) + (expression-simplify* operand1 scfg-append! + (lambda (s-operand1) + (expression-simplify* operand2 scfg-append! + (lambda (s-operand2) + (receiver (rtl:make-generic-binary + operator + s-operand1 + s-operand2)))))))) + +(define-expression-method 'GENERIC-UNARY + (lambda (receiver scfg-append! operator operand) + (expression-simplify* operand scfg-append! + (lambda (s-operand) + (receiver (rtl:make-generic-unary + operator + s-operand)))))) + ;;; end EXPRESSION-SIMPLIFY package ) \ No newline at end of file -- 2.25.1