Comments (6)
from jasm.
from jasm.
Hello! Glad to hear you're finding it useful, and thank you for the kind comments :)
The issue you're having is caused by the iconst
lines - the correct syntax for iconst is:
iconst <num>
i.e. there are not separate instructions for the individual constants. If you remove the underscore, e.g.
iconst_1 => iconst 1
iconst_0 => iconst 0
Then it should work 🙂
So that's a workaround, however I do consider this to be a bug - it should be giving useful error messaging rather than a NullPointerException
so will look at getting that fixed - thanks for the report!
from jasm.
Using "iconst 0" and "iconst 1" works fine. Thanks :-)
Just a small question about the project. Is JASM intended to implement all JVM opcodes? In that case, I suggest taking a look at [Oracle documentation](https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-6.html#:~:text=an% 20ArrayIndexOutOfBoundsException.- ,iconst_%3Ci%3E,-Operation). In this document, if I'm not mistaken, there are opcodes iconst_0 and iconst_1.
from jasm.
great, glad to hear the workaround fixed it for you 🥳
Indeed, those are the opcodes, and under the hood jasm assembles the code to the appropriate one based on the number - as an assembler, the syntax is designed to be consistent and convenient rather than necessarily exactly matching the underlying bytecode 🙂.
from jasm.
Nice. I got it. Thanks for your help!
from jasm.
Related Issues (13)
- Instruction mnemonics are not usable as member names
- Convert Class Files to Jasm HOT 5
- Error running README.md example HOT 2
- Annotations? HOT 5
- Parser issues with names and string escape HOT 3
- Improve String escapes
- Support literal names in disassembler
- Disassemble NPE HOT 1
- Cannot read field "outgoingEdges" because "handlerRangeBlock" is null HOT 2
- Runtime invisible annotation support, aka "class"-level annotations HOT 4
- How do I run this from the command line? HOT 2
- gradlew check fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jasm.