mirror of
https://github.com/ZuneDev/MicrosoftIris.git
synced 2026-07-27 13:13:29 -07:00
More decompiler fixes
This commit is contained in:
+5
-5
@@ -5,9 +5,9 @@ using System;
|
|||||||
|
|
||||||
namespace Microsoft.Iris.Debug
|
namespace Microsoft.Iris.Debug
|
||||||
{
|
{
|
||||||
[RemoteProperty]
|
//[RemoteProperty]
|
||||||
[RemoteMethod]
|
//[RemoteMethod]
|
||||||
[RemoteOptions(RemotingDirection.Bidirectional)]
|
//[RemoteOptions(RemotingDirection.Bidirectional)]
|
||||||
public class Bridge : IBridge, IDisposable
|
public class Bridge : IBridge, IDisposable
|
||||||
{
|
{
|
||||||
private readonly MemberRemote _memberRemote;
|
private readonly MemberRemote _memberRemote;
|
||||||
@@ -24,13 +24,13 @@ namespace Microsoft.Iris.Debug
|
|||||||
_memberRemote = new MemberRemote(this, typeof(Bridge).Assembly.FullName, handler);
|
_memberRemote = new MemberRemote(this, typeof(Bridge).Assembly.FullName, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
[RemoteMethod, RemoteOptions(RemotingDirection.HostToClient)]
|
//[RemoteMethod, RemoteOptions(RemotingDirection.HostToClient)]
|
||||||
public void LogInterpreterOpCode(object context, Data.InterpreterEntry entry)
|
public void LogInterpreterOpCode(object context, Data.InterpreterEntry entry)
|
||||||
{
|
{
|
||||||
InterpreterStep?.Invoke(context, new(entry));
|
InterpreterStep?.Invoke(context, new(entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
[RemoteMethod, RemoteOptions(RemotingDirection.HostToClient)]
|
//[RemoteMethod, RemoteOptions(RemotingDirection.HostToClient)]
|
||||||
public void LogDispatcher(string message)
|
public void LogDispatcher(string message)
|
||||||
{
|
{
|
||||||
DispatcherStep?.Invoke(message);
|
DispatcherStep?.Invoke(message);
|
||||||
|
|||||||
@@ -22,13 +22,14 @@ namespace Microsoft.Iris.Debug.Data
|
|||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
var args =
|
|
||||||
#if OPENZUNE
|
#if OPENZUNE
|
||||||
Arguments;
|
var args = Arguments;
|
||||||
|
var ret = ReturnValues;
|
||||||
#else
|
#else
|
||||||
Arguments.Select(a => a.ToString()).ToArray();
|
var args = Arguments.Select(a => a.ToString()).ToArray();
|
||||||
|
var ret = ReturnValues.Select(a => a.ToString()).ToArray();
|
||||||
#endif
|
#endif
|
||||||
return $"{OpCode}({string.Join(", ", args)})";
|
return $"{OpCode}({string.Join(", ", args)}) -> [{ReturnValues}]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace Microsoft.Iris.Debug
|
|||||||
|
|
||||||
public Bridge Bridge { get; } =
|
public Bridge Bridge { get; } =
|
||||||
#if OPENZUNE
|
#if OPENZUNE
|
||||||
new(OwlCore.Remoting.RemotingMode.Host);
|
new(OwlCore.Remoting.RemotingMode.None);
|
||||||
#else
|
#else
|
||||||
new();
|
new();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1022,6 +1022,7 @@ namespace Microsoft.Iris.Markup
|
|||||||
TypeSchema typeSchema8 = (TypeSchema)stack.Pop();
|
TypeSchema typeSchema8 = (TypeSchema)stack.Pop();
|
||||||
object obj7 = stack.Pop();
|
object obj7 = stack.Pop();
|
||||||
typeSchema8.InitializeInstance(ref obj7);
|
typeSchema8.InitializeInstance(ref obj7);
|
||||||
|
xmlStack.Pop();
|
||||||
var objXml7 = (XmlElement)xmlStack.Pop();
|
var objXml7 = (XmlElement)xmlStack.Pop();
|
||||||
objXml7.SetAttribute("Name", typeSchema8.Name);
|
objXml7.SetAttribute("Name", typeSchema8.Name);
|
||||||
ReportErrorOnNull(obj7, "Initialize", typeSchema8.Name);
|
ReportErrorOnNull(obj7, "Initialize", typeSchema8.Name);
|
||||||
@@ -1055,6 +1056,7 @@ namespace Microsoft.Iris.Markup
|
|||||||
case OpCode.WriteSymbolPeek:
|
case OpCode.WriteSymbolPeek:
|
||||||
{
|
{
|
||||||
object value = (opCode == OpCode.WriteSymbolPeek) ? stack.Peek() : stack.Pop();
|
object value = (opCode == OpCode.WriteSymbolPeek) ? stack.Peek() : stack.Pop();
|
||||||
|
if (opCode == OpCode.WriteSymbol) xmlStack.Pop();
|
||||||
int num9 = reader.ReadUInt16();
|
int num9 = reader.ReadUInt16();
|
||||||
SymbolReference symbolRef2 = symbolReferenceTable[num9];
|
SymbolReference symbolRef2 = symbolReferenceTable[num9];
|
||||||
|
|
||||||
@@ -1088,6 +1090,7 @@ namespace Microsoft.Iris.Markup
|
|||||||
if (isPropInitIndirect)
|
if (isPropInitIndirect)
|
||||||
{
|
{
|
||||||
typeSchema9 = (TypeSchema)stack.Pop();
|
typeSchema9 = (TypeSchema)stack.Pop();
|
||||||
|
xmlStack.Pop();
|
||||||
}
|
}
|
||||||
int num11 = reader.ReadUInt16();
|
int num11 = reader.ReadUInt16();
|
||||||
PropertySchema propertySchema = importTables.PropertyImports[num11];
|
PropertySchema propertySchema = importTables.PropertyImports[num11];
|
||||||
@@ -1146,6 +1149,8 @@ namespace Microsoft.Iris.Markup
|
|||||||
// Add value to list
|
// Add value to list
|
||||||
var destObjXml = xmlStack.Peek();
|
var destObjXml = xmlStack.Peek();
|
||||||
if (!IsDefaultValue(value2) && valueXml2 != null)
|
if (!IsDefaultValue(value2) && valueXml2 != null)
|
||||||
|
{
|
||||||
|
if (propertySchema != null)
|
||||||
{
|
{
|
||||||
// Create element if needed
|
// Create element if needed
|
||||||
if (destObjXml.SelectSingleNode(propertySchema.Name) is not XmlElement propXmlElem2)
|
if (destObjXml.SelectSingleNode(propertySchema.Name) is not XmlElement propXmlElem2)
|
||||||
@@ -1155,6 +1160,14 @@ namespace Microsoft.Iris.Markup
|
|||||||
}
|
}
|
||||||
propXmlElem2.AppendChild(valueXml2);
|
propXmlElem2.AppendChild(valueXml2);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Add straight to parent element
|
||||||
|
var valueXmlElem2 = XmlDoc.CreateElement("String");
|
||||||
|
valueXmlElem2.AppendChild(valueXml2);
|
||||||
|
destObjXml.AppendChild(valueXmlElem2);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1238,13 +1251,13 @@ namespace Microsoft.Iris.Markup
|
|||||||
PropertySchema propertySchema4 = importTables.PropertyImports[num13];
|
PropertySchema propertySchema4 = importTables.PropertyImports[num13];
|
||||||
|
|
||||||
object instance3 = null;
|
object instance3 = null;
|
||||||
XmlElement xmlInstance3 = null;
|
|
||||||
|
|
||||||
if (opCode != OpCode.PropertyGetStatic)
|
if (opCode != OpCode.PropertyGetStatic)
|
||||||
{
|
{
|
||||||
bool pop = opCode == OpCode.PropertyGet;
|
bool pop = opCode == OpCode.PropertyGet;
|
||||||
instance3 = pop ? stack.Pop() : stack.Peek();
|
instance3 = pop ? stack.Pop() : stack.Peek();
|
||||||
xmlInstance3 = (XmlElement)(pop ? xmlStack.Pop() : xmlStack.Peek());
|
if (pop) xmlStack.Pop();
|
||||||
|
|
||||||
ReportErrorOnNullOrDisposed(instance3, "Property Get", propertySchema4.Name, propertySchema4.Owner);
|
ReportErrorOnNullOrDisposed(instance3, "Property Get", propertySchema4.Name, propertySchema4.Owner);
|
||||||
if (ErrorsDetected(watermark, ref result, ref flag))
|
if (ErrorsDetected(watermark, ref result, ref flag))
|
||||||
{
|
{
|
||||||
@@ -1683,12 +1696,20 @@ namespace Microsoft.Iris.Markup
|
|||||||
if (!prop.CanWrite || !prop.CanRead)
|
if (!prop.CanWrite || !prop.CanRead)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
object value = prop.GetValue(obj, null);
|
object value = prop.GetValue(obj, null);
|
||||||
if (IsDefaultValue(value))
|
if (IsDefaultValue(value))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SetXmlPropValue(objXml, prop.Name, value, recursionLevel - 1);
|
SetXmlPropValue(objXml, prop.Name, value, recursionLevel - 1);
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// Ignore errors, sometimes things aren't initialized yet
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return objXml;
|
return objXml;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user