| Summary: | Jamaica, the JVM Macro Assembler, is an easy-to-use assembly language for JVM bytecode programming. It uses Java syntax to define a JVM class, and, in method bodies, it takes bytecode instructions and Jamaica's built-in macros. All of Jamaica's bytecode instructions use mnemonics and symbolic names for variables, parameters, data fields, constants, and labels. Jamaica macros make JVM assembly programs shorter and easier to read. Internally, Jamaica uses a Java API, JavaClassCreator, to create Java classes. This API is much more abstract than low-level APIs such as ASM and the Byte Code Engineering Library (BCEL). It closely mimics the Jamaica language, allows users to define a Java class with the same flow, and supports all the Jamaica instructions and macros. The JavaClassCreator API currently supports implementations atop the ASM and BCEL. Creating JVM classes at bytecode level is risky and error-prone. Jamaica allows you to quickly experiment dynamically with creating Java classes; once complete, you can mechanically convert the Jamaica source code into JavaClassCreator API calls. This article introduces you to the convenience of the Jamaica language. (3,800 words; May 3, 2004)
|