How does the javascript dart compiler (dart2js) work?

Dart runs in its own Dart VM, but you can compile it for modern, optimized JavaScript. But how does it work? Are there any articles or documents on the Internet that explain this process?

I am wondering if this simple coincidence of an element with an element is easy, only the time for developing, processing or having some Dart elements / aspects that cannot be compiled for JavaScript.

http://www.dartlang.org

EDIT: thanks for your 2 answers. The fact is that I told the college about the dart, and this dart can be compiled in JavaScript. He agreed that it could be compiled for JavaScript, but that would lead to mumbojumba code and would only work for simple things. In the end, he said: "Well, explain. How will this compilation work on non-trivial code? '' '

That is why I ask. I was hoping there were some online materials that I could relate to him.

+5
source share
3 answers

The Dart editor will now compile your Dart code in JavaScript using dart2js.

As for the second part of your question, the dart: io libraries are for server / command line only, so they cannot be compiled with dart2js.

, : " dart2js", " dart2js"

dart2js: http://news.dartlang.org/2012/05/new-dart-to-javascript-compiler-ready.html

(Kasper Lund), , : " , SSA ( ) Dart. "

http://code.google.com/p/dart/source/browse/#svn%2Fbranches%2Fbleeding_edge%2Fdart%2Flib%2Fcompiler%2Fimplementation

+4

- , ?

- - . , , ( Dart , , ). " ", , , . , SSA (, , ).

+1

All Articles