From 95a01c8b0ae5635b456e34d95bc7b0570a1952b8 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Fri, 23 Jul 2010 15:50:13 +0000 Subject: * interp/g-util.boot: Remove expansion for %ble, %bgt, %bge. * interp/g-opt.boot (optMINUS): Remove. (opt_-): Likewise. (optBle): New. (optBgt): Likewise. (optBge): Likewise. --- src/interp/g-opt.boot | 24 +++++++++++++++++------- src/interp/g-util.boot | 12 ------------ 2 files changed, 17 insertions(+), 19 deletions(-) (limited to 'src/interp') diff --git a/src/interp/g-opt.boot b/src/interp/g-opt.boot index 887cbb94..543cf45e 100644 --- a/src/interp/g-opt.boot +++ b/src/interp/g-opt.boot @@ -445,12 +445,6 @@ optQSMINUS u == u u -opt_- u == - u is ['_-,v] => - integer? v => -v - u - u - ++ List of VM side effect free operators. $VMsideEffectFreeOperators == '(CAR CDR LENGTH SIZE EQUAL EQL EQ NOT NULL OR AND @@ -696,6 +690,20 @@ optIgt x == optIge x == optNot ['%not,optIlt ['%ilt,second x,third x]] +--% Byte operations + +optBle ['%ble,a,b] == + optNot ['%not,['%blt,b,a]] + +optBgt ['%bgt,a,b] == + ['%blt,b,a] + +optBge ['%bge,a,b] == + optBle ['%ble,b,a] + + + + --% Integer operations optIadd(x is ['%iadd,a,b]) == @@ -726,6 +734,9 @@ for x in '( (%call optCall) _ (%not optNot)_ (%and optAnd)_ (%or optOr)_ + (%ble optBle)_ + (%bgt optBgt)_ + (%bge optBge)_ (%ieq optIeq)_ (%ilt optIlt)_ (%ile optIle)_ @@ -737,7 +748,6 @@ for x in '( (%call optCall) _ (%imul optImul)_ (LIST optLIST)_ (QSMINUS optQSMINUS)_ - (_- opt_-)_ (SPADCALL optSPADCALL)_ (_| optSuchthat)_ (CATCH optCatch)_ diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 4f840c3b..5889fc2a 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -231,15 +231,6 @@ expandBefore? ['%before?,x,y] == ['GGREATERP,expandToVMForm y,expandToVMForm x] -- Byte operations -expandBle ['%ble,x,y] == - expandToVMForm ['%not,['%blt,y,x]] - -expandBgt ['%bgt,x,y] == - expandToVMForm ['%blt,y,x] - -expandBge ['%bge,x,y] == - expandToVMForm ['%not,['%blt,x,y]] - expandBcompl ['%bcompl,x] == integer? x => 255 - x ['_+,256,['LOGNOT,expandToVMForm x]] @@ -442,9 +433,6 @@ for x in [ ['%loop, :function expandLoop], ['%return, :function expandReturn], - ['%ble, :function expandBle], - ['%bgt, :function expandBgt], - ['%bge, :function expandBge], ['%bcompl, :function expandBcompl], ['%ieq, :function expandIeq], -- cgit v1.2.3