6 ms·
I have no idea what you're talking about. Under what circumstances is Dart AOT compiled and run untrusted? No browsers support Dart as a first-class citizen. If
by pitaj 8y ago
I have no idea what you're talking about. Under what circumstances is Dart AOT compiled and run untrusted? No browsers support Dart as a first-class citizen. If you're talking about compiling Dart into JS, that's obviously not what anyone is talking about.
There are no Ecmascript AOT compilers. By definition, Ecmascript must be run with an interpreter. AFAIK with the dynamic complexity of the language it's impossible to AOT compile even without things like `eval` and `new Function`.
A better example would be NaCl which as I understand it runs native machine code in a sandbox.
- bjourne 8y agoWhat I'm talking about? "Yes, but when pre-compiling, you implicitly trust the code." Citation needed. It's not true at all.
- geofft 8y agoCan you give one example of a case where code is compiled AOT and not trusted during compile time? (Your example of Dart was challenged, and I agree that it is not an example, so a more detailed explanation of why it is an example would count.)
- bjourne 8y agoWhy on earth wouldn't Dart count? It is AOT-compiled and meant to be run untrusted inside a Dart VM inside a web browser. That was the intention of the project even if it was cancelled and the VM deprecated. For more examples, see ActionScript on iOS, TFA itself or any of the myriad of projects trying ti AOT-compile JavaScript. For example https://link.springer.com/article/10.1134/S036176881701008X https://link.springer.com/article/10.1134/S036176881701008X