Mercurial Hosting > luan
comparison core/src/luan/LuanState.java @ 200:9fb218211763
add Package.block();
add LuanException.getFullMessage();
git-svn-id: https://luan-java.googlecode.com/svn/trunk@201 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 03 Jul 2014 22:22:16 +0000 |
parents | 8960c81eb4bc |
children | 75750ceb45ee |
comparison
equal
deleted
inserted
replaced
199:8960c81eb4bc | 200:9fb218211763 |
---|---|
4 import java.io.PrintStream; | 4 import java.io.PrintStream; |
5 import java.util.List; | 5 import java.util.List; |
6 import java.util.ArrayList; | 6 import java.util.ArrayList; |
7 import java.util.Map; | 7 import java.util.Map; |
8 import java.util.LinkedHashMap; | 8 import java.util.LinkedHashMap; |
9 import java.util.Set; | |
10 import java.util.HashSet; | |
9 import luan.impl.LuanCompiler; | 11 import luan.impl.LuanCompiler; |
10 import luan.modules.BasicLuan; | 12 import luan.modules.BasicLuan; |
11 import luan.modules.PackageLuan; | 13 import luan.modules.PackageLuan; |
12 | 14 |
13 | 15 |
17 | 19 |
18 private LuanTable global; | 20 private LuanTable global; |
19 private LuanTable loaded; | 21 private LuanTable loaded; |
20 private LuanTable preload; | 22 private LuanTable preload; |
21 private LuanTable searchers; | 23 private LuanTable searchers; |
24 public final Set<String> blocked; | |
22 | 25 |
23 protected LuanState() { | 26 protected LuanState() { |
24 global = new LuanTable(); | 27 global = new LuanTable(); |
25 global.put("_G",global); | 28 global.put("_G",global); |
26 loaded = new LuanTable(); | 29 loaded = new LuanTable(); |
27 preload = new LuanTable(); | 30 preload = new LuanTable(); |
28 searchers = new LuanTable(); | 31 searchers = new LuanTable(); |
32 blocked = new HashSet<String>(); | |
33 } | |
34 | |
35 protected LuanState(LuanState luan) { | |
36 blocked = new HashSet<String>(luan.blocked); | |
29 } | 37 } |
30 | 38 |
31 @Override public void deepenClone(LuanState clone,DeepCloner cloner) { | 39 @Override public void deepenClone(LuanState clone,DeepCloner cloner) { |
32 clone.global = cloner.deepClone(global); | 40 clone.global = cloner.deepClone(global); |
33 clone.loaded = cloner.deepClone(loaded); | 41 clone.loaded = cloner.deepClone(loaded); |