Fwd: [judoscript] [Ann] Jamaica: The JVM Macro Assembly Language

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: [judoscript] [Ann] Jamaica: The JVM Macro Assembly Language

Owen Densmore
Administrator
Weird!  A Java assembler!  From the examples:

public class CFirstCls
{
   int count;

   public CFirstCls() {
     iconst_0
     putfield count int
     return
   }

   public void inc(int amount) {
     getfield count int
     iload amount
     iadd
     putfield count int
     return
   }

   public void printSelf() throws IOException {
     getstatic System.out PrintStream
     aload this    // same as aload_0
     invokevirtual PrintStream.println(Object)void
     return
   }

   public String toString() {
     ldc "It's only me!"
     areturn
   }
}

Begin forwarded message:

> From: "judoscript" <[hidden email]>
> Date: March 16, 2004 11:23:11 AM MST
> To: [hidden email]
> Subject: [judoscript] [Ann] Jamaica: The JVM Macro Assembly Language
> Reply-To: [hidden email]
>
> Jamaica, the JVM Macro Assembler, is an easy-to-learn and easy-to-use
>  assembly language for JVM bytecode programming. It uses Java syntax
>  to define a JVM class except for the method body that takes bytecode
>  instructions, including Jamaica's built-in macros. In Jamaica,
>  bytecode instructions use mnemonics and symbolic names for all
>  variables, parameters, data fields, constants and labels. Jamaica is
>  a simplified JVM assembly language. It does not support inner
>  classes. Variables are all method-wide and are strongly-typed.
>
>  Jamaica is a language facade for a Java class creation API,
>  JavaClassCreator. This API closely mimics the Jamaica language,
>  allows users to define a Java class with the same flow, and supports
>  all the Jamaica instruction set and macros.
>
>  Why Jamaica? Even with the rigid JVM architecture and verification,
>  creating JVM classes at bytecode level is still highly risky and
>  error-prone. With Jamaica, you can quickly experiment dynamically
>  creating classes; once done, mechanically convert the Jamaica source
>  code into JavaClassCreator API calls. Jamaica is currently the only
>  macro assembler for JVM, and serves this purpose very well.
>
>
> http://www.judoscript.com/articles/jamaica.html
> http://www.judoscript.com/articles/JavaClassCreator.html
> http://www.judoscript.com/download