Questions tagged [jasmin]

Jasmin is an assembler for the Java Virtual Machine. It takes ASCII descriptions of Java classes, written in a simple assembler-like syntax using the Java Virtual Machine instruction set. It converts them into binary Java class files, suitable for loading by a Java runtime system.

Jasmin is an assembler for the Java Virtual Machine. It takes ASCII descriptions of Java classes, written in a simple assembler-like syntax using the Java Virtual Machine instruction set. It converts them into binary Java class files, suitable for loading by a Java runtime system.

Jasmin was originally created as a companion to the book "Java Virtual Machine", written by Jon Meyer and Troy Downing and published by O'Reilly Associates. Since then, it has become the de-facto standard assembly format for Java. It is used in dozens of compiler classes throughout the world, and has been ported and cloned multiple times. For better or worse, Jasmin remains the oldest and the original Java assembler.

The O'Reilly JVM book is now out of print. Jasmin continues to survive as a SourceForge Open Source project.

83 questions
0
votes
1 answer

Java Imports, Assembly (Krakatau), and Source Code

So here's my situation: I am running a Java Client/Server architecture that has high CPU usage and I'm trying to reduce the lag time on the main "server" thread. I have been profiling the server with YourKit to identify the CPU-hogging code. The…
Sameer Puri
  • 987
  • 8
  • 20
0
votes
1 answer

Jasmin invoke a method using arguments

I'm writing a compiler that generates Jasmin code and I want to invoke a method using an argument, as follows: val test(val x) { return x; } val main (string[] args) { test(1); } This compiles to: .class public helloworld .super…
appel
  • 517
  • 2
  • 7
  • 19
0
votes
1 answer

Jasmin invoke local method results in VerifyError

I'm trying to invoke a local method, pow(), as follows. My class looks like this. .class public helloworld .super java/lang/Object .method public pow(II)I ... .end method .method public foo()V ... ldc 1 ldc 2 invokevirtual…
appel
  • 517
  • 2
  • 7
  • 19
0
votes
1 answer

How to generate bytecode for if-else statement

how do I generate the code corresponding to a bytecode instruction IF THEN - ELSE with the optioanal ELSE branch? For example, the program If-else.pas is considered correct, while the program If.pas isn't considered correct, because it doesn't…
user3602008
0
votes
1 answer

Java Bytecode - Register 1 contains wrong type

I am currently stuck on the following problem: Trying to execute the code below, I get the java error of "Register 1 containing the wrong type". Since I am only working with 1 stack-block integers I really wonder how the wrong type got in that…
schneiti
  • 428
  • 1
  • 8
  • 22
0
votes
2 answers

JVM, the constant pool, the heap and the addresses

If I create a new item in Jasmin assembly and then store it, I do it with the instruction aload, since it's an address: new Object dup invokespecial..... astore_3 ; load the object reference into local variable 3 Now, if I want to…
fast-reflexes
  • 4,891
  • 4
  • 31
  • 44
0
votes
1 answer

How to interprete this disassembled line by using dedexer?

The following is snipcode disassembled using dedexer on a android market app, in the invoke-virtual, I don't understand what can the original Java code be: invoke-virtual…
user618815
0
votes
2 answers

Jasmin how to force long field to be long constant?

I managed to isolate my problem in this test case: .bytecode 50.0 .class public test .super java/lang/Object .field public static final foo1 J = 1 .method public ()V .limit stack 1 .limit locals 1 .var 0 is this Ltest; from…
luiscubal
  • 24,773
  • 9
  • 57
  • 83
1 2 3 4 5
6