All Questions
Tagged with compiler javascript
17 questions
0
votes
1
answer
85
views
Structuring a Compiler in a Dynamic Language (JavaScript)
For learning purposes, I'm trying to build a compiler in JavaScript for a tiny custom language and turn it into WASM. So far, I've got a lexer and parser, that turn my code into an AST, my question is ...
1
vote
1
answer
173
views
How to design a system that can operate and replay its functions call stack?
I am writing a processor for the Citation Style Language (CSL) in JavaScript.
Before I explain what my problem is, I must give some context first:
CSL is an XML specification for describing how to ...
1
vote
1
answer
503
views
How function parameters are compiled in JavaScript
I am trying to understand how functions -- which could have dozens of parameters that could themselves be functions or complex objects (I'm thinking JavaScript) -- get passed the arguments when ...
3
votes
1
answer
593
views
Javascript / Ecmascript language grammar disambiguation
I'm working on the design of a compiler for a language in which I have to use curly brace for two different purposes. I am currently stuck in writing a non-ambiguous grammar but I realized that some ...
0
votes
1
answer
487
views
Comparison of modern browsers' javascript engine JITs
I understands that most of the recent browsers use JIT compilation to execute javascript. What I do not understand is: which part of javascript is JIT'ed - the script, or the bytecode?
Let me explain....
0
votes
3
answers
3k
views
Are browser console errors 'compiler errors', 'runtime errors', or neither?
I was trying to communicate with a coworker about a JavaScript error I was being notified about in my browser's console window when I realized that I wasn't sure if I should refer to this as a ...
24
votes
4
answers
21k
views
How does Chrome V8 work? And why was JavaScript not JIT-Compiled in the first place?
I have been researching Interpreters/Compilers, then I stumbled across JIT-Compilation - specifically Google Chrome's V8 Javascript Engine.
My questions are -
How can it be faster than standard ...
7
votes
3
answers
2k
views
Is prototypal inheritance inherently slower?
I see Javascript 6 will add traditional class based inheritance, and one argument I hear is that classes are inherently much faster than prototypes because they can be optimized away by the compiler ...
1
vote
3
answers
493
views
From a technical point of view, could JavaScript be compiled instead of interpreted?
The question title speaks for itself. I'm specifically thinking in terms of a Node.js server. Additionally, this question is assuming that you don't need eval().
Also, if this is not possible, why ...
2
votes
2
answers
2k
views
embedding programming languages into other languages [duplicate]
In C/C++, there is a keyword that allows you to enter assembly language directly into a method.
Example
int Main()
{
__asm // notify the compiler that this block is assembly language.
{
...
28
votes
2
answers
10k
views
What is ASM.js and what does it mean for everyone?
I'm starting to hear rumblings about this project called ASM.js. Currently their web site is terrible and confusing. Here's what I know from my research on the web.
It is a subset of JavaScript that ...
4
votes
3
answers
682
views
Compiling multiple languages and Javascript
I have read numerous times that programming languages when making games or large software often use multiple languages / scripts together. I'm wondering how that works. How do they compile it? How ...
19
votes
5
answers
2k
views
Is Google Closure a true compiler?
This question is inspired by the debate in the comments on this Stack Overflow question. The Google Closure Compiler documentation states the following (emphasis added):
The Closure Compiler is a ...
2
votes
4
answers
583
views
How should I evaluate new browser languages?
In these days there are many projects whose aim is to bring new languages to the browser by compiling them to JavaScript. Among the others one can mention ClojureScript, CoffeScript, Dart, haXe, ...
3
votes
2
answers
738
views
Google Closure Compiler - what does the name mean?
I am curious about the Google Closure Compiler. Why did they name it that? Does it have anything to do with lexical closures?
EDIT: I tried researching it in the FAQ and documentation, as well as ...