Mercurial Hosting > luan
comparison src/luan/interp/Chunk.java @ 48:64ecb7a3aad7
rename Lua to Luan
git-svn-id: https://luan-java.googlecode.com/svn/trunk@49 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 28 Dec 2012 03:29:12 +0000 |
parents | e3624b7cd603 |
children | 8ede219cd111 |
comparison
equal
deleted
inserted
replaced
47:659c7139e903 | 48:64ecb7a3aad7 |
---|---|
1 package luan.interp; | 1 package luan.interp; |
2 | 2 |
3 import luan.LuaException; | 3 import luan.LuanException; |
4 import luan.LuaSource; | 4 import luan.LuanSource; |
5 | 5 |
6 | 6 |
7 final class Chunk extends CodeImpl implements Expr { | 7 final class Chunk extends CodeImpl implements Expr { |
8 final Stmt block; | 8 final Stmt block; |
9 final int stackSize; | 9 final int stackSize; |
10 final int numArgs; | 10 final int numArgs; |
11 final boolean isVarArg; | 11 final boolean isVarArg; |
12 final UpValue.Getter[] upValueGetters; | 12 final UpValue.Getter[] upValueGetters; |
13 | 13 |
14 Chunk(LuaSource.Element se,Stmt block,int stackSize,int numArgs,boolean isVarArg,UpValue.Getter[] upValueGetters) { | 14 Chunk(LuanSource.Element se,Stmt block,int stackSize,int numArgs,boolean isVarArg,UpValue.Getter[] upValueGetters) { |
15 super(se); | 15 super(se); |
16 this.block = block; | 16 this.block = block; |
17 this.stackSize = stackSize; | 17 this.stackSize = stackSize; |
18 this.numArgs = numArgs; | 18 this.numArgs = numArgs; |
19 this.isVarArg = isVarArg; | 19 this.isVarArg = isVarArg; |
33 fixReturns( is.thenStmt ); | 33 fixReturns( is.thenStmt ); |
34 fixReturns( is.elseStmt ); | 34 fixReturns( is.elseStmt ); |
35 } | 35 } |
36 } | 36 } |
37 | 37 |
38 LuaClosure newClosure(LuaStateImpl lua) { | 38 Closure newClosure(LuanStateImpl lua) { |
39 return new LuaClosure(this,lua); | 39 return new Closure(this,lua); |
40 } | 40 } |
41 | 41 |
42 @Override public Object eval(LuaStateImpl lua) { | 42 @Override public Object eval(LuanStateImpl lua) { |
43 return newClosure(lua); | 43 return newClosure(lua); |
44 } | 44 } |
45 | 45 |
46 } | 46 } |