Error "Illegal type in constant pool"

355 views
Skip to first unread message

Olof Karlsson

unread,
Feb 25, 2014, 3:54:36 PM2/25/14
to proglang-c...@googlegroups.com
When trying to run a jasmin compiled .class file from our own Code Generator, we get this error:

Exception in thread "main" java.lang.VerifyError: (class: test, method: main signature: ([Ljava/lang/String;)V) Illegal type in constant pool

I assume there is something wrong with the code generator, can it have anything to do with the "ldc" jasmin methods?

John J. Camilleri

unread,
Feb 26, 2014, 3:46:38 AM2/26/14
to Olof Karlsson, proglang-c...@googlegroups.com
Yes, it's probably related to ldc.
You don't need to use constant pools for this lab. To push a number on the stack, you can use the iconst_ instructions, bipush, and sipush.

John


--
You received this message because you are subscribed to the Google Groups "proglang-course-2014" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proglang-course-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages