Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9223507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:05:47+00:00 2026-06-18T04:05:47+00:00

I am aware of the Shared Source Common Language Infrastructure and also the MethodImplOptions

  • 0

I am aware of the Shared Source Common Language Infrastructure and also the MethodImplOptions Enumeration. I am interested to learn more about how the .NET runtime is implemented.

For example, in his answer to the following question; Hans Passant talks about how Math.Pow() is implemented in C++ in: clr/src/vm/ecall.cpp: How is Math.Pow() implemented in .NET Framework?. My question is: how do you know to look in that file in the first place? Is it because you know the code so well or is there a reference somewhere? i.e. a reference that says that Math.Pow() is implemented in: ecall.cpp

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:05:48+00:00Added an answer on June 18, 2026 at 4:05 am

    Well, you could poke around in the sources of the SSCLI. But I guess that is not what you were after 🙂

    You can however narrow down the false positives of a plain findstr /s /i "pow" *.*.

    You’d start by decompiling (or disassembling, if you feel like it) the System.Math class. You would find it in mscorlib.dll, which MSDN would tell you in case you didn’t know.

    If you do, you’ll see that the method doesn’t actually have a body defined there, but merely the signature. It has the MethodImplAttribute assigned, though. Which bears the value of MethodImplOptions.InternalCall. Again, looking at MSDN tells you, that this method is

    “The call is internal, that is, it calls a method that is
    implemented within the common language runtime.” (emphasis added).

    This should give you one important hint: it is probably implemented in C or more like C++, since that is the language that is used to implement the CLR itself.

    Knowing that, you do a search over all the C++ source files of the SSCLI.

    findstr /s /i "pow" *.cpp

    That narrows down the hits considerably, but still is a lot of stuff. Know it is really time to experiment, like make the search case sensitive, and look for whole words only (to exclude stuff like “power”).

    findstr /s /r "\<Pow\>" *.cpp

    Doing this will, for this example, return only two hits:

    clr\src\classlibnative\float\comfloat.cpp:FCIMPL2_VV(double, COMDouble::Pow, double x, double y)
    clr\src\vm\ecall.cpp:    FCFuncElement("Pow", COMDouble::Pow)
    

    The output pretty much gives it away then: Pow seems to be somehow related to COMDouble::Pow, which is show also.

    Frankly, I don’t remember how I really came up with the knowledge that InterallCall / instrinct functions (or there lookup tables, if you will) can be found in clr\src\vm\ecall.cpp, but the above is what I would have done, if I need to again.

    To add to Hans’ comment to your question about having studied the SSCLI, I would say that in general it is always educational, heck even “entertaining” if you’re geek enough, to read and explore other codebases. Especially, when they are related to the technology domain you are currently working in. I guess many people have been spelunking in the BCL and other .NET libraries, either using decompiling or the public available sources, which even have comment. But the CLR itself is also quite interesting, even with the SSCLI being somewhat outdated by know. Another interesting thing, IMHO, are the CRT (C/C++ runtime library) sources that are installed with Visual Studio (e.g. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\crt).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm aware it's a quite simple question but I'm a newbie to C#, ASP.NET
This is a question about an authentication scheme. Say I have a shared secret
AFAIK, neither C99 nor C++ standards are aware of shared libraries. Why is that?
As far as I'm aware, this is done via the net command. However, the
I have a .Net 4 site that is hosted a shared server. It works
I need an advice about a php/MySql CMS which is: 1.Safe for shared hosting.
I am interested in building an open source project and it requires the GNU
I am aware of the basics of shared memory and inter process communication, but
Im all aware about services like github and such which provide a really nice
Are aware of any solution that let me deactivate my facebook account through an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.