-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IL2C InternalCall doubt & In what scenarios is it primarily used #89
Comments
In my understanding, for example, Unity's IL2CPP is based on Mono (which implements the BCL interface), so there is no InterlnalCall problem。windows .NET Framework or donet is not pure |
Looking forward to your reply |
In my first inspiration for IL2C's idea: "Why does it required a lot of cost in this case? What different between C language and C# (or CIL)? And/or why couldn't use .NET on embedded bare-metal environment mostly cases?" : public static void Main(string[] args)
{
var a = 1;
var b = 2;
var r = a + b;
Console.WriteLine(r);
} We can understand the theme easier, because it has translation problem, overheads and the runtime costs.
For example, many tiny system can built with platform dependent C compiler. The C compiler has runtime code fragments we know 'strlen()', 'malloc()' and etc. We can write in C code: public static int Main(string[] args)
{
string p = "ABCDEFG";
int r = p.Length; // IL: get_Length(p);
Console.WriteLine("{0}", r);
return 0;
} instead: int main(int argc, char* argv[])
{
const char* p = "ABCDEFG";
const int r = strlen(p);
printf("%d\n", r);
return 0;
} We can translate naturally both C and C# code. So we can simplicity replace from (And it's reducing code footprints because many other implicitly linked native independent libraries shared these codes.) Curently, IL2C focuses how to dodge these problems. You know it has many lacks of implementations, includes `System.String.LastIndexOf', because I have no free times now at IL2C prgression :) |
Thank you for your answer,Agree with your idea and have studied several IL2CPP details, including Unity's IL2CPP。Use scenarios, in micro systems, using C# to write logic code,Enjoy the convenience of a high-level language, with IL2C, less memory and less code。Hope it goes on and on |
I am very curious about how the InternalCall of the.net Framework handles, for example, the conversion of System.String LastIndexOf to C is not implemented。What is the main function of IL2C,There are similar products available now, https://github.com/anydream/il2cpp (The problem of Internalcall has been abandoned)
The text was updated successfully, but these errors were encountered: