starting to eliminate expand

cvs
Slava Pestov 2004-08-22 20:48:52 +00:00
parent cebe5c3cac
commit 502dc2472f
1 changed files with 5 additions and 7 deletions

View File

@ -81,7 +81,7 @@ public class FactorInterpreter implements FactorObject, Runnable
*/ */
public FactorWord last; public FactorWord last;
public FactorNamespace global; public FactorNamespace global = new FactorNamespace();
private FactorNamespace interpNamespace; private FactorNamespace interpNamespace;
@ -91,7 +91,7 @@ public class FactorInterpreter implements FactorObject, Runnable
public static void main(String[] args) throws Exception public static void main(String[] args) throws Exception
{ {
FactorInterpreter interp = new FactorInterpreter(); FactorInterpreter interp = new FactorInterpreter();
interp.init(args,null); interp.init(args);
interp.run(); interp.run();
} //}}} } //}}}
@ -117,7 +117,7 @@ public class FactorInterpreter implements FactorObject, Runnable
} //}}} } //}}}
//{{{ init() method //{{{ init() method
public void init(String[] args, Object root) throws Exception public void init(String[] args) throws Exception
{ {
for(int i = 0; i < args.length; i++) for(int i = 0; i < args.length; i++)
{ {
@ -139,7 +139,7 @@ public class FactorInterpreter implements FactorObject, Runnable
vocabularies = new FactorNamespace(); vocabularies = new FactorNamespace();
initBuiltinDictionary(); initBuiltinDictionary();
initNamespace(root); initNamespace();
topLevel(); topLevel();
runBootstrap(); runBootstrap();
@ -269,10 +269,8 @@ public class FactorInterpreter implements FactorObject, Runnable
} //}}} } //}}}
//{{{ initNamespace() method //{{{ initNamespace() method
private void initNamespace(Object root) throws Exception private void initNamespace() throws Exception
{ {
global = new FactorNamespace(null,root);
global.setVariable("interpreter",this); global.setVariable("interpreter",this);
global.setVariable("verbose-compile", global.setVariable("verbose-compile",