Skip to main content

Questions tagged [bytecode]

Use this tag for questions regarding the meta-layer code is compiled to before beeing interpreted by a virtual machine. E.g. Java Bytecode for Java or CIL for C#.

0 votes
1 answer
186 views

I am thinking about how to build a language VM. I have been able to get some of the basic constructs right, including jumps to functions within the chunk of bytecode that is currently loaded. But now ...
mydoghasworms's user avatar
2 votes
1 answer
310 views

I am trying to implement a basic bytecode VM, which I plan to target with a compiler. How can I implement the ability to call external C functions using the bytecode, i.e., call arbitrary functions in ...
Greatcode's user avatar
173 votes
4 answers
36k views

You'd often see that JavaScript is actually being transported over the web with all the useless stuff that doesn't need to be there -- Comments, particularly those containing licenses, indentations ('\...
zombiesauce's user avatar
  • 1,441
-2 votes
2 answers
760 views

Is it, at least theoretically, possible to convert a Java application into native code that can be run by something else written in Java? One example of this could be a Minecraft Spigot server. You ...
User's user avatar
  • 3
37 votes
8 answers
13k views

If one needs different JVMs for different architectures I can't figure out what is the logic behind introducing this concept. In other languages we need different compilers for different machines, but ...
Pranjal Kumar's user avatar
7 votes
2 answers
2k views

Over the course of the past few days, I've been trying many different methods for correctly calculating jump targets in bytecode, but none have been practical or reliable. Furthermore, the methods I'...
Chris's user avatar
  • 2,860
0 votes
4 answers
2k views

Let's say I have a phone that can process 1 million operations per second and a micro controller that can perform 1000. Is there a way to tell how many operations a performed by a function or block ...
1.21 gigawatts's user avatar
6 votes
3 answers
3k views

Note: This question is somewhat related to How exactly is bytecode "parsed"?, but it is not a duplicate of it. In this question, I'm asking about a specific part of how bytecode is generated, not how ...
Chris's user avatar
  • 2,860
3 votes
4 answers
1k views

In my basic understanding of ByteArrays the benefit is that it is smaller in file size. The down size of a ByteArray is that for any given format you have to know the about the file format to get ...
1.21 gigawatts's user avatar
7 votes
3 answers
718 views

TL;DR What procedure is followed when selecting bytes to represent opcodes? Are byte(s) for opcodes just randomly chosen, and them mapped to mnemonics? I recently learned from this answer that ...
Chris's user avatar
  • 2,860
4 votes
3 answers
3k views

How is Bytecode "parsed"? It is my understand that Bytecode is a binary, intermediate representation of the syntax of a given programming language. Certain programming languages convert their source ...
Chris's user avatar
  • 2,860
2 votes
1 answer
1k views

I am going to write a very simple VM and bytecode compiler. Is it typical for a bytecode compiler to read the syntax and attempt to create the bytecode directly or is there an intermediate stage to ...
Synaps3's user avatar
  • 147
6 votes
2 answers
903 views

Let's say I am to design a JIT interpreter that translates IL or bytecode to executable instructions at runtime. Every time a variable name is encountered in the code, the JIT interpreter has to ...
MathuSum Mut's user avatar
2 votes
2 answers
275 views

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. ...
Famand's user avatar
  • 21
11 votes
3 answers
8k views

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 ...
aris's user avatar
  • 119

15 30 50 per page