LLJS

LLJS: Low-Level JavaScript

  • 所有者: mbebenita/LLJS
  • 平台:
  • 许可证: Other
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

LLJS

LLJS is a typed dialect of JavaScript that offers a
C-like type system with manual memory management. It compiles to JavaScript
and lets you write memory-efficient and GC pause-free code less painfully, in
short, LLJS is the bastard child of JavaScript and C. LLJS is early research
prototype work, so don't expect anything rock solid just yet. The research
goal here is to explore low-level statically typed features in a high-level
dynamically typed language. Think of it as inline assembly in C, or the
unsafe keyword in C#. It's not pretty, but it gets the job done.

Usage

For users of node.js, bin/ljc is provided.

For users of SpiderMonkey js shell, the compiler can be invoked with:

$ js ljc.js

in the src/ directory.

Memcheck

If you would like to compile with support for memory checking (detects
leaks, accesses of unallocated and undefined memory locations, and
double frees) then compile with the -m flag:

$ bin/ljc -m -o myscript.js myscript.ljs

And add the following code to the end of your program run to report
any memory errors:

let m = require('memory');
// for SpiderMonkey do
// let m = load('memory.js')
console.log(m.memcheck.report());

The memory checker uses Proxies so if you use node.js you need to
enable it with:

$ node --harmony-proxies myscript.js

Testing

To run the tests install the Mocha module then run:

export NODE_PATH=src/
mocha --compilers ljs:ljc

from the root LLJS directory.

主要指标

概览
名称与所有者mbebenita/LLJS
主编程语言JavaScript
编程语言JavaScript (语言数: 2)
平台
许可证Other
所有者活动
创建于2012-02-06 18:52:37
推送于2020-03-11 17:38:19
最后一次提交2017-02-02 19:47:18
发布数0
用户参与
星数1.2k
关注者数67
派生数89
提交数247
已启用问题?
问题数34
打开的问题数23
拉请求数6
打开的拉请求数2
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?