From 502dc2472fe70050234b5297a8af1330679883f0 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 22 Aug 2004 20:48:52 +0000 Subject: [PATCH] starting to eliminate expand --- factor/FactorInterpreter.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/factor/FactorInterpreter.java b/factor/FactorInterpreter.java index 93cd793776..cbd61c7d4a 100644 --- a/factor/FactorInterpreter.java +++ b/factor/FactorInterpreter.java @@ -81,7 +81,7 @@ public class FactorInterpreter implements FactorObject, Runnable */ public FactorWord last; - public FactorNamespace global; + public FactorNamespace global = new FactorNamespace(); private FactorNamespace interpNamespace; @@ -91,7 +91,7 @@ public class FactorInterpreter implements FactorObject, Runnable public static void main(String[] args) throws Exception { FactorInterpreter interp = new FactorInterpreter(); - interp.init(args,null); + interp.init(args); interp.run(); } //}}} @@ -117,7 +117,7 @@ public class FactorInterpreter implements FactorObject, Runnable } //}}} //{{{ 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++) { @@ -139,7 +139,7 @@ public class FactorInterpreter implements FactorObject, Runnable vocabularies = new FactorNamespace(); initBuiltinDictionary(); - initNamespace(root); + initNamespace(); topLevel(); runBootstrap(); @@ -269,10 +269,8 @@ public class FactorInterpreter implements FactorObject, Runnable } //}}} //{{{ 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("verbose-compile",