Skip to content

A MSIL/C# to C++ converter. Faster than CoreCLR with low memory overhead.(已弃坑.C#是个好语言,然而.NET不是一个干净的平台)

License

Notifications You must be signed in to change notification settings

anydream/il2cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6695eb3 · Jan 19, 2018
Dec 25, 2017
Sep 23, 2017
Dec 25, 2017
Dec 21, 2017
Jan 17, 2018
Jan 6, 2018
Jan 19, 2018
Nov 23, 2017
Jun 23, 2017
Dec 20, 2017
Sep 30, 2017
Jan 7, 2018

Repository files navigation

il2cpp

「 在享受C#开发效率的同时, 获得C++编译器往死里优化的执行速度 」

alt tag

How to test

  • Pre-requirements:
    1. Windows 7 or later, 64-bit system;
    2. Visual Studio 2017, C# and C++ desktop dev environments;
  • Open il2cpp.sln;
  • Set test as startup project;
  • Run.
  • You can add your test code into CodeGenTests.cs like this:
    [CodeGen]
    static class MyTest
    {
        // return 0 means PASS, otherwise means FAIL
        public static int Entry()
        {
            int a = 1, b = 2;
            if (a + b != 3)
                return 1;
            return 0;
        }
    }
  • Run test project to test your code.

交流群

  • QQ:548409690

已实现的特性

  • 类型/方法/字段的引用分析, 提取最小依赖子集
  • 虚方法调用与虚表绑定
  • 接口与基类方法的显式重写
  • 协变/逆变分析
  • 内嵌保守式垃圾回收器
  • 静态构造函数
  • try/catch/finally/fault 异常块的解析与代码生成
  • 一维数组/多维数组的代码生成
  • 枚举类型处理
  • 字符串常量代码生成
  • 可空类型代码生成
  • 显式字段布局和结构体长度
  • 方法委托
  • C++ 代码编译工具
  • 数组读写指令
  • 栈操作指令
  • 常量载入指令
  • 方法调用指令
  • 变量/参数/字段读写指令
  • 条件与分支指令
  • 比较指令
  • 数值转换指令
  • 数值运算指令
  • 引用和值类型对象操作指令
  • 指针读写指令
  • 异常处理指令
  • 装箱/拆箱指令
  • 溢出检查指令

明确不支持的特性

  • 运行时创建新类型 (TypeBuilder.CreateType)
  • 运行时生成并执行机器码 (Emit/Expression Trees)
  • 运行时加载 .NET DLL 并实例化其中的类型
  • 运行时实例化不存在的泛型展开 (只支持编译期存在的泛型展开)
  • 运行时增加/删除/修改反射信息
  • 递归的泛型参数类型展开
  • 封送非静态方法委托

正在如火如荼地开发中...
求 star 求测试~

About

A MSIL/C# to C++ converter. Faster than CoreCLR with low memory overhead.(已弃坑.C#是个好语言,然而.NET不是一个干净的平台)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published