diff options
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/compiler.boot | 6 | ||||
-rw-r--r-- | src/interp/parse.boot | 6 | ||||
-rw-r--r-- | src/interp/postpar.boot | 2 | ||||
-rw-r--r-- | src/interp/sys-macros.lisp | 3 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 1aa087cb..2d42c1fa 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -1454,6 +1454,11 @@ compExclusiveOr(x,m,e) == bT := comp(b,$EmptyMode,e) or return nil compResolveCall("xor",[aT,bT],m,bT.env) +compGreaterThan: (%Form, %Mode, %Env) -> %Maybe %Triple +compGreaterThan(x,m,e) == + x isnt [">", a, b] => nil + $normalizeTree and resolve(m,$Boolean) = $Boolean => comp(["<",b,a],m,e) + compForm(x,m,e) --% Case compCase: (%Form,%Mode,%Env) -> %Maybe %Triple @@ -2445,6 +2450,7 @@ for x in [["|", :"compSuchthat"],_ ["@", :"compAtSign"],_ [":", :"compColon"],_ ["::", :"compCoerce"],_ + [">", :"compGreaterThan"],_ ["QUOTE", :"compQuote"],_ ["add", :"compAdd"],_ ["CAPSULE", :"compCapsule"],_ diff --git a/src/interp/parse.boot b/src/interp/parse.boot index 92c040bd..f8491813 100644 --- a/src/interp/parse.boot +++ b/src/interp/parse.boot @@ -262,11 +262,6 @@ parseDropAssertions x == [y,:parseDropAssertions r] x -parseGreaterThan: %ParseForm -> %Form -parseGreaterThan t == - t isnt [op,x,y] => systemErrorHere ["parseGreaterThan",t] - [substitute("<",">",op),parseTran y,parseTran x] - parseGreaterEqual: %ParseForm -> %Form parseGreaterEqual u == parseTran ["not",[substitute("<",">=",first u),:rest u]] @@ -482,7 +477,6 @@ parseVCONS l == --% Register special parsers. for x in [["<=", :"parseLessEqual"],_ - [">", :"parseGreaterThan"],_ [">=", :"parseGreaterEqual"],_ ["^=", :"parseNotEqual"],_ [":", :"parseColon"],_ diff --git a/src/interp/postpar.boot b/src/interp/postpar.boot index 7a5ae403..e54d24fd 100644 --- a/src/interp/postpar.boot +++ b/src/interp/postpar.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2008, Gabriel Dos Reis. +-- Copyright (C) 2007-2009, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without diff --git a/src/interp/sys-macros.lisp b/src/interp/sys-macros.lisp index db4b08ec..4f237206 100644 --- a/src/interp/sys-macros.lisp +++ b/src/interp/sys-macros.lisp @@ -71,6 +71,9 @@ (defmacro |byteGreaterEqual| (|x| |y|) `(>= (the |%Byte| ,|x|) (the |%Byte| ,|y|))) +(defmacro |byteGreaterThan| (|x| |y|) + `(> (the |%Byte| ,|x|) (the |%Byte| ,|y|))) + ;; ;; -*- BigFloat Constructors -*- ;; |