Complete ECMAScript 5th edition implementation

# Benjamin Jan Alexander Rosseaux (15 years ago)

Hello,

I've implemented a complete ECMAScript 5th edition implementation with a Context-Threaded JIT, Subroutine-Call-Threaded-Fallback-Bytecode-Interpreter, Property Inline Caching, Constant Folding, Dead code elimination, Type inference, Incremental praise/exact mark-and-sweep garbage collector and so on.

It's implemented in ObjectPascal (compilable with FreePascal >=2.5.1,

Delphi >=7), and is licensed under a OwnLicense+AGPLv3 Opensource

dual-license. It should be linkable/usable with C/C++ code over wrappers or interfaces.

But my first question is now, where I can announce my ES5 engine with a best-case chance to be well known. Or may i post the link here in this mailing list (so far if the rules in this mailinglis is allowing this)?

And my other question is, does exist an another ES5-feature-complete implementation already (for comparing/checking against for bugs etc.)?

Thanks and , Benjamin 'BeRo' Rosseaux

# Mark S. Miller (15 years ago)

On Wed, Apr 7, 2010 at 7:12 AM, Benjamin Jan Alexander Rosseaux <benjamin at rosseaux.de> wrote:

Hello,

I've implemented a complete ECMAScript 5th edition implementation with a Context-Threaded JIT, Subroutine-Call-Threaded-Fallback-Bytecode-Interpreter, Property Inline Caching, Constant Folding, Dead code elimination, Type inference, Incremental praise/exact mark-and-sweep garbage collector and so on.

It's implemented in ObjectPascal (compilable with FreePascal >=2.5.1, Delphi

=7), and is licensed under a OwnLicense+AGPLv3 Opensource dual-license. It should be linkable/usable with C/C++ code over wrappers or interfaces.

But my first question is now, where I can announce my ES5 engine with a best-case chance to be well known. Or may i post the link here in this mailing list (so far if the rules in this mailinglis is allowing this)?

Since it is open source, I have no objection to your posting the link. Please do.

And my other question is, does exist an another ES5-feature-complete implementation already (for comparing/checking against for bugs etc.)?

Not yet. At least none that's publicly available.

Mozilla seems to be making the most rapid progress. bugzilla.mozilla.org/show_bug.cgi?id=445494 is the tracking

bug to watch.

# Benjamin Jan Alexander Rosseaux (15 years ago)

Mark S. Miller schrieb:

Since it is open source, I have no objection to your posting the link. Please do.

Okay good to know, the URL is vserver.rosseaux.net/projects/BESEN

And my other question is, does exist an another ES5-feature-complete implementation already (for comparing/checking against for bugs etc.)?

Not yet. At least none that's publicly available. From this it follows that my implementation is the first publicly available ES5 feature-complete implementation (irrespective of the possibly remained not-yet-found bugs), right?

Benjamin 'BeRo' Rosseaux

# Brendan Eich (15 years ago)

On Apr 7, 2010, at 8:52 AM, Benjamin Jan Alexander Rosseaux wrote:

Mark S. Miller schrieb:

Since it is open source, I have no objection to your posting the
link. Please do.

Okay good to know, the URL is vserver.rosseaux.net/projects/BESEN

Hi Benjamin,

Have you runt the ES5 tests yet?

es5conform.codeplex.com

From this it follows that my implementation is the first publicly
available ES5 feature-complete implementation (irrespective of the
possibly remained not-yet-found bugs), right?

I guess. This isn't the place for getting gold stars; test results
(assuming any failing test isn't buggy) mean more than claims of being
feature complete. Sounds like you are first, though :-).

# Dmitry A. Soshnikov (15 years ago)

Hello Benjamin,

Wednesday, April 7, 2010, 7:52:55 PM, you wrote:

Mark S. Miller schrieb:

Since it is open source, I have no objection to your posting the link. Please do.

Okay good to know, the URL is vserver.rosseaux.net/projects/BESEN

Thanks, it is interesting to test.

And my other question is, does exist an another ES5-feature-complete implementation already (for comparing/checking against for bugs etc.)?

Not yet. At least none that's publicly available. From this it follows that my implementation is the first publicly available ES5 feature-complete implementation (irrespective of the possibly remained not-yet-found bugs), right?

Yes, although there are already some implementations at the moment which support some features of ES5 (Rhino, WebKit, Opera, Spider/TraceMonkey), your seems is the most complete at the moment. But you have too test it on conformance.

var x = 10; alert(delete x); // true, should be false (for [[Configurable]]) alert(x); // undefined

But identifier resolution for "x" binding (which should be resolved in the global object since it isn't deleted) from the function, says not "undefined", but "x" is not defined. If do not use delete, it resolves to 10.

(function () { alert(x); })();

It is glad to see that with "use strict" almost all cases are correct (although, I don't like strict mode itself). Inderect "eval" also works fine using as ThisBinding global object.

Dmitry.

# Benjamin Jan Alexander Rosseaux (15 years ago)

Brendan Eich schrieb:

Have you runt the ES5 tests yet?

es5conform.codeplex.com

Yeah I've fix bugs in BESEN in the last night now, so that BESEN passes mostly all bugfree testcases (against the ES5 final spec pdf checked) from this testset now, but some many testcases are buggy (typing errors (like forgotten escape chars in string literals), no more valid spec definiton tests (for example some testcases uses EvalError-Checks instead of SyntaxError-Checks), desc.hasOwnProperty('put') instead of desc.hasOwnProperty('set'), forgotten return statements (for example "e instanceof SyntaxError" instead of "return e instanceof SyntaxError;" or "if(e instanceof SyntaxError){return true;}"), mistake of the right use of between SyntaxError/TypeError and ReferenceError at some testcases (for example at some DELETE operator testcases), and so on). I'll report these bugs in the bugtracker on the codeplex page in the next days, because i must find these buggy code locations again. :-)

I guess. This isn't the place for getting gold stars; test results (assuming any failing test isn't buggy) mean more than claims of being feature complete. Sounds like you are first, though :-).

I don't want get gold stars, i want only announce my ES5 engine to the public, so that a usable OpenSource ECMAScript Engine for ObjectPascal exists now for free use for somebody.

Benjamin

# Benjamin Jan Alexander Rosseaux (15 years ago)

I've moved BESEN to Sourceforge now, so the new URL is now besen.sourceforge.net for better 24/7 reachability of the sources.

Benjamin

# Benjamin Jan Alexander Rosseaux (15 years ago)

Dmitry A. Soshnikov schrieb:

var x = 10; alert(delete x); // true, should be false (for [[Configurable]]) alert(x); // undefined

But identifier resolution for "x" binding (which should be resolved in the global object since it isn't deleted) from the function, says not "undefined", but "x" is not defined. If do not use delete, it resolves to 10.

(function () { alert(x); })();

Hm, i've checked my DELETE operator + Object.Delete + EnvRec.Delete code implementations against the ES5 final spec PDF again once more, but all instruction steps between my implementation and the PDF are exactly equal. Can you provide me more information to this, what you does mean, what may be wrong?

Anyway, a new version is available, where I've fixed some other small bugs on other code locations.

Benjamin

# David Herman (15 years ago)

I think this discussion is getting off-topic. We're happy to have accepted your initial announcement, but this list is here to discuss the language standardization and design. Discussions relevant only to a specific implementation belong elsewhere.

,

# Dmitry A. Soshnikov (15 years ago)

On 09.04.2010 10:39, Benjamin Jan Alexander Rosseaux wrote:

Dmitry A. Soshnikov schrieb:

var x = 10; alert(delete x); // true, should be false (for [[Configurable]]) alert(x); // undefined

But identifier resolution for "x" binding (which should be resolved in the global object since it isn't deleted) from the function, says not "undefined", but "x" is not defined. If do not use delete, it resolves to 10.

(function () { alert(x); })();

Hm, i've checked my DELETE operator + Object.Delete + EnvRec.Delete code implementations against the ES5 final spec PDF again once more, but all instruction steps between my implementation and the PDF are exactly equal. Can you provide me more information to this, what you does mean, what may be wrong?

See 10.5 (Declaration Binding Instantiation) step 2. So only in "eval" code binding can be deleted (for details see CreateMutableBinding, and exactly for global context -- 10.2.1.2.2 as it has Object Environment Record with Global object as Binding object).

But, yeah, as it was mentioned by David Herman, unfortunately such discussion is already off-topic for this ML; so maybe I'll contact to you later directly.

Good luck with your project.

Anyway, a new version is available, where I've fixed some other small bugs on other code locations. Benjamin

Yes, I'll check it later, I found some other bugs already.

Dmitry.