aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-02-25 05:13:53 +0000
committerdos-reis <gdr@axiomatics.org>2011-02-25 05:13:53 +0000
commitb71fd7a811c516e8ca2a8a3f4ad578e9f637596b (patch)
treee676e8436022b7a51c0c3c10511fc16876f87b13 /src/boot
parent66f5a47122d91ad3a395cc02549908b8daf1bdd8 (diff)
downloadopen-axiom-b71fd7a811c516e8ca2a8a3f4ad578e9f637596b.tar.gz
* boot/tokens.boot: makeSymbol is not a builtin function.
* boot/ast.boot: Use makeSymbol in place of INTERN. * boot/parser.boot: Likewise. * boot/scanner.boot: Likewise. * boot/translator.boot: Likewise. * interp/alql.boot: Likewise. * interp/as.boot: Likewise. * interp/ax.boot: Likewise. * interp/bc-matrix.boot: Likewise. * interp/bc-solve.boot: Likewise. * interp/br-con.boot: Likewise. * interp/br-data.boot: Likewise. * interp/br-op2.boot: Likewise. * interp/br-prof.boot: Likewise. * interp/br-search.boot: Likewise. * interp/c-doc.boot: Likewise. * interp/c-util.boot: Likewise. * interp/clam.boot: Likewise. * interp/compiler.boot: Likewise. * interp/define.boot: Likewise. * interp/format.boot: Likewise. * interp/fortcall.boot: Likewise. * interp/i-syscmd.boot: Likewise. * interp/i-spec1.boot: Likewise. * interp/i-output.boot: Likewise. * interp/i-coerce.boot: Likewise. * interp/i-map.boot: Likewise. * interp/htsetvar.boot: Likewise. * interp/ht-util.boot: Likewise. * interp/g-util.boot: Likewise. * interp/functor.boot: Likewise. * interp/pspad1.boot: Likewise. * interp/pspad2.boot: Likewise. * interp/postpar.boot: Likewise. * interp/pf2sex.boot: Likewise. * interp/parse.boot: Likewise. * interp/packtran.boot: Likewise. * interp/nrunopt.boot: Likewise. * interp/nruncomp.boot: Likewise. * interp/newfort.boot: Likewise. * interp/msgdb.boot: Likewise. * interp/modemap.boot: Likewise. * interp/mark.boot: Likewise. * interp/intfile.boot: Likewise. * interp/interop.boot: Likewise. * interp/incl.boot: Likewise. * interp/word.boot: Likewise. * interp/wi2.boot: Likewise. * interp/wi1.boot: Likewise. * interp/trace.boot: Likewise. * interp/topics.boot: Likewise. * interp/sys-constants.boot: Likewise. * interp/showimp.boot: Likewise. * interp/scan.boot: Likewise.
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/ast.boot38
-rw-r--r--src/boot/parser.boot6
-rw-r--r--src/boot/scanner.boot4
-rw-r--r--src/boot/strap/tokens.clisp3
-rw-r--r--src/boot/tokens.boot1
-rw-r--r--src/boot/translator.boot6
6 files changed, 30 insertions, 28 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot
index 8d3f8c5c..3dce3667 100644
--- a/src/boot/ast.boot
+++ b/src/boot/ast.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
@@ -149,7 +149,7 @@ quote x ==
bfGenSymbol: () -> %Symbol
bfGenSymbol()==
$GenVarCounter := $GenVarCounter+1
- INTERN strconc('"bfVar#",toString $GenVarCounter)
+ makeSymbol strconc('"bfVar#",toString $GenVarCounter)
bfColon: %Thing -> %List
bfColon x==
@@ -159,7 +159,7 @@ bfColonColon: (%Symbol,%Symbol) -> %Symbol
bfColonColon(package, name) ==
%hasFeature KEYWORD::CLISP and package in '(EXT FFI) =>
FIND_-SYMBOL(PNAME name,package)
- INTERN(PNAME name, package)
+ makeSymbol(PNAME name, package)
bfSymbol: %Thing -> %Thing
bfSymbol x==
@@ -497,7 +497,7 @@ defSheepAndGoats(x)==
argl = nil =>
opassoc := [[op,:body]]
[opassoc,[],[]]
- op1 := INTERN strconc(PNAME $op,'",",PNAME op)
+ op1 := makeSymbol strconc(PNAME $op,'",",PNAME op)
opassoc := [[op,:op1]]
defstack := [[op1,args,body]]
[opassoc,defstack,[]]
@@ -531,7 +531,7 @@ bfLET1(lhs,rhs) ==
l2 is ["PROGN",:.] => bfMKPROGN [l1,:rest l2]
if symbol? first l2 then l2 := [l2,:nil]
bfMKPROGN [l1,:l2,name]
- g := INTERN strconc('"LETTMP#",toString $letGenVarCounter)
+ g := makeSymbol strconc('"LETTMP#",toString $letGenVarCounter)
$letGenVarCounter := $letGenVarCounter + 1
rhs1 := ['L%T,g,rhs]
let1 := bfLET1(lhs,g)
@@ -568,7 +568,7 @@ bfLET2(lhs,rhs) ==
lhs is ['APPEND,var1,var2] =>
patrev := bfISReverse(var2,var1)
rev := ['REVERSE,rhs]
- g := INTERN strconc('"LETTMP#", toString $letGenVarCounter)
+ g := makeSymbol strconc('"LETTMP#", toString $letGenVarCounter)
$letGenVarCounter := $letGenVarCounter + 1
l2 := bfLET2(patrev,g)
if cons? l2 and atom first l2 then l2 := [l2,:nil]
@@ -653,7 +653,7 @@ bfIS1(lhs,rhs) ==
bfAND [bfIS1(lhs,d),bfMKPROGN [l,'T]]
rhs is ["EQUAL",a] => bfQ(lhs,a)
cons? lhs =>
- g := INTERN strconc('"ISTMP#",toString $isGenVarCounter)
+ g := makeSymbol strconc('"ISTMP#",toString $isGenVarCounter)
$isGenVarCounter := $isGenVarCounter + 1
bfMKPROGN [['L%T,g,lhs],bfIS1(g,rhs)]
rhs is ['CONS,a,b] =>
@@ -670,7 +670,7 @@ bfIS1(lhs,rhs) ==
bfAND [['CONSP,lhs],a1,b1]
rhs is ['APPEND,a,b] =>
patrev := bfISReverse(b,a)
- g := INTERN strconc('"ISTMP#",toString $isGenVarCounter)
+ g := makeSymbol strconc('"ISTMP#",toString $isGenVarCounter)
$isGenVarCounter := $isGenVarCounter + 1
rev := bfAND [['CONSP,lhs],['PROGN,['L%T,g,['REVERSE,lhs]],'T]]
l2 := bfIS1(g,patrev)
@@ -810,7 +810,7 @@ bfDef1 [op,args,body] ==
shoeLAM (op,args,control,body)==
margs :=bfGenSymbol()
- innerfunc:=INTERN strconc(PNAME op,",LAM")
+ innerfunc:= makeSymbol strconc(PNAME op,",LAM")
[[innerfunc,["LAMBDA",args,body]],
[op,["MLAMBDA",["&REST",margs],["CONS",["QUOTE", innerfunc],
["WRAP",margs, ["QUOTE", control]]]]]]
@@ -1077,7 +1077,7 @@ bfWhere (context,expr)==
-- [exp,:shoeReadLispString(s,ind)]
bfCompHash(op,argl,body) ==
- auxfn:= INTERN strconc(PNAME op,'";")
+ auxfn:= makeSymbol strconc(PNAME op,'";")
computeFunction:= ["DEFUN",auxfn,argl,:body]
bfTuple [computeFunction,:bfMain(auxfn,op)]
@@ -1091,7 +1091,7 @@ bfMain(auxfn,op)==
g1:= bfGenSymbol()
arg:=["&REST",g1]
computeValue := ['APPLY,["FUNCTION",auxfn],g1]
- cacheName:= INTERN strconc(PNAME op,'";AL")
+ cacheName:= makeSymbol strconc(PNAME op,'";AL")
g2:= bfGenSymbol()
getCode:= ['GETHASH,g1,cacheName]
secondPredPair:= [['SETQ,g2,getCode],g2]
@@ -1163,7 +1163,7 @@ bfCI(g,x,y)==
bfCARCDR: (%Short,%Thing) -> %List
bfCARCDR(n,g) ==
- [INTERN strconc('"CA",bfDs n,'"R"),g]
+ [makeSymbol strconc('"CA",bfDs n,'"R"),g]
bfDs: %Short -> %String
bfDs n ==
@@ -1313,11 +1313,11 @@ isSimpleNativeType t ==
coreSymbol: %Symbol -> %Symbol
coreSymbol s ==
- INTERN(PNAME s, "AxiomCore")
+ makeSymbol(PNAME s, "AxiomCore")
bootSymbol: %Symbol -> %Symbol
bootSymbol s ==
- INTERN PNAME s
+ makeSymbol PNAME s
unknownNativeTypeError t ==
@@ -1550,7 +1550,7 @@ genCLISPnativeTranslation(op,s,t,op') ==
-- from the same class. Consequently, we must allocate C-storage,
-- copy data there, pass pointers to them, and possibly copy
-- them back. Ugh.
- n := INTERN strconc(PNAME op, '"%clisp-hack")
+ n := makeSymbol strconc(PNAME op, '"%clisp-hack")
parms := [gensym '"parm" for x in s] -- parameters of the forward decl.
-- Now, separate non-simple data from the rest. This is a triple-list
@@ -1624,13 +1624,13 @@ genSBCLnativeTranslation(op,s,t,op') ==
unstableArgs = nil =>
[["DEFUN",op,args,
- [INTERN('"ALIEN-FUNCALL",'"SB-ALIEN"),
- [INTERN('"EXTERN-ALIEN",'"SB-ALIEN"), op',
+ [makeSymbol('"ALIEN-FUNCALL",'"SB-ALIEN"),
+ [makeSymbol('"EXTERN-ALIEN",'"SB-ALIEN"), op',
["FUNCTION",rettype,:argtypes]], :args]]]
[["DEFUN",op,args,
[bfColonColon("SB-SYS","WITH-PINNED-OBJECTS"), nreverse unstableArgs,
- [INTERN('"ALIEN-FUNCALL",'"SB-ALIEN"),
- [INTERN('"EXTERN-ALIEN",'"SB-ALIEN"), op',
+ [makeSymbol('"ALIEN-FUNCALL",'"SB-ALIEN"),
+ [makeSymbol('"EXTERN-ALIEN",'"SB-ALIEN"), op',
["FUNCTION",rettype,:argtypes]], :nreverse newArgs]]]]
diff --git a/src/boot/parser.boot b/src/boot/parser.boot
index ff0d0cc4..03c2f639 100644
--- a/src/boot/parser.boot
+++ b/src/boot/parser.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 @@ bpLeftAssoc(operations,parser)==
bpString()==
shoeTokType $stok = "STRING" and
- bpPush(["QUOTE",INTERN $ttok]) and bpNext()
+ bpPush(["QUOTE",makeSymbol $ttok]) and bpNext()
bpThetaName() ==
$stok is ["ID",:.] and $ttok has SHOETHETA =>
@@ -1050,7 +1050,7 @@ bpRegularBVItem() ==
bpBVString()==
shoeTokType $stok = "STRING" and
- bpPush(["BVQUOTE",INTERN $ttok]) and bpNext()
+ bpPush(["BVQUOTE",makeSymbol $ttok]) and bpNext()
bpRegularBVItemL() ==
bpRegularBVItem() and bpPush [bpPop1()]
diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot
index 3b521975..8066ee94 100644
--- a/src/boot/scanner.boot
+++ b/src/boot/scanner.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
@@ -184,7 +184,7 @@ shoeToken () ==
-- to pair badge and badgee
shoeLeafId x ==
- ["ID",INTERN x]
+ ["ID",makeSymbol x]
shoeLeafKey x==
["KEY",shoeKeyWord x]
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp
index 013f5e2b..b33cbc0b 100644
--- a/src/boot/strap/tokens.clisp
+++ b/src/boot/strap/tokens.clisp
@@ -215,7 +215,8 @@
(LIST '|lastNode| 'LAST) (LIST 'LAST '|last|)
(LIST '|list| 'LIST)
(LIST '|lowerCase?| 'LOWER-CASE-P)
- (LIST '|mkpf| 'MKPF) (LIST '|nconc| 'NCONC)
+ (LIST '|makeSymbol| 'INTERN) (LIST '|mkpf| 'MKPF)
+ (LIST '|nconc| 'NCONC)
(LIST '|newString| 'MAKE-STRING)
(LIST '|newVector| 'MAKE-ARRAY) (LIST '|nil| NIL)
(LIST '|not| 'NOT) (LIST '|nreverse| 'NREVERSE)
diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot
index 26b59767..af6f83a8 100644
--- a/src/boot/tokens.boot
+++ b/src/boot/tokens.boot
@@ -269,6 +269,7 @@ for i in [ _
["LAST", "last"] , _
["list", "LIST"] , _
["lowerCase?", "LOWER-CASE-P"], _
+ ["makeSymbol", "INTERN"] , _
["mkpf", "MKPF"] , _
["nconc", "NCONC"] , _
["newString", "MAKE-STRING"], _
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index c964f48f..b071fd0a 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.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
@@ -53,7 +53,7 @@ genModuleFinalization(stream) ==
$currentModuleName = nil =>
coreError '"current module has no name"
init :=
- ["DEFUN", INTERN strconc($currentModuleName,"InitCLispFFI"), nil,
+ ["DEFUN", makeSymbol strconc($currentModuleName,"InitCLispFFI"), nil,
["MAPC",["FUNCTION", "FMAKUNBOUND"],
["QUOTE",[second d for d in $foreignsDefsForCLisp]]],
:[["EVAL",["QUOTE",d]] for d in $foreignsDefsForCLisp]]
@@ -657,7 +657,7 @@ shoeItem (str)==
stripm (x,pk,bt)==
atom x =>
symbol? x =>
- SYMBOL_-PACKAGE x = bt => INTERN(PNAME x,pk)
+ SYMBOL_-PACKAGE x = bt => makeSymbol(PNAME x,pk)
x
x
[stripm(first x,pk,bt),:stripm(rest x,pk,bt)]