Alternative compiler

May 2, 2012 at 3:43 AM

Hello,
I examined assemblies generated by current Jurassic compiler and I think those can be faster. So I wrote part of new compiler and small performace preview. This preview is the developer/performance preview only and works with the attached code only. Original Jurassic build is jurassic-39608d99435c.zip.

https://docs.google.com/open?id=0B-sgXn77UBhISjFFOWlOZWVXUGs

New-compiler features:
-no need whole jurassic dll (but there still stay some runtime methods: look at Jurassic.Runtime namespace; there will be global objects too)
-two runtime methods usage: call runtime assembly vs. copy used methods into generated assembly
-Eval function can't be called (generated assembly have no any parser/compiler)

Please let me know what you think about this preview.

Sep 2, 2012 at 5:40 AM

Hello again,
I finished the main parts of a compiler that has a little different goal than the original Jurassic has - need scripting engine, which let to extend my web engine.

https://docs.google.com/open?id=0B-sgXn77UBhIQWZvUm44T2lSb1U

Features:
-no support for SilverLight and/or CompactFramework
-Eval function isn't implemented (generated assembly have no any parser/compiler)
-compiled assembly no need Jurassic to execute
-compiled assembly need small runtime library (needed parts will be compiled into target assembly in the feature)
-deep integration with external properties/objects

Only big problem is: Jurassic have no detachable parser.

Get this to run (who interested in):
1) download solution
2) unzip solution
3) download original Jurassic build is jurassic-39608d99435c.zip.
4) unzip Jurassic to PerfTestFullDistrib\Jurassic directory - don't replace included/modified files
5) open in VisualStudio (i'm working with VS 2012)
6) build/execute

Please let me know what you think about.

Coordinator
Sep 2, 2012 at 11:33 PM

Interesting!  May I ask what the motivation behind this is (what is your "web engine")?

Sep 3, 2012 at 7:33 PM

Sure you may.  I have some components which I can combine - those are writen in C#. That is data/business layer.

It is needed some renderer to "transform" data (like System.Collection.Generic.List<Article>) into response/html. I know there is asp.net/webforms in .NET, but html coders don't know asp.net. So I thought how to simplify. I'm using XSLT compiling and reusing assemblies, but JS could be faster to write scripts and easier to use. JS could be faster to execute too.

That is my goal. I understand it's little different than yours.

If you look at my code - let me know if you will implement some parts into Jurassic, please.