tagged [compiler-construction]
Why does C# generate different EXEs for the same source-code?
Why does C# generate different EXEs for the same source-code? Every time we recompile our C# application we end up with EXEs with different MD5 signatures. We are recompiling on the same machine, minu...
- Modified
- 18 Nov at 22:31
What makes the Java compiler so fast?
What makes the Java compiler so fast? I was wondering about what makes the primary Java compiler (javac by sun) so fast at compilation? ..as well as the C# .NET compiler from Microsoft. I am comparing...
- Modified
- 31 Dec at 13:39
C# variance annotation of a type parameter, constrained to be value type
C# variance annotation of a type parameter, constrained to be value type It is possible in C# to add variance annotation to type parameter, constrained to be value type: Why is this allowed by compile...
- Modified
- 20 Feb at 01:51
8086 Assembler - Generating the object code from opcodes
8086 Assembler - Generating the object code from opcodes I'm working on an assembler for the 8086 . My question is how do you convert the hex opcodes to an executable file like .EXE,.ELF,.COM,a.out et...
- Modified
- 9 Aug at 09:36
String.IsNullOrEmpty or string.IsNullOrEmpty
String.IsNullOrEmpty or string.IsNullOrEmpty I have been looking through code for the last 3 days, and the original developer is defining Strings using the class rather than the class. So, when they'v...
- Modified
- 9 Mar at 10:52
How does the compilation/linking process work?
How does the compilation/linking process work? How does the compilation and linking process work? [Stack Overflow's C++ FAQ](https://stackoverflow.com/questions/tagged/c++-faq)[the posting on meta tha...
- Modified
- 26 Mar at 13:0
Sort and remove (unused) using statements Roslyn script/code?
Sort and remove (unused) using statements Roslyn script/code? Sort and remove (unused) using statements Roslyn script/code? I'm looking for some .NET/Roslyn (compiler as service) code that can run thr...
- Modified
- 11 Dec at 18:21
What is the difference between a token and a lexeme?
What is the difference between a token and a lexeme? In Compiler Construction by Aho Ullman and Sethi, it is given that the input string of characters of the source program are divided into sequence o...
- Modified
- 19 Feb at 14:27
Is it possible to debug code compiled at runtime?
Is it possible to debug code compiled at runtime? I have a need to compile some code using [CodeDomProvider.CompileAssemblyFromSource](http://msdn.microsoft.com/en-us/library/system.codedom.compiler.c...
- Modified
- 8 Apr at 14:9
It is more efficient to use if-return-return or if-else-return?
It is more efficient to use if-return-return or if-else-return? Suppose I have an `if` statement with a `return`. From the efficiency perspective, should I use or Should I prefer one or another when u...
- Modified
- 14 Nov at 07:16
Constructor Overloading with Default Parameters
Constructor Overloading with Default Parameters I accidentally overloaded a constructor in C# as follows: With this code my project compiled fine. If I call the constructor with just a `string` argume...
- Modified
- 20 Jul at 19:46
What does "out" mean before a Generic type parameter?
What does "out" mean before a Generic type parameter? I've just saw an unfamiliar syntax while looking for `GroupBy` return type: [MSDN Source](http://msdn.microsoft.com/en-us/library/bb344977.aspx) ...
- Modified
- 5 Apr at 11:29
Is C# used anywhere besides .NET programming?
Is C# used anywhere besides .NET programming? It's my understanding that C#, though created by Microsoft, is a programming language that can be used or implemented for things other than .NET programmi...
- Modified
- 8 Aug at 13:12
Compiler Magic: Why?
Compiler Magic: Why? I just noticed that given the following code: the Microsoft C# 3.0 (VS2008 SP1) compiler will optimize it to this: ``` if (!((x.Id
- Modified
- 3 Nov at 22:13
What does the error "the exec task needs a command to execute" mean?
What does the error "the exec task needs a command to execute" mean? When compiling a project in Visual Studio, the error message "the exec task needs a command to execute" appears, with no line numbe...
- Modified
- 19 Feb at 12:59
JIT compiler vs offline compilers
JIT compiler vs offline compilers Are there scenarios where JIT compiler is faster than other compilers like C++? Do you think in the future JIT compiler will just see minor optimizations, features bu...
- Modified
- 27 Feb at 06:18
Inline property initialisation and trailing comma
Inline property initialisation and trailing comma ``` void Main() { Test t = new Test { A = "a", B = "b", //
- Modified
- 9 Mar at 11:30
TargetedPatchingOptOut: "Performance critical to inline across NGen image boundaries"?
TargetedPatchingOptOut: "Performance critical to inline across NGen image boundaries"? Been going through some framework classes using reflector and noticed a number of the methods and properties have...
- Modified
- 21 Aug at 19:22
Why are collection initializers on re-assignments not allowed?
Why are collection initializers on re-assignments not allowed? I always thought it worked fine both ways. Then did this test and realized it's not allowed on re-assignments: works fine but not: Any te...
- Modified
- 24 Dec at 00:13
Define a preprocessor value from command line using MSBuild
Define a preprocessor value from command line using MSBuild I need to create a demo version of an existing large application consisting of multiple projects. I'd like to use the existing projects, and...
- Modified
- 8 Jul at 15:38
Why C# compiler does not allows private property setters in interfaces?
Why C# compiler does not allows private property setters in interfaces? In certain scenario like a MVVM view-model, I sometimes needs to have private setter as the view-model exposes a state that can ...
- Modified
- 14 Oct at 11:35
Translate C# code into AST?
Translate C# code into AST? Is it currently possible to translate C# code into an Abstract Syntax Tree? Edit: some clarification; I don't necessarily expect the compiler to generate the AST for me - a...
- Modified
- 17 Oct at 20:38
Is it costly to do array.length or list.count in a loop
Is it costly to do array.length or list.count in a loop I know that in JavaScript, creating a for loop like this: `for(int i = 0; i
- Modified
- 4 Nov at 18:57
Why null == false does not result in compile error in c#?
Why null == false does not result in compile error in c#? This is not to solve any particular problem. Simply a compiler question. Why does the following code not result in compile error? It's compari...
- Modified
- 4 May at 01:12
Is keyword 'event' optional in C#?
Is keyword 'event' optional in C#? What is the difference between eventOne (with keyword 'event') and eventTwo (w/o keyword)? ``` class Program { public event EventHandler eventOne; public EventHa...
- Modified
- 2 Apr at 21:42