il2cpp_IL2CPP内部介绍

il2cpp

Almost a year ago now, we started to talk about the future of scripting in Unity. The new IL2CPP scripting backend promised to bring a highly-performant, highly-portable virtual machine to Unity. In January, we shipped our first platform using IL2CPP, iOS 64-bit. The Unity 5 release brought another platform, WebGL. Thanks to the input from our tremendous community of users, we have shipped many patch release updates for IL2CPP, steadily improving its compiler and runtime.

大约一年前的现在,我们开始谈论Unity中脚本的未来 。 新的IL2CPP脚本后端承诺将为Unity带来高性能,高度可移植的虚拟机。 1月,我们使用IL2CPP( iOS 64位)发布了第一个平台。 Unity 5版本带来了另一个平台WebGL 。 感谢广大用户的反馈,我们为IL2CPP发行了许多补丁程序更新 ,从而稳步改善了其编译器和运行时。

We have no plans to stop improving IL2CPP, but we thought it might be a good idea to take a step back and tell you a little bit about how IL2CPP works from the inside out. Over the next few months, we’re planning to write about the following topics (and maybe others) in this IL2CPP Internals series of posts:

我们没有停止改善IL2CPP的计划,但是我们认为最好退一步,向您介绍一下IL2CPP从内而外的工作原理。 在接下来的几个月中,我们计划在此IL2CPP Internals系列文章中撰写以下主题(可能还有其他主题):

  1. A tour of generated code

    生成代码之旅

  2. Debugging tips for generated code

    生成代码的调试技巧

  3. Method calls (normal methods, virtual methods, etc.)

    方法调用 (普通方法,虚拟方法等)

  4. Generic sharing implementation

    通用共享实施

  5. P/invoke wrappers for types and methods

    P /调用包装器的类型和方法

  6. Garbage collection integration

    垃圾收集整合

  7. Testing frameworks and usage

    测试框架和用法

In order to make this series of posts possible, we’re going to discuss some details about the IL2CPP implementation that will surely change in the future. Hopefully we can still provide some useful and interesting information.

为了使这一系列文章成为可能,我们将讨论有关IL2CPP实现的一些细节,这些细节将来肯定会改变。 希望我们仍然可以提供一些有用和有趣的信息。

What is IL2CPP?

什么是IL2CPP?

The technology that we refer to as IL2CPP has two distinct parts.

我们称为IL2CPP的技术有两个不同的部分。

    The AOT compiler translates Intermediate Language (IL), the low-level output from .NET compilers, to C++ source code. The runtime library provides services and abstractions like a garbage collector, platform-independent access to threads and files, and implementations of internal calls (native code which modifies managed data structures directly).

    AOT编译器将.NET编译器的低级输出中间语言(IL)转换为C ++源代码。 运行时库提供服务和抽象,例如垃圾收集器,对线程和文件的平台独立访问以及内部调用的实现(直接修改托管数据结构的本机代码)。

    The AOT compiler

    AOT编译器

    The IL2CPP AOT compiler is named il2cpp.exe. On Windows you can find it in the Editor\Data\il2cpp directory. On OSX it is in the Contents/Frameworks/il2cpp/build directory in the Unity installation. The il2cpp.exe utility is a managed executable, written entirely in C#. We compile it with both .NET and Mono compilers during

    • 0
      点赞
    • 4
      收藏
      觉得还不错? 一键收藏
    • 0
      评论

    “相关推荐”对你有帮助么?

    • 非常没帮助
    • 没帮助
    • 一般
    • 有帮助
    • 非常有帮助
    提交
    评论
    添加红包

    请填写红包祝福语或标题

    红包个数最小为10个

    红包金额最低5元

    当前余额3.43前往充值 >
    需支付:10.00
    成就一亿技术人!
    领取后你会自动成为博主和红包主的粉丝 规则
    hope_wisdom
    发出的红包
    实付
    使用余额支付
    点击重新获取
    扫码支付
    钱包余额 0

    抵扣说明:

    1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
    2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

    余额充值