diff options
29 files changed, 107 insertions, 80 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d35a3d4a..8db800a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,30 @@ +2011-01-18 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/vmlisp.lisp (FIXP): Remove. + * interp/alql.boot: Use integer? instead of FIXP. + * interp/br-con.boot: Likewise. + * interp/br-op1.boot: Likewise. + * interp/c-util.boot: Likewise. + * interp/fnewmeta.lisp: Likewise. + * interp/ht-root.boot: Likewise. + * interp/i-analy.boot: Likewise. + * interp/i-syscmd.boot: Likewise. + * interp/i-toplev.boot: Likewise. + * interp/interop.boot: Likewise. + * interp/lisplib.boot: Likewise. + * interp/mark.boot: Likewise. + * interp/newfort.boot: Likewise. + * interp/nrunfast.boot: Likewise. + * interp/pspad1.boot: Likewise. + * interp/setvars.boot: Likewise. + * interp/showimp.boot: Likewise. + * interp/slam.boot: Likewise. + * interp/topics.boot: Likewise. + * interp/trace.boot: Likewise. + * interp/wi1.boot: Likewise. + * interp/wi2.boot: Likewise. + * interp/word.boot: Likewise. + 2011-01-02 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/g-util.boot: Expand new bit vector operators. diff --git a/src/algebra/formula.spad.pamphlet b/src/algebra/formula.spad.pamphlet index 27ebc1ed..384fad69 100644 --- a/src/algebra/formula.spad.pamphlet +++ b/src/algebra/formula.spad.pamphlet @@ -400,7 +400,7 @@ ScriptFormulaFormat(): public == private where i : Integer ATOM(expr)$Lisp pretend Boolean => str := stringify expr - FIXP(expr)$Lisp => + %integer?(expr)$Foreign(Builtin) => i := expr : Integer if (i < 0) or (i > 9) then group str else str (i := position(str,specialStrings)) > 0 => diff --git a/src/algebra/mathml.spad.pamphlet b/src/algebra/mathml.spad.pamphlet index 4b22db37..9bf7e720 100644 --- a/src/algebra/mathml.spad.pamphlet +++ b/src/algebra/mathml.spad.pamphlet @@ -1333,7 +1333,7 @@ have to be switched by swapping names. str := stringify expr len := #str -- this bit seems to deal with integers - FIXP$Lisp expr => + %integer?(expr)$Foreign(Builtin) => i := expr pretend Integer if (i < 0) or (i > 9) then diff --git a/src/algebra/tex.spad.pamphlet b/src/algebra/tex.spad.pamphlet index 53c69b0b..342107d5 100644 --- a/src/algebra/tex.spad.pamphlet +++ b/src/algebra/tex.spad.pamphlet @@ -583,7 +583,7 @@ TexFormat(): public == private where ATOM(expr)$Lisp pretend Boolean => str := stringify expr len := #str - FIXP$Lisp expr => + %integer?(expr)$Foreign(Builtin) => i := expr pretend Integer if (i < 0) or (i > 9) then diff --git a/src/interp/alql.boot b/src/interp/alql.boot index 242425a1..59d25d42 100644 --- a/src/interp/alql.boot +++ b/src/interp/alql.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -41,15 +41,18 @@ getBrowseDatabase(kind) == grepConstruct('"*",INTERN kind) stringMatches?(pattern,subject) == - FIXP basicMatch?(pattern,subject) => true + integer? basicMatch?(pattern,subject) => true false + alqlGetKindString(x) == x.0 = char 'a or x.0 = char 'o => subString(dbPart(x,5,1),0,1) subString(x,0,1) + alqlGetOrigin(x) == field :=dbPart(x,5,1) k := charPosition(char '_(,field,2) subString(field,1,k-1) + alqlGetParams(x) == field :=dbPart(x,5,1) k := charPosition(char '_(,field,2) diff --git a/src/interp/br-con.boot b/src/interp/br-con.boot index 6ac7cef4..df066221 100644 --- a/src/interp/br-con.boot +++ b/src/interp/br-con.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -875,7 +875,7 @@ dbGetDocTable(op,$sig,docTable,$which,aux) == main where --docTable is [[origin,entry1,...,:code] ...] where -- each entry is [sig,doc] and code is NIL or else a topic code for op main() == - if null FIXP op and + if not integer? op and digit?((s := STRINGIMAGE op).0) then op := string2Integer s -- the above hack should be removed after 3/94 when 0 is not |0| aux is [[packageName,:.],:pred] => diff --git a/src/interp/br-op1.boot b/src/interp/br-op1.boot index c3ea7a5a..8702d880 100644 --- a/src/interp/br-op1.boot +++ b/src/interp/br-op1.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -98,7 +98,7 @@ reduceByGroup(htPage,opAlist) == res := [[op,:newItems] for [op,:items] in opAlist | newItems] where newItems() == null bitNumber => items - [x for x in items | FIXP (code := myLastAtom x) and LOGBITP(bitNumber,code)] + [x for x in items | integer? (code := myLastAtom x) and LOGBITP(bitNumber,code)] res @@ -864,7 +864,7 @@ dbExpandOpAlistIfNecessary(htPage,opAlist,which,needOrigins?,condition?) == dbGetDocTable(op,sig,docTable,which,nil) origin := IFCAR u or origin docCode := IFCDR u --> (doc . code) --- if not FIXP rest docCode then harhar(op) --> +-- if not integer? rest docCode then harhar(op) --> if null doc and which = '"attribute" then doc := getRegistry(op,sig) tail.rest := [origin,isExposedConstructor opOf origin,:docCode] $value => return $value diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index cc3f2f64..cfb68f21 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -109,7 +109,7 @@ $optExportedFunctionReference := false ++ Quote form, if not a basic value. quoteMinimally form == - FIXP form or string? form or form = nil or form = true => form + integer? form or string? form or form = nil or form = true => form ["QUOTE",form] ++ If using old `Rep' definition semantics, return `$' when m is `Rep'. @@ -1626,7 +1626,7 @@ isFormal x == ++ Expand the form at position `slot' in the domain template `shell' ++ with argument list `args'. expandFormTemplate(shell,args,slot) == - FIXP slot => + integer? slot => slot = 0 => "$" slot = 2 => "$$" expandFormTemplate(shell,args,getShellEntry(shell,slot)) @@ -1642,7 +1642,7 @@ expandFormTemplate(shell,args,slot) == ++ Compare the form at `slot' in the domain templare `shell' ++ for equality with `form'. equalFormTemplate(shell,args,slot,form) == - FIXP slot => + integer? slot => slot = 0 => form = "$" slot = 2 => form = "$$" equalFormTemplate(shell,args,getShellEntry(shell,slot),form) @@ -1680,7 +1680,7 @@ getFunctionTemplate(sig,start,end,shell,args,funDesc) == for k in i.. for t in sig] => nil -- Grab the location of this match loc := - FIXP loc => "ambiguous" + integer? loc => "ambiguous" funDesc.(i + n + 1) start := start + n + 4 loc @@ -1744,7 +1744,7 @@ lookupDefiningFunction(op,sig,dc) == fun is [.,.,[.,["dispatchFunction",fun'],.]] => fun' -- 6.2. An inherited function? fun is [idx,:.] => - not FIXP idx => nil -- a UFO? + not integer? idx => nil -- a UFO? loc := funDesc.(idx + 1) if loc = 0 then loc := 5 shell.loc = nil => nil diff --git a/src/interp/fnewmeta.lisp b/src/interp/fnewmeta.lisp index ae518dcd..875a6875 100644 --- a/src/interp/fnewmeta.lisp +++ b/src/interp/fnewmeta.lisp @@ -1,6 +1,6 @@ ;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ;; All rights reserved. -;; Copyright (C) 2007-2010, Gabriel Dos Reis. +;; Copyright (C) 2007-2011, Gabriel Dos Reis. ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without @@ -611,10 +611,10 @@ (DEFUN |PARSE-FloatBase| () - (OR (AND (FIXP (CURRENT-SYMBOL)) (CHAR-EQ (CURRENT-CHAR) ".") + (OR (AND (INTEGERP (CURRENT-SYMBOL)) (CHAR-EQ (CURRENT-CHAR) ".") (CHAR-NE (NEXT-CHAR) ".") (|PARSE-IntegerTok|) (MUST (|PARSE-FloatBasePart|))) - (AND (FIXP (CURRENT-SYMBOL)) + (AND (INTEGERP (CURRENT-SYMBOL)) (CHAR-EQ (CHAR-UPCASE (CURRENT-CHAR)) 'E) (|PARSE-IntegerTok|) (PUSH-REDUCTION '|PARSE-FloatBase| 0) (PUSH-REDUCTION '|PARSE-FloatBase| 0)) diff --git a/src/interp/ht-root.boot b/src/interp/ht-root.boot index 928f6f4a..8fb7e57b 100644 --- a/src/interp/ht-root.boot +++ b/src/interp/ht-root.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -114,7 +114,7 @@ htSystemVariables() == main where htSetSystemVariableKind(htPage,[variable,name,fun]) == value := htpLabelInputString(htPage,name) if string? value and fun then value := FUNCALL(fun,value) ---SCM::what to do??? if not FIXP value then userError ??? +--SCM::what to do??? if not integer? value then userError ??? setDynamicBinding(variable,value) htSystemVariables () diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot index 7b44377d..6a75ba52 100644 --- a/src/interp/i-analy.boot +++ b/src/interp/i-analy.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -629,7 +629,7 @@ bottomUpForm0(t,op,opName,argl,argModeSetList) == (opName ~= "elt") and (opName ~= "apply") and isEltable(op, argl, #argl) and (u := bottomUpElt t) => u - if FIXP $HTCompanionWindowID then + if integer? $HTCompanionWindowID then mkCompanionPage('operationError, t) amsl := printableArgModeSetList() diff --git a/src/interp/i-syscmd.boot b/src/interp/i-syscmd.boot index 9af626d0..66f72f73 100644 --- a/src/interp/i-syscmd.boot +++ b/src/interp/i-syscmd.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -2647,7 +2647,7 @@ undo(l) == first l if IDENTP n then n := readInteger PNAME n - if not FIXP n then userError '"undo argument must be an integer" + if not integer? n then userError '"undo argument must be an integer" $InteractiveFrame := undoSteps(undoCount n,undoWhen) nil diff --git a/src/interp/i-toplev.boot b/src/interp/i-toplev.boot index 232a8751..616a8bf8 100644 --- a/src/interp/i-toplev.boot +++ b/src/interp/i-toplev.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -202,7 +202,7 @@ recordAndPrint(x,md) == if $printTimeIfTrue or $printTypeIfTrue then printTypeAndTime(x',md') if $printStorageIfTrue then printStorage() if $printStatisticsSummaryIfTrue then printStatisticsSummary() - if FIXP $HTCompanionWindowID then mkCompanionPage md + if integer? $HTCompanionWindowID then mkCompanionPage md $mkTestFlag = true => recordAndPrintTest md $runTestFlag => $mkTestOutputType := md diff --git a/src/interp/interop.boot b/src/interp/interop.boot index 97f2e827..2722de20 100644 --- a/src/interp/interop.boot +++ b/src/interp/interop.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -540,7 +540,7 @@ HasAttribute(domain,attrib) == vector? domain => hashType(domain.0,0) hashType(domain,0) isDomain domain => - FIXP((first domain).0) => + integer?((first domain).0) => -- following call to hashType was missing 2nd arg. -- getDomainHash domain added on 4/01/94 by RSS basicLookup("%%",hashType(attrib, hashPercent),domain,domain) @@ -593,7 +593,7 @@ HasCategory(domain,catform') == catform' is ['SIGNATURE,:f] => HasSignature(domain,f) catform' is ['ATTRIBUTE,f] => HasAttribute(domain,f) isDomain domain => - FIXP((first domain).0) => + integer?((first domain).0) => catform' := devaluate catform' basicLookup("%%",catform',domain,domain) HasCategory(CDDR domain, catform') diff --git a/src/interp/lisplib.boot b/src/interp/lisplib.boot index f95cacdb..7b9c556a 100644 --- a/src/interp/lisplib.boot +++ b/src/interp/lisplib.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -566,7 +566,7 @@ findConstructorSlotNumber(domainForm,domain,op,sig) == tail:= or/[r for [[op1,sig1],:r] in domain.1 | op=op1 and nsig=#sig1 and "and"/[compare for a in sig for b in sig1]] where compare() == a=b => true - FIXP b => a=constructorArglist.b + integer? b => a=constructorArglist.b isSubset(bustUnion a,bustUnion b,$CategoryFrame) tail is [.,["ELT",.,n]] => n systemErrorHere ["findConstructorSlotNumber",domainForm] @@ -592,7 +592,7 @@ sigsMatch(sig,sig1,domainForm) == while sig and sig1 repeat partsMatch:= (item:= first sig)=(item1:= first sig1) => true --ok, go to next iteration - FIXP item1 => item = domainForm.item1 --item1=n means nth arg + integer? item1 => item = domainForm.item1 --item1=n means nth arg isSubset(bustUnion item1,bustUnion item,$CategoryFrame) null partsMatch => return nil sig:= rest sig; sig1 := rest sig1 diff --git a/src/interp/mark.boot b/src/interp/mark.boot index 332a2bf5..868cf7f5 100644 --- a/src/interp/mark.boot +++ b/src/interp/mark.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -564,8 +564,8 @@ markRecord(source,target,u) == if source='Rep and target='_$ then target := 'per item := first u - FIXP item or item = $One or item = $Zero => nil - item is ["-",a] and (FIXP a or a = $One or a = $Zero) => nil + integer? item or item = $One or item = $Zero => nil + item is ["-",a] and (integer? a or a = $One or a = $Zero) => nil string? item => nil item is [op,.,t] and op in '( _:_: _@ _pretend) and macroExpand(t,$e) = target => nil @@ -786,7 +786,7 @@ markInsertChanges(code,form,t,loc) == op in '(_: _pretend) => form op = code and b = t => form markNumCheck(code,form,t) - FIXP form and MEMQ(opOf t,$markPrimitiveNumbers) => ['_@,form,t] + integer? form and MEMQ(opOf t,$markPrimitiveNumbers) => ['_@,form,t] [code,form,t] code in '(_@ _:_: _:) and form is [op,a] and (op='rep and t = 'Rep or op='per and t = "$") => form @@ -798,15 +798,15 @@ markInsertChanges(code,form,t,loc) == t = 'per and form is ["rep",:.] => second form [t,form] code is [op,x,t1] and op in '(_@ _: _:_: _pretend) and t1 = t => form - FIXP form and MEMQ(opOf t,$markPrimitiveNumbers) => ['_@,form,t] + integer? form and MEMQ(opOf t,$markPrimitiveNumbers) => ['_@,form,t] markNumCheck("::",form,t) markNumCheck(op,form,t) == op = "::" and opOf t in '(Integer) => s := form = $One and 1 or form = $Zero and 0 => ['DOLLAR, s , t] - FIXP form => ["@", form, t] - form is ["-", =$One] => ['DOLLAR, -1, t] - form is ["-", n] and FIXP n => ["@", MINUS n, t] + integer? form => ["@", form, t] + form is ["-", =$One] => ['DOLLAR, -1, t] + form is ["-", n] and integer? n => ["@", MINUS n, t] [op, form, t] [op,form,t] diff --git a/src/interp/newfort.boot b/src/interp/newfort.boot index eb4864fe..0f98b0c6 100644 --- a/src/interp/newfort.boot +++ b/src/interp/newfort.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -803,7 +803,7 @@ fortPre1 e == [rand,exponent] := args rand = "%e" => fortPre1 ["exp", exponent] (IDENTP rand or string? rand) and exponent=2 => ["*", rand, rand] - (FIXP exponent and abs(exponent) < 32768) => ["**",fortPre1 rand,exponent] + (integer? exponent and abs(exponent) < 32768) => ["**",fortPre1 rand,exponent] ["**", fortPre1 rand,fortPre1 exponent] op = "ROOT" => #args = 1 => fortPreRoot ["sqrt", first args] diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot index 1d9151d3..8a2fa6b8 100644 --- a/src/interp/nrunfast.boot +++ b/src/interp/nrunfast.boot @@ -93,7 +93,7 @@ evalSlotDomain(u,dollar) == $lookupDefaults : local := false -- new world u = '$ => dollar u = "$$" => dollar - FIXP u => + integer? u => y := dollar.u vector? y => y y is ["setShellEntry",:.] => eval y diff --git a/src/interp/property.lisp b/src/interp/property.lisp index 10c0f2ac..e0330995 100644 --- a/src/interp/property.lisp +++ b/src/interp/property.lisp @@ -126,6 +126,6 @@ (FLAG '(* + AND OR PROGN) 'NARY) -(MAKEPROP 'INTEGER 'ISFUNCTION 'FIXP) +(MAKEPROP 'INTEGER 'ISFUNCTION 'INTEGERP) (MAKEPROP '|Integer| '|isFunction| '|IsInteger|) (MAKEPROP '|Boolean| '|isFunction| '|isBoolean|) diff --git a/src/interp/pspad1.boot b/src/interp/pspad1.boot index 10461cc9..9d6c301b 100644 --- a/src/interp/pspad1.boot +++ b/src/interp/pspad1.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -278,7 +278,7 @@ format(x,:options) == formatForm x formatAtom x null newCOrNil => ($c:= oldC; nil) - null FIXP newCOrNil => error() + not integer? newCOrNil => error() $c:= newCOrNil diff --git a/src/interp/setvars.boot b/src/interp/setvars.boot index fe18b1b2..19f8a1ba 100644 --- a/src/interp/setvars.boot +++ b/src/interp/setvars.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -227,7 +227,7 @@ set1(l,setTree) == -- validate the option, allowing the user to set the default arg2 := num := l.1 - (FIXP num) and (num >= (setData.setLeaf).0) and + (integer? num) and (num >= (setData.setLeaf).0) and (null (upperlimit := setData.setLeaf.1) or num <= upperlimit) => num selectOption(l.1,['default,:setData.setLeaf],nil) if arg2 = 'DEFAULT @@ -763,7 +763,7 @@ setFunctionsCache arg == TERPRI() sayAllCacheCounts() n := first arg - (n ~= 'all) and ((not FIXP n) or (n < 0)) => + (n ~= 'all) and ((not integer? n) or (n < 0)) => sayMessage ['"Your value of",:bright n,'"is invalid because ..."] describeSetFunctionsCache() terminateSystemCommand() @@ -1705,7 +1705,7 @@ setStreamsCalculate arg == (null arg) or (arg = "%describe%") or (first arg = '_?) => describeSetStreamsCalculate() n := first arg - (n ~= 'all) and ((not FIXP n) or (n < 0)) => + (n ~= 'all) and ((not integer? n) or (n < 0)) => sayMessage ['"Your value of",:bright n,'"is invalid because ..."] describeSetStreamsCalculate() terminateSystemCommand() diff --git a/src/interp/showimp.boot b/src/interp/showimp.boot index f60160d8..42164485 100644 --- a/src/interp/showimp.boot +++ b/src/interp/showimp.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -57,7 +57,7 @@ showImp(dom,:options) == --sort into 4 groups: domain exports, unexports, default exports, others for (x := [.,.,:key]) in u repeat key = domainForm => domexports := [x,:domexports] - FIXP key => unexports := [x,:unexports] + integer? key => unexports := [x,:unexports] isDefaultPackageForm? key => defexports := [x,:defexports] key = 'nowhere => nowheres := [x,:nowheres] key = 'constant => constants := [x,:constants] @@ -155,7 +155,7 @@ getDomainExtensionsOfDomain domain == devaluateSlotDomain(u,dollar) == u = '$ => devaluate dollar - FIXP u and vector? (y := dollar.u) => devaluate y + integer? u and vector? (y := dollar.u) => devaluate y u is ['NRTEVAL,y] => MKQ eval y u is ['QUOTE,y] => u u is [op,:argl] => [op,:[devaluateSlotDomain(x,dollar) for x in argl]] @@ -194,7 +194,7 @@ showDomainsOp1(u,key) == getDomainRefName(dom,nam) == cons? nam => [getDomainRefName(dom,x) for x in nam] - not FIXP nam => nam + not integer? nam => nam slot := dom.nam vector? slot => slot.0 slot is ["setShellEntry",:.] => @@ -247,7 +247,7 @@ formatLazyDomain(dom,x) == formatLazyDomainForm(dom,x) == x = 0 => ["$"] - FIXP x => formatLazyDomain(dom,dom.x) + integer? x => formatLazyDomain(dom,dom.x) atom x => x x is ['NRTEVAL,y] => (atom y => [y]; y) [first x,:[formatLazyDomainForm(dom,y) for y in rest x]] diff --git a/src/interp/slam.boot b/src/interp/slam.boot index cc71b84b..3adb29c9 100644 --- a/src/interp/slam.boot +++ b/src/interp/slam.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -156,7 +156,7 @@ reportFunctionCompilation(op,nam,argl,body,isRecursive) == compileInteractive [nam,["LAMBDA",parms,body]] nam num := - FIXP cacheCount => + integer? cacheCount => cacheCount < 1 => keyedSystemError("S2IM0019",[cacheCount,op]) cacheCount diff --git a/src/interp/topics.boot b/src/interp/topics.boot index c3b2daae..6d1f63a6 100644 --- a/src/interp/topics.boot +++ b/src/interp/topics.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -198,7 +198,7 @@ tdAdd(con,hash) == v := HGET($conTopicHash,con) u := addTopic2Documentation(con,v) --u := getConstructorDocumentationFromDB con - for pair in u | FIXP (code := myLastAtom pair) and (op := first pair) ~= 'construct repeat + for pair in u | integer? (code := myLastAtom pair) and (op := first pair) ~= 'construct repeat for x in (names := code2Classes code) repeat HPUT(hash,x,insert(op,HGET(hash,x))) tdPrint hash == @@ -238,7 +238,7 @@ transferClassCodes(conform,opAlist) == transferCodeCon(con,opAlist) == for pair in getConstructorDocumentationFromDB con - | FIXP (code := myLastAtom pair) repeat + | integer? (code := myLastAtom pair) repeat u := ASSOC(pair.op,opAlist) => lastNode(u).rest := code --======================================================================= @@ -248,12 +248,12 @@ transferCodeCon(con,opAlist) == filterByTopic(opAlist,topic) == bitNumber := HGET($topicHash,topic) [x for x in opAlist - | FIXP (code := myLastAtom x) and LOGBITP(bitNumber,code)] + | integer? (code := myLastAtom x) and LOGBITP(bitNumber,code)] listOfTopics(conname) == doc := getConstructorDocumentationFromDB conname u := ASSOC('constructor,doc) or return nil code := myLastAtom u ---null FIXP code => nil +--not integer? code => nil mySort [key for key in HKEYS($topicHash) | LOGBITP(HGET($topicHash,key),code)] diff --git a/src/interp/trace.boot b/src/interp/trace.boot index 626747af..1715ddc0 100644 --- a/src/interp/trace.boot +++ b/src/interp/trace.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -199,10 +199,10 @@ getTraceOption (x is [key,:l]) == l is [a] => [key,:l] stackTraceOptionError ["S2IT0011",[strconc('")",object2String key)]] key='depth => - l is [n] and FIXP n => x + l is [n] and integer? n => x stackTraceOptionError ["S2IT0012",['")depth"]] key='count => - (null l) or (l is [n] and FIXP n) => x + (null l) or (l is [n] and integer? n) => x stackTraceOptionError ["S2IT0012",['")count"]] key="of" => ["of",:[hn y for y in l]] where @@ -261,7 +261,7 @@ pcounters() == transOnlyOption l == l is [n,:y] => - FIXP n => [n,:transOnlyOption y] + integer? n => [n,:transOnlyOption y] MEMQ(n:= UPCASE n,'(V A C)) => [n,:transOnlyOption y] stackTraceOptionError ["S2IT0006",[n]] transOnlyOption y @@ -448,7 +448,7 @@ spadTrace(domain,options) == --new form is (<op> <signature> <slotNumber> <condition> <kind>) for [op,sig,n,.,kind] in opStructureList | kind = 'ELT and (anyifTrue or MEMQ(op,listOfOperations)) and - FIXP n and + integer? n and isTraceable(triple:= [op,sig,n],domain)] where isTraceable(x is [.,.,n,:.],domain) == atom domain.n => nil diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp index 70426163..322f703c 100644 --- a/src/interp/vmlisp.lisp +++ b/src/interp/vmlisp.lisp @@ -141,9 +141,6 @@ (defmacro fetchchar (x i) `(char ,x ,i)) -(defmacro fixp (x) - `(integerp ,x)) - (defmacro greaterp (&rest args) `(> ,@args)) diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot index d6e3b5c0..bc72afb4 100644 --- a/src/interp/wi1.boot +++ b/src/interp/wi1.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -343,8 +343,8 @@ compAtom(x,m,e) == modeIsAggregateOf('Vector,m,e) is [.,R]=> compVector(x,['Vector,R],e) T => convert(T,m) --> - FIXP x and opOf m in '(Integer NonNegativeInteger PositiveInteger SmallInteger) => markAt [x,m,e] --- FIXP x and (T := [x, $Integer,e]) and (T' := convert(T,m)) => markAt(T, T') + integer? x and opOf m in '(Integer NonNegativeInteger PositiveInteger SmallInteger) => markAt [x,m,e] +-- integer? x and (T := [x, $Integer,e]) and (T' := convert(T,m)) => markAt(T, T') t:= IDENTP x => compSymbol(x,m,e) or return nil m = $Expression and primitiveType x => [x,m,e] diff --git a/src/interp/wi2.boot b/src/interp/wi2.boot index 5d35ac34..51d2fe33 100644 --- a/src/interp/wi2.boot +++ b/src/interp/wi2.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -832,8 +832,8 @@ smallIntegerStep(it,index,start,inc,optFinal,e) == null (start':= comp(start,$SmallInteger,e)) => nil null (inc':= comp(inc,$SmallInteger,start'.env)) => nil if optFinal is [final] and not (final':= comp(final,$SmallInteger,inc'.env)) then --- not (FIXP startNum and FIXP incNum) => return nil --- null FIXP startNum or abs startNum > 100 => return nil +-- not (integer? startNum and integer? incNum) => return nil +-- null integer? startNum or abs startNum > 100 => return nil -----> assume that optFinal is $SmallInteger T := comp(final,$EmptyMode,inc'.env) or return nil final' := T @@ -843,7 +843,7 @@ smallIntegerStep(it,index,start,inc,optFinal,e) == [.,.,e]:= compMakeDeclaration(index,indexmode, (final' => final'.env; inc'.env)) or return nil range := - FIXP startNum and FIXP incNum => + integer? startNum and integer? incNum => startNum > 0 and incNum > 0 => $PositiveInteger startNum < 0 and incNum < 0 => $NegativeInteger incNum > 0 => $NonNegativeInteger --startNum = 0 diff --git a/src/interp/word.boot b/src/interp/word.boot index fc553899..904718a7 100644 --- a/src/interp/word.boot +++ b/src/interp/word.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -186,7 +186,7 @@ pickANumber(word,list) == center80 ['"Anything else means",:bright 'no] y := queryUser nil x:= string2Integer y - FIXP x and x >= 1 and x <= #list => list.(x-1) + integer? x and x >= 1 and x <= #list => list.(x-1) nil bootSearch word == |