[PATCH 4/4] Fix some reserved word usages in ecmascript implementation

2020-10-28 Thread Sean Lynch
Reserved words are valid ecmascript in certain contexts, referred to by the IdentifierName syntax rule. For example, while throw is a keyword, using throw as a property accessor such as foo.throw is valid. While this implementation isn't quite correct, it is an improvement. For an example of how th

[PATCH 3/4] Implement ecmascript function prototype.

2020-10-28 Thread Sean Lynch
Per section 19.2.4.3 of the 2020 ECMAScript specification, functions that can be used as a constructor must have a fresh prototype. * module/language/ecmascript/compile-tree-il.scm: Use make-js-function procedure when creating an ecmascript function. This provides the function with a fresh pro

[PATCH 2/4] Implement ecmascript try/catch.

2020-10-28 Thread Sean Lynch
Implement ecmascript try/catch using with-exception-handler/rais-exception respectively so that it is straight-forward to interact with ecmascript exceptions from scheme. * module/language/ecmascript/compile-tree-il.scm: Compile try/catch * module/language/ecmascript/impl.scm: Provide js-try and j

[PATCH 0/4] Support ECMAScript Test262 Assertion Harness

2020-10-28 Thread Sean Lynch
Hello all, I've been hacking a bit on the ECMAScript implementation and thought it might be useful to be able to run the ECMAScript Test262 test suite, so I implemented just enough to be able to load the assertion harness required by all tests. I thought I'd check in to see if there was any intere

[PATCH 1/4] Support ecmascript return operator with no operand.

2020-10-28 Thread Sean Lynch
* module/language/ecmascript/compile-tree-il.scm: Support return operator with no operand. --- module/language/ecmascript/compile-tree-il.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/language/ecmascript/compile-tree-il.scm b/module/language/ecmascript/compile-tree-il.scm ind