Cangjie is a modern programming language designed for application-level software development.It is statically typed and statically compiled,utilizing a tracing garbage collector(GC)for automated memory management.The ...Cangjie is a modern programming language designed for application-level software development.It is statically typed and statically compiled,utilizing a tracing garbage collector(GC)for automated memory management.The language’s design strives to balance simplicity,safety,extensibility,and performance.Cangjie supports multi-paradigm programming with a concise syntax.With a strong emphasis on extensibility,it features type extension,macro programming,and a simple,efficient C Foreign Function Interfaces(C-FFI).The compiler frontend leverages modern techniques to support robust type inference and introduces a language-specific high-level intermediate representation,Cangjie high-level intermediate representation(CHIR),to facilitate efficient analysis and semantics-aware optimization.Additionally,the language runtime and LLVM-based backend implement lightweight user-mode threads and a concurrent compacting GC.The standard LLVM backend has been extended with GC-specific intrinsics and custom compilation passes for Cangjie-specific optimizations.Preliminary experimental results demonstrate that Cangjie achieves performance competitive with other application-level languages.展开更多
摘要Cangjie is a modern programming language designed for application-level software development.It is statically typed and statically compiled,utilizing a tracing garbage collector(GC)for automated memory management.The language’s design strives to balance simplicity,safety,extensibility,and performance.Cangjie supports multi-paradigm programming with a concise syntax.With a strong emphasis on extensibility,it features type extension,macro programming,and a simple,efficient C Foreign Function Interfaces(C-FFI).The compiler frontend leverages modern techniques to support robust type inference and introduces a language-specific high-level intermediate representation,Cangjie high-level intermediate representation(CHIR),to facilitate efficient analysis and semantics-aware optimization.Additionally,the language runtime and LLVM-based backend implement lightweight user-mode threads and a concurrent compacting GC.The standard LLVM backend has been extended with GC-specific intrinsics and custom compilation passes for Cangjie-specific optimizations.Preliminary experimental results demonstrate that Cangjie achieves performance competitive with other application-level languages.