comparison src/luan/interp/LuanStateImpl.java @ 108:3c404a296995

make Package module more standard; return _ENV by default; add "import" statement; git-svn-id: https://luan-java.googlecode.com/svn/trunk@109 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Fri, 23 May 2014 03:21:54 +0000
parents 6ca02b188dba
children 2428ecfed375
comparison
equal deleted inserted replaced
107:dbf459397217 108:3c404a296995
117 } 117 }
118 118
119 UpValue getUpValue(UpValue.EnvGetter getter) throws LuanException { 119 UpValue getUpValue(UpValue.EnvGetter getter) throws LuanException {
120 UpValue uv = envs.get(getter); 120 UpValue uv = envs.get(getter);
121 if( uv == null ) { 121 if( uv == null ) {
122 LuanTable env = newEnvironment(); 122 LuanTable env = new LuanTable();
123 uv = new UpValue(env); 123 uv = new UpValue(env);
124 envs.put(getter,uv); 124 envs.put(getter,uv);
125 } 125 }
126 return uv; 126 return uv;
127 } 127 }