none
doubt on compiler,JIT RRS feed

  • Question

  • Hi when i write a c# code in VS Studio,i know that c# compiler will compile it to transfer the code into CIL code but where exactly this happens? inside visual studio itself?
    and what ablout JIT? where does cil get converted to machine level code?
    Life is unpredictable! Do right things and be safe!
    Wednesday, March 3, 2010 9:49 AM

Answers

  • Hi Raj,

    Hi when i write a c# code in VS Studio,i know that c# compiler will compile it to transfer the code into CIL code but where exactly this happens? inside visual studio itself?

     where does cil get converted to machine level code?

    CIL is known as "Microsoft intermediate language" or MSIL—a standard, CPU-independent machine language level code into which all .NET executables get written.
    During compilation of .NET programming languages, the source code will be translated into CIL code.
    To know more about CIL, please refer to: http://en.wikipedia.org/wiki/Common_Intermediate_Language

    and what ablout JIT?

    Just-In-Time debugging is a feature that launches the Visual Studio debugger automatically when a program, running outside Visual Studio, encounters a fatal error. Just-In-Time debugging allows you to examine the error before the application is terminated by the operating system.
    For more information on JIT, please check: http://en.wikipedia.org/wiki/Just-in-time_compilation

    Hope this helps!

    Best regards,
    Yichun Chen

    (This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.) 
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Wednesday, March 10, 2010 4:53 AM
    Thursday, March 4, 2010 9:52 AM
  • Your C# code first gets compiled to an assembly by the C# compiler. The assembly code is IL assembly, Intermediate Language.

    When you run your assembly it is loaded and executed in the .NET CLR, Common Language Runtime. When an assembly is loaded by the CLR and start to execute code the Just-In-Time compiler translates it to native machine code and the code is executed.


    • Marked as answer by YiChun Chen Wednesday, March 10, 2010 4:53 AM
    Sunday, March 7, 2010 12:58 AM
    Moderator

All replies

  • Hi Raj,

    Hi when i write a c# code in VS Studio,i know that c# compiler will compile it to transfer the code into CIL code but where exactly this happens? inside visual studio itself?

     where does cil get converted to machine level code?

    CIL is known as "Microsoft intermediate language" or MSIL—a standard, CPU-independent machine language level code into which all .NET executables get written.
    During compilation of .NET programming languages, the source code will be translated into CIL code.
    To know more about CIL, please refer to: http://en.wikipedia.org/wiki/Common_Intermediate_Language

    and what ablout JIT?

    Just-In-Time debugging is a feature that launches the Visual Studio debugger automatically when a program, running outside Visual Studio, encounters a fatal error. Just-In-Time debugging allows you to examine the error before the application is terminated by the operating system.
    For more information on JIT, please check: http://en.wikipedia.org/wiki/Just-in-time_compilation

    Hope this helps!

    Best regards,
    Yichun Chen

    (This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.) 
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Wednesday, March 10, 2010 4:53 AM
    Thursday, March 4, 2010 9:52 AM
  • Your C# code first gets compiled to an assembly by the C# compiler. The assembly code is IL assembly, Intermediate Language.

    When you run your assembly it is loaded and executed in the .NET CLR, Common Language Runtime. When an assembly is loaded by the CLR and start to execute code the Just-In-Time compiler translates it to native machine code and the code is executed.


    • Marked as answer by YiChun Chen Wednesday, March 10, 2010 4:53 AM
    Sunday, March 7, 2010 12:58 AM
    Moderator