diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-29 10:43:47 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-29 10:43:47 +0100 |
| commit | 35b50178a77099f9f8b6432e2a6ef8391f120502 (patch) | |
| tree | 837dcfaef997edd174a3dba894e411d570f51fca /src/CompilerServices/CompilerServices.cs | |
| parent | 4907f0add724c2b29dd06f42cf66627e67265460 (diff) | |
debug bindings, clear only necessary bindings depending on source Instance changes
Diffstat (limited to 'src/CompilerServices/CompilerServices.cs')
| -rw-r--r-- | src/CompilerServices/CompilerServices.cs | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs index c224f01d..76a38c49 100644 --- a/src/CompilerServices/CompilerServices.cs +++ b/src/CompilerServices/CompilerServices.cs @@ -48,6 +48,8 @@ namespace Crow public class Binding{ static int bindingCpt = 0; string dynMethodId = ""; + bool resolved = false; + public string NewDynMethodId { get { if (!string.IsNullOrEmpty (dynMethodId)) @@ -60,7 +62,24 @@ namespace Crow public string DynMethodId { get { return dynMethodId; } } - public bool Resolved = false; + + + public bool Resolved { + get { + return resolved; + } + set { + if (value == resolved) + return; + #if DEBUG_BINDING + if (value == true) + Debug.WriteLine ("\tOk => " + this.ToString()); + else + Debug.WriteLine ("\tresolved state reseted => " + this.ToString()); + #endif + resolved = value; + } + } public MemberReference Target; public MemberReference Source; @@ -100,8 +119,10 @@ namespace Crow ptr++; } while (ptr < bindingExp.Length - 1) { - if (tmp == null) + if (tmp == null) { + Debug.WriteLine ("\tERROR: target not found => " + this.ToString()); return false; + } if (bindingExp [ptr] == "..") tmp = tmp.LogicalParent; else if (bindingExp [ptr] == ".") { @@ -113,8 +134,10 @@ namespace Crow ptr++; } - if (tmp == null) + if (tmp == null) { + Debug.WriteLine ("\tERROR: target not found => " + this.ToString()); return false; + } string[] bindTrg = bindingExp [ptr].Split ('.'); |