The bytecode tag has no usage guidance.
1
vote
2answers
63 views
What should JITed bytecode do exactly?
I'm working on a VM (and a scripting language for it) that I plan to implement JITing for. I'm only working on the "plumbing" of it now, but I don't want the JIT compiler to be an afterthought. ...
3
votes
3answers
292 views
Why does Python need both a compiler and an interpreter?
I can understand the fact that Java needs both a compiler and an interpreter. It compiles source code to bytecode and then a virtual machine (on Windows, on Linux, on Android, etc.) translates that ...
4
votes
5answers
971 views
Compilation to bytecode vs machine code
Does compilation that produces an interim bytecode (like with Java), rather than going "all the way" to machine code, generally involve less complexity (and thus likely take less time)?
3
votes
1answer
146 views
Why is the Java bytecode instruction set not orthogonal?
Section 2.11.1 of the JVM 8 Specification includes the words:
In other words, the instruction set is intentionally not orthogonal.
From my perspective, that implies that the Java bytecode ...
0
votes
1answer
119 views
Is using digital signatures and bytecode machines a viable technique to make reverse engineering hard? [duplicate]
If I have a private key with which I sign byte code, and a public key with which I can decipher the signed code to verify its authenticity, can I protect that byte code from being reverse engineered ...
-2
votes
2answers
160 views
Creating a language for the virtual machine of another language: compile to that language or compile to the byte code? [closed]
I want to create a compiler for language - Call the language, "A". I want my compiler to compile code, capable of running on language B's virtual machine.
Would it be a better choice to compile ...
1
vote
2answers
404 views
Why does a bytecode VM use stack or registers opposed to direct operations? [duplicate]
I'm working on a simple bytecode interpreter to learn how virtual machines work. I've read about VMs and it seems that all of them are either stack based or register based. At the time it made sense, ...
17
votes
3answers
2k views
Why do VMs need to be “stack machines” or “register machines” etc.?
(This is an extremely newbie-ish question).
I've been studying a little about Virtual Machines.
Turns out a lot of them are designed very similarly to physical or theoretical computers.
I read that ...
3
votes
6answers
3k views
Is Java Bytecode interpreted? [closed]
The definition of interpretation (correct me if I'm wrong) is parsing code like so:
1- Translate currently parsed line to some intermediate language. 2- Run the translated line. 3- Move to the next ...
-2
votes
3answers
170 views
Why don't interpreters interpret bytecode (like VMs) - instead of source code? [closed]
Edited the question to be more clear:
It is known that interpreting bytecode is much faster than interpreting source code or some IL version of the source code. The interpreter has a much easier time ...
0
votes
4answers
340 views
What exactly is Virtual Machine Bytecode? [closed]
I want to work on a very simple compiler for a very simple language. The compiler will compile the code to some basic bytecode. Later, a virtual machine program will run the bytecode, and execute the ...