diff options
Diffstat (limited to 'src/cli')
-rw-r--r-- | src/cli/runtime/TVal.cs | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/cli/runtime/TVal.cs b/src/cli/runtime/TVal.cs index 05b502e9..8f17bb8f 100644 --- a/src/cli/runtime/TVal.cs +++ b/src/cli/runtime/TVal.cs @@ -19,10 +19,22 @@ internal volatile Object val; internal volatile Transaction.Info tinfo;
internal volatile TVal prior;
+internal TVal(){
+
+}
+
+internal TVal(Object val, Transaction.Info tinfo, TVal prior) {
+ this.val = val;
+ this.tinfo = tinfo;
+ this.prior = prior;
+}
+
internal void push(Object val,Transaction.Info tinfo) {
- if(tinfo != null) //not newly created
- this.prior = (TVal) this.MemberwiseClone();
- this.tinfo = tinfo;
+ if(tinfo != null) //not newly created, clone tval part
+ {
+ this.prior = new TVal(this.val,this.tinfo,this.prior);
+ }
+ this.tinfo = tinfo;
this.val = val;
}
|