Mercurial Hosting > luan
comparison core/src/luan/LuanState.java @ 408:1b38de2b1845
merge LuanTableImpl into LuanTable
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 29 Apr 2015 13:15:17 -0600 |
parents | d55e873e1f0d |
children | abce9b0041b0 |
comparison
equal
deleted
inserted
replaced
407:7fd9f1b7b878 | 408:1b38de2b1845 |
---|---|
18 | 18 |
19 public abstract class LuanState implements DeepCloneable<LuanState> { | 19 public abstract class LuanState implements DeepCloneable<LuanState> { |
20 | 20 |
21 final List<StackTraceElement> stackTrace = new ArrayList<StackTraceElement>(); | 21 final List<StackTraceElement> stackTrace = new ArrayList<StackTraceElement>(); |
22 | 22 |
23 private LuanTableImpl registry; | 23 private LuanTable registry; |
24 | 24 |
25 protected LuanState() { | 25 protected LuanState() { |
26 registry = new LuanTableImpl(); | 26 registry = new LuanTable(); |
27 } | 27 } |
28 | 28 |
29 protected LuanState(LuanState luan) {} | 29 protected LuanState(LuanState luan) {} |
30 | 30 |
31 @Override public void deepenClone(LuanState clone,DeepCloner cloner) { | 31 @Override public void deepenClone(LuanState clone,DeepCloner cloner) { |
46 public static LuanState newInstance() { | 46 public static LuanState newInstance() { |
47 return LuanCompiler.newLuanState(); | 47 return LuanCompiler.newLuanState(); |
48 } | 48 } |
49 | 49 |
50 public final Object eval(String cmd) throws LuanException { | 50 public final Object eval(String cmd) throws LuanException { |
51 return eval(cmd,new LuanTableImpl()); | 51 return eval(cmd,new LuanTable()); |
52 } | 52 } |
53 | 53 |
54 public final Object eval(String cmd,LuanTable env) throws LuanException { | 54 public final Object eval(String cmd,LuanTable env) throws LuanException { |
55 LuanFunction fn = BasicLuan.load(this,cmd,"eval",env,true); | 55 LuanFunction fn = BasicLuan.load(this,cmd,"eval",env,true); |
56 return call(fn); | 56 return call(fn); |