473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

what're the Label_xxxx in decompiled code?

Bob
I was looking at some of the Framework code using the .NET Reflector.
There're some places where there're these Label_xxxx lines, e.g.:

......
if (string.IsNullOrEmpty(this.Url))
{
goto Label_0174;
}
Label_00C2:
if (base.DataSources.Count == 0)
{
goto Label_0189;
}
goto Label_0194;
Label_00D7:
.......................

What would these labels be in the original code? I guess the compiler
rearranged the branching logics and the decompiler simply wouldn't know what
the original code looks like?
May 20 '07 #1
1 1136
Bob wrote:
I was looking at some of the Framework code using the .NET Reflector.
There're some places where there're these Label_xxxx lines, e.g.:

.....
if (string.IsNullOrEmpty(this.Url))
{
goto Label_0174;
}
Label_00C2:
if (base.DataSources.Count == 0)
{
goto Label_0189;
}
goto Label_0194;
Label_00D7:
......................

What would these labels be in the original code?
What you're seeing is a limitation of the decompilation support of
Reflector. In general, arbitrary code can be decomposed into switch
statements, if statements, jumps, assignments and method calls.
Extracting higher-level structures such as while / for / foreach etc.
relies on pattern-matching, heuristics, etc.
I guess the compiler
rearranged the branching logics and the decompiler simply wouldn't know what
the original code looks like?
It's also possible that goto was used to escape from deeply nested
loops, or to perform some other control flow not possible with purely
structured programming primitives.

-- Barry

--
http://barrkel.blogspot.com/
May 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: PDXWilliam | last post by:
Hello, Please forgive if this is off-topic ... and I'd welcome if someone pointed me elsewhere to find this info. I'm programmatically retrieving data from a website and am unable to figure...
9
by: Mike L | last post by:
I tried a sample of code in MSDN magazine, but now I'm stuck. What code has the best performance to populate a Data Grid with a SP? Below is the code I have, which might be completing the wrong...
0
by: VM | last post by:
I have a pretty big application made in C but I only want to view the code that's being executed when a button in a toolbar is clicked. Since I didn't write the program, is there an easy way to...
4
by: Trint Smith | last post by:
How can I do this if a certain event happens within my program? Can I use a hotmail.com account or one of the tribidz.com that comes with my hosting account? Is there a free way to do it? Dim...
1
by: Mateusz Rajca | last post by:
Hello, What code should I write to hide the taskbar? Mateusz
2
by: mistral | last post by:
what code encoded in this snippet? <script language=JavaScript>function dc(x){var...
1
by: bb nicole | last post by:
What coding should i have if i want to display all the latest job(according to date) which call out from database. For example, all today will display in the website... What code should i have to...
7
by: den | last post by:
in a box text, for avoid the insertion of character that can to damage the site and its db, 1- what is a good solution for filter the string? 2- to accept the insertion only for letter a-zA-Z...
0
by: sheenaa | last post by:
Hi Everyone, I m using ASP.NET 2005 with C# and SQL SERVER 2005. I m using stored procedure and sql datasource control to retrieve the data. I want to use the trigger...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.