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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?