Mercurial Hosting > luan
comparison core/src/luan/impl/UpValue.java @ 664:71f8f5075df8
compile FnDef
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 07 Apr 2016 15:11:52 -0600 |
parents | c6bcb8859b93 |
children |
comparison
equal
deleted
inserted
replaced
663:b438a47196bc | 664:71f8f5075df8 |
---|---|
3 import luan.DeepCloner; | 3 import luan.DeepCloner; |
4 import luan.DeepCloneable; | 4 import luan.DeepCloneable; |
5 import luan.LuanException; | 5 import luan.LuanException; |
6 | 6 |
7 | 7 |
8 final class UpValue implements DeepCloneable { | 8 public final class UpValue implements DeepCloneable { |
9 private Object[] stack; | 9 private Object[] stack; |
10 private int index; | 10 private int index; |
11 private boolean isClosed = false; | 11 private boolean isClosed = false; |
12 private Object value; | 12 private Object value; |
13 | 13 |
54 value = stack[index]; | 54 value = stack[index]; |
55 isClosed = true; | 55 isClosed = true; |
56 stack = null; | 56 stack = null; |
57 } | 57 } |
58 | 58 |
59 static interface Getter { | 59 public static interface Getter { |
60 public UpValue get(LuanStateImpl luan) throws LuanException; | 60 public UpValue get(LuanStateImpl luan) throws LuanException; |
61 } | 61 } |
62 | 62 |
63 static final class StackGetter implements Getter { | 63 static final class StackGetter implements Getter { |
64 private final int index; | 64 private final int index; |