Not necessarily looking for performance gains from LLVM.  Instead, the value comes from having a common base platform which can gain language independence, address security concerns, support common tooling (debugging, editing, etc), and perhaps even introduce common language features (annotations / AOP).<div>

<br></div><div>I'm envisioning a use case where browsers would utilize this runtime to execute not only javascript, but also python, ruby, etc.  Language specific interpreters could be downloaded on the fly to support scripts, and security would be ensured due to the fact that it would be based within the LLVM layer.  The LLVM layer would also provide the access point for common browser APIs like access to the DOM and HTML nodes, XSLT, and XHR invocations.  This would open up both the browser and current HTML5 application platforms to a wide variety of languages.   Some may be quite happy with Javascript, but I'm sure others would be excited to see that stranglehold broken.</div>

<div><br></div><div>And for this purpose, I think LLVM would be well suited.  It really depends on how much existing work can be leveraged, and how much interest exists within the community to see this happen.</div><div>
<br>
</div><div>-jjk</div><div><br><div class="gmail_quote">On Sat, Aug 18, 2012 at 9:56 PM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Most of the performance wins for dynamic languages are not from the<br>
kinds of optimizations that LLVM does; you basically gain performance<br>
by doing run-time specialization of dynamic language constructs to<br>
become static, which is something that LLVM really won't help you do,<br>
and which practically speaking is extremely language-specific.<br>
<br>
For example, in JavaScript, all numbers are officially doubles, but in<br>
many cases it is profitable to runtime-specialize them to be integers,<br>
on the other hand, Python distinguishes between floats and integers,<br>
but Python integers overflow into arbitrary-precision integers<br>
on-demand.<br>
<br>
For another example, in Python, dictionaries can have any hashable<br>
type as their key, but in JavaScript, "objects" (which double as<br>
hashtables) can only have strings as their keys (although numbers get<br>
implicitly converted to strings which is another big language-specific<br>
optimization opportunity). Oh, and in JavaScript "objects" have a<br>
number of additional semantics which prevent them from being actually<br>
used as pure hashtables!<br>
<br>
--Sean Silva<br>
<div><div class="h5"><br>
On Sat, Aug 18, 2012 at 4:39 PM, Julian Klappenbach<br>
<<a href="mailto:jklappenbach@gmail.com">jklappenbach@gmail.com</a>> wrote:<br>
> I have a concept for which I'm conducting an initial analysis.  The broader<br>
> idea is to create an LLVM, JIT based runtime that would create a platform<br>
> amenable to scripting languages, but do so while enforcing an optional<br>
> sandbox environment when dictated by security concerns (browsers, user<br>
> preferences).  With this approach, the community would gain language<br>
> independence for browsers, as well as enabling much needed standardization<br>
> over tooling support for debugging, refactoring, and even general editing<br>
> concerns.<br>
><br>
> The first language I'd like to tackle is ECMAScript / Javascript.<br>
><br>
> So, aside from all the issues with the strategy (getting buy-in from browser<br>
> / tooling teams, development community), my first concern is that it is even<br>
> possible.  Theoretically, it should be possible to express Javascript in<br>
> LLVM.  But a quick review of existing projects indicates that, while LLVM -><br>
> Javascript has been taken on, what I'm seeking has not been done to date.<br>
><br>
> Have I missed anything, or is there any reason not to attempt a project like<br>
> this?<br>
><br>
> Regards,<br>
><br>
> Julian Klappenbach<br>
><br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
><br>
</blockquote></div><br></div>