微小的JavaScript实现? [英] Tiny javascript implementation?
问题描述
我需要一个极其微小的执行情况(可能的一个子集?)的JavaScript。 code尺寸和内存使用情况是极为重要的(速度不是问题,它可以运行,因为它喜欢慢)。必须用C写的(不是C ++),并且也ANSI C(GCC扩展都还好)。如果它运行在一个虚拟机是最好的,因为我会写一个编译器吧。有什么建议?
I need an extremely tiny implementation of (maybe a subset of?) Javascript. Code size and memory usage are extremely important (speed isn't in the question, it can run as slow as it likes). It must be written in C (not C++), and that too, ANSI C (GCC extensions are okay). If it runs on a VM would be best, because I will have to write a compiler for it. Any suggestions?
编辑:这两个我的反应似乎不错,除了:
Both of the responses I have seem good, except:
SpiderMonkey的集中了很多使其更快,我不关心,如果其快速的。
四轮听起来不错,但它的活性,code注释很少(我将这个移植到另一个架构是否有帮助)。
SpiderMonkey concentrates a lot on making it faster, I don't care if its fast at all.
Quad-Wheel sounds good, except the activity on it, and code comments are few (I will be porting this to another architecture if that helps).
因此,任何其他答复将是巨大的。或者,我可以推出JS我自己的简化版(但并不在所有的声音的乐趣)
So, any other responses would be great. Or, I could roll out my own simplified version of JS (but that doesn't sound fun at all)
推荐答案
Duktape用C语言编写,重点是便携性和紧凑的外形: HTTP:/ /duktape.org/
Duktape is written in C, with a focus on portability and compact footprint: http://duktape.org/
这篇关于微小的JavaScript实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!