Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: codewriter-packages/UniMob
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.3.2
Choose a base ref
...
head repository: codewriter-packages/UniMob
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2.3.3
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 8, 2023

  1. Copy the full SHA
    5b68255 View commit details
  2. Up version 2.3.3

    vanifatovvlad authored Apr 8, 2023
    Copy the full SHA
    1ac51f3 View commit details
Showing with 4 additions and 7 deletions.
  1. +3 −6 CodeGen/AtomWeaverV2.cs
  2. +1 −1 package.json
9 changes: 3 additions & 6 deletions CodeGen/AtomWeaverV2.cs
Original file line number Diff line number Diff line change
@@ -288,7 +288,6 @@ private struct AtomSetterMethodWeaver
private PropertyDefinition _property;

private Instruction _nullCheckEndInstruction;
private Instruction _preReturnInstruction;

private MethodReference _compAndInvalidateMethod;
private MethodReference _throwIfDisposedMethod;
@@ -299,7 +298,6 @@ public AtomSetterMethodWeaver(AtomWeaverV2 weaver, PropertyDefinition property,
_property = property;

_nullCheckEndInstruction = Instruction.Create(OpCodes.Nop);
_preReturnInstruction = Instruction.Create(OpCodes.Nop);

var propertyType = property.PropertyType;
_compAndInvalidateMethod =
@@ -314,8 +312,6 @@ public void Weave()
var index = 0;
Prepend(ref index, instructions);

body.Instructions.Insert(body.Instructions.Count - 1, _preReturnInstruction);

body.OptimizeMacros();
}

@@ -331,14 +327,15 @@ private void Prepend(ref int ind, IList<Instruction> il)
il.Insert(ind++, Instruction.Create(OpCodes.Ldfld, _atomField));
il.Insert(ind++, Instruction.Create(OpCodes.Brfalse, _nullCheckEndInstruction));

// atom.Invalidate()
// if (atom.CompareAndInvalidate()) goto nullCheckEnd;
il.Insert(ind++, Instruction.Create(OpCodes.Ldarg_0));
il.Insert(ind++, Instruction.Create(OpCodes.Ldfld, _atomField));
il.Insert(ind++, Instruction.Create(OpCodes.Ldarg_1));
il.Insert(ind++, Instruction.Create(OpCodes.Callvirt, _compAndInvalidateMethod));
il.Insert(ind++, Instruction.Create(OpCodes.Brtrue, _nullCheckEndInstruction));

il.Insert(ind++, Instruction.Create(OpCodes.Br, _preReturnInstruction));
// return;
il.Insert(ind++, Instruction.Create(OpCodes.Ret));

il.Insert(ind++, _nullCheckEndInstruction);
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "com.codewriter.unimob",
"displayName": "UniMob",
"description": "Reactive state management for Unity",
"version": "2.3.2",
"version": "2.3.3",
"unity": "2019.3",
"license": "MIT",
"keywords": [