Skip to main content

Questions tagged [bytecode]

For questions about design and implementation of bytecode formats, packed instruction formats used as a compilation target and to be run by a virtual machine.

Filter by
Sorted by
Tagged with
7 votes
4 answers
272 views

How can we backpatch differently-sized jump instructions?

Consider a compiler whose target language is some virtual machine bytecode. The jump instructions have to encode the size of their jumps. For example, in JVM bytecode the ...
hugomg's user avatar
  • 1,335
3 votes
2 answers
145 views

Why does the bytecode need to be verified before uploading to a virtual machine?

Some virtual machines needs to verify bytecode before running, like JVM. But, why does the bytecode need to be verified before uploading to a virtual machine?
чистов_n's user avatar
3 votes
2 answers
169 views

What operations are common in register-based virtual machines?

A register-based virtual machine necessarily contains at least some operations to manipulate registers. Like PUSH <register> <value>. What are some of ...
чистов_n's user avatar
11 votes
3 answers
203 views

How are strings, lists and dicts implemented in bytecode?

How do I implement strings, lists and dicts in bytecode? For example, disassembling the bytecode might look like this: LOAD str "hello, world" But how ...
чистов_n's user avatar
5 votes
1 answer
163 views

What are the pros and cons of ways to implement the LOAD command in a statically typed VM?

What are the pros and cons of ways to implement the LOAD command in a statically typed VM? There is two ways to implement LOAD ...
чистов_n's user avatar