Hi Lea, if you want to design your own toy language, I would not pick V8. Here is why: - V8 is highly optimized for performance. The price is that the code is mostly not straight-forward. A big part of V8 would not be necessary if performance was not an issue. - Javascript is a language with many quirks and pitfalls. V8 went great lengths to implement those. - Javascript is not meant to compile code ahead of time. Therefore V8 does not compile into native binaries.
What you could consider is to compile your language into javascript, and have that run on top of V8. But that probably does not comply with your goal to learn about compiler construction. Yang On Monday, March 25, 2013 11:31:16 AM UTC+1, Lea Hayes wrote: > > Hey guys > > I am learning about compiler construction and want to design and create a > simple programming language. I am currently exploring various backend > projects which are capable of generating machine code on-the-fly. > > I have been considering LLVM, Nanojit and Lightning and have found that > LLVM is quite large but produces highly optimised binaries (and/or JIT). > Nanojit seems a lot smaller and at this point I am unsure as to whether it > can do compiled binaries as well as JIT's. > > Then it occurred to me, V8 is an extremely efficient implementation of > JavaScript implemented in C++. Is it feasible for me to use some of the V8 > source as the backend for a multiplatform compiler that supports both JIT > and native binaries? > > Many thanks > -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
