Comments (7)
in file ICSharpCode.Decompiler\ILAst\ILAstBuilder.cs
from ilspy.
What do you mean? Do you know how to trigger thouse?
The first one would mean inconsisten stack - that is quite forbiden in CLR. So it would mean that there is a bug in the analysis.
The second/third would mean that there is unreachable IL code - that is probably allowed, but again, it more likely means there is some scenario I did not htink of.
from ilspy.
Oh, I see the other bug report now...
from ilspy.
ILSpy_0.1.0.325_Source
IL_00e9: ldloc.1
IL_00ea: stloc.s 4
IL_00ec: ldloc.s 4
IL_00ee: brfalse.s IL_010a
IL_00f0: ldstr "-"
IL_00f5: ldloc.2
IL_00f6: callvirt instance string [mscorlib]System.Text.StringBuilder::ToString()
IL_00fb: callvirt instance string string::Trim()
IL_0100: call string string::Concat(string, string)
IL_0105: stloc.3
IL_0106: br.s IL_011a
IL_0108: br.s IL_0119 <----- Ln 235: byteCode.StackBefore == null
IL_010a: nop
IL_010b: ldloc.2
IL_010c: callvirt instance string [mscorlib]System.Text.StringBuilder::ToString()
IL_0111: callvirt instance string string::Trim()
IL_0116: stloc.3
IL_0117: br.s IL_011a
IL_0119: nop
IL_011a: ldloc.3
IL_011b: ret
from ilspy.
I do not see anything that would branch to IL_0108. Is there some branch to that location somewhere else? Or is the code really just plainly unreachable? Does that come from the C# compiler?
from ilspy.
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldfld class [mscorlib]System.Collections.Generic.Dictionary`2<string, class RaceClient.clsRunningClock> class RaceClient.clsRaceClient::mRunningClocks
IL_0007: ldarg.1
IL_0008: callvirt instance bool [mscorlib]System.Collections.Generic.Dictionary`2<string, RaceClient.clsRunningClock>::ContainsKey(!0)
IL_000d: ldc.i4.0
IL_000e: ceq
IL_0010: stloc.1
IL_0011: ldloc.1
IL_0012: brfalse.s IL_001c
IL_0014: ldstr ""
IL_0019: stloc.0
IL_001a: br.s IL_0053
IL_001c: ldarg.0
IL_001d: ldfld class [mscorlib]System.Collections.Generic.Dictionary`2<string, class RaceClient.clsRunningClock> class RaceClient.clsRaceClient::mRunningClocks
IL_0022: ldarg.1
IL_0023: callvirt instance !1 [mscorlib]System.Collections.Generic.Dictionary`2<string, RaceClient.clsRunningClock>::get_Item(!0)
IL_0028: ldnull
IL_0029: ceq
IL_002b: ldc.i4.0
IL_002c: ceq
IL_002e: stloc.1
IL_002f: ldloc.1
IL_0030: brfalse.s IL_0049
IL_0032: ldarg.0
IL_0033: ldfld class [mscorlib]System.Collections.Generic.Dictionary`2<string, class RaceClient.clsRunningClock> class RaceClient.clsRaceClient::mRunningClocks
IL_0038: ldarg.1
IL_0039: callvirt instance !1 [mscorlib]System.Collections.Generic.Dictionary`2<string, RaceClient.clsRunningClock>::get_Item(!0)
IL_003e: ldarg.2
IL_003f: callvirt instance string RaceClient.clsRunningClock::get_ClockString(int32)
IL_0044: stloc.0
IL_0045: br.s IL_0053
IL_0047: br.s IL_0052 <---- byteCode.StackBefore == null
IL_0049: nop
IL_004a: ldstr ""
IL_004f: stloc.0
IL_0050: br.s IL_0053
IL_0052: nop
IL_0053: ldloc.0
IL_0054: ret
This is the real code and Reflector shows:
public string get_GetClock(string ClockId, [Optional, DefaultParameterValue(0)] int TimeBase)
{
if (this.mRunningClocks.ContainsKey(ClockId) && (this.mRunningClocks[ClockId] != null))
{
return this.mRunningClocks[ClockId].get_ClockString(TimeBase);
}
return "";
}
from ilspy.
Should be fixed in adfc7fc
Please try it.
I did not address if (branchTarget.StackBefore.Count != newStack.Count) // is true
If you can reproduce it, please open new bug report
from ilspy.
Related Issues (20)
- How to decompile Assembly-CSharp.dll? HOT 3
- OverridableAttribute missing from the decompiled code when using a winmd file. HOT 1
- Interface improvements, lengthen what needs to be long and shorten what shouldn't
- Inconsistent and uncompilable decompilation for a combination of null forgiving operator and extension method usage
- Wrong decompilation of null nullable int
- System.NullReferenceException: Object reference not set to an instance of an object. HOT 3
- Installation Path HOT 2
- ICSharpCode.ILSpy.AssertionFailedException: StackTypes must match!
- System.NullReferenceException: Object reference not set to an instance of an object.
- Redesign the App Icon to match the Windows 11 HOT 1
- Clearer Hotkeys / Shortcuts..?
- ILSpy generated code reference DisplayClass. HOT 1
- New Command Line Parameter `@file`
- `ilspycmd` to support the option for omitting token export
- Load my opened library automatic or extend 'Refresh' to any type's context menu item.
- Deconstruction pattern with custom structs produces invalid C# code
- Missing using directive for Deconstruct extension method
- hi i have problem with gameaasembly.dll
- Better fitness sort of search results - by exactness, type, method, property etc.
- Suggestion for extending the WholeProjectDecompiler API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ilspy.