Questions tagged [interpreters]
Interpreters are tools to execute a programme or a script by reading statements written in a programming language and performing the actions required according to the semantics of the interpreted language.
99 questions
1
vote
2
answers
335
views
How would I modify the JavaScript interpreter?
I know this is a crazy question, but I want to edit the JavaScript interpreter. I don't care if it's node.js or browser-js, but I want to edit any JS interpreter, whichever is easiest to edit, so I ...
9
votes
5
answers
6k
views
How can an interpreter run code without translating into machine code?
I'm in my intro classes and trying to understand how a Java compiler works. Most posts said a compiler translates A to B (which could be machine code) to run, while an interpreter 'just' runs the code....
4
votes
1
answer
471
views
How to bind C/C++ functions for my language [closed]
I'm making an interpreter (currently in python but later I'll remake it in C++) and I wondered how I could use a C/C++ function in my language so when somebody wants to write an extension for my ...
-1
votes
2
answers
223
views
When writing a tokenizer, what is the standard practice for handling aliased language keywords?
When writing a tokenizer, what is the standard practice for handling aliased language keywords?
For example, notethat signed short int is a language keyword in C++ and several aliases might be allowed....
26
votes
10
answers
7k
views
Why are commonly compiled languages not interpreted for faster iteration?
We're all too familiar with waiting for compilation, especially on large projects.
Why isn't a thing to interpret a codebase for quick iterative development instead of generating code for a binary ...
7
votes
3
answers
2k
views
How does a JIT compiler actually emit and then call the emitted native code?
Assuming that a VM runs a JIT compiler on otherwise "interpreted" code, such as a line by line interpreter or some form of bytecode/IL code and determines that it can create optimised native ...
1
vote
1
answer
140
views
Variable binding time (Steve McConnell)
Currently reading Steve McConnell "Code complete". "General issues in using variables" chapter, "Binding time" section. He says about variable's binding time in such ...
2
votes
3
answers
211
views
How to deal with interpreter dependencies
Consumer software often has interpreter dependencies. How should a situation where the required interpreter is not by default installed on the targeted system be handled for consumer software, soft ...
0
votes
0
answers
153
views
Does v8 have nested stack frames?
In chapter 4 of the Zone JS primer the following is mentioned:
So far, we have discussed how zones are created, forked and how they maintain their state across asynchronous operations. Zones are ...
3
votes
2
answers
130
views
How do language implementations implement native-extension class instantiation?
I'm writing a language interpreter in C. I'm currently implementing a system that allows writing extension modules in C for the interpreter.
These modules are loaded into a code file like a normal ...
1
vote
2
answers
154
views
How do VMs and GCs treat objects which wrap yet active resources, but that are unreachable from user code?
I am building an interpreter in C for a simple programming language.
The interpreter is fitted with a built in garbage collector. The GC simply marks all objects which are linked from some root (the ...
3
votes
1
answer
209
views
How can one bake a GUI framework inside an interpreter without freezing the interpreter?
I am writing a bytecode interpreter in C for a simple programming language.
I want to add GUI capabilities to the language. As a first step, I decided to bake into the interpreter a wrapper for the ...
4
votes
4
answers
2k
views
Ahead-of-time compilation to native machine code of dynamically typed languages
It is my understanding that:
It's particularly difficult to compile ahead of time, to efficient native machine code, a dynamically typed language like Python.
Largely as a result of the above, the ...
-3
votes
1
answer
76
views
What are the existing solutions for creating object graphs in an interpreter?
Please let me know if this isn't the right SE site (or otherwise) for this kind of question, it's the best match I could find.
I'm working on a humble interpreter written in C for a simple language I'...
-1
votes
3
answers
4k
views
Is it really always easier to write an interpreter than a compiler?
I've read that generally it's easier to write an interpreter than a compiler.
If that's true, what's the reason? Writing an interpreter seems to me equivalent in the level of difficulty as writing a ...