finds.dev← search

// the find

himself65/OpenArkCompiler

★ 687 · C++ · updated Sep 2021

the source code of OpenArkCompiler(Mirror Repo)

Huawei's dead-but-substantial compiler framework for unifying Java/JS/C++ compilation down to a shared IR (Maple IR) with a real aarch64 backend. Worth a look if you're studying how a production compiler does register allocation, reference-counting insertion, or vtable dispatch for a Java-like object model — not useful if you want something you can actually build and run end to end.

The aarch64 backend is real, not a toy: graph-coloring register allocation, instruction scheduling, peephole optimization, and short-branch fixup all have dedicated passes with their own files. The docs on naive RC insertion and vtable/itable design are genuinely useful reading for anyone implementing reference counting or interface dispatch for an OOP runtime. It ships its own bounds-checked C string library (huawei_secure_c, a safec-style replacement for strcpy/sprintf/etc.) used throughout, instead of relying on libc directly. The mdgen tool is a from-scratch machine-description compiler (lexer/parser/generator) for defining target instructions, playing a similar role to LLVM's TableGen but implemented independently.

Last commit is from 2021 — five years of silence on a project pitched as an active multi-language platform. It's explicitly a mirror, and the pieces needed to actually assemble a working toolchain (mapleall, maple_engine) live on Gitee, not here, so you can't clone this repo and get something running. The README is almost entirely the 2019-2020 open-source rollout roadmap, not a getting-started guide — the real documentation is buried in doc/en with no top-level build walkthrough. The stated goal of full JavaScript application compilation was never delivered in the open source drop; it stalled mid-roadmap with the frontend and optimization phases only partially released.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →