Changeset 2395


Ignore:
Timestamp:
Feb 11, 2007, 6:05:56 PM (14 years ago)
Author:
yura
Message:
  • New mane for ClassWriter? methods
  • V1_2 for generated classes.
Location:
to-imperative/trunk
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/compiler/rfp_asail_jbc.rf

    r2394 r2395  
    8989          )'}');;
    9090      } :: e.entry,*/
    91   <"visit" s.cw 46 &"ACC_PUBLIC" s.class-name <Null> "java/lang/Object" ()>,
     91  <CWvisit s.cw &"V1_2" &"ACC_PUBLIC" s.class-name <Null> "java/lang/Object" ()>,
    9292  <Module-To-JBC s.cw e.module>,
    9393
    9494  {
    9595    <? &Entry-Name> : s.name =
    96       <Store &MVbox <"visitMethod" s.cw <"+" &"ACC_PUBLIC" &"ACC_STATIC"> "main" "([Ljava/lang/String;)V" <Null> ()>>,
     96      <Store &MVbox <CWvisitMethod s.cw <"+" &"ACC_PUBLIC" &"ACC_STATIC"> "main" "([Ljava/lang/String;)V" <Null> ()>>,
    9797      <MVvisitTypeInsn <MV> &NEW "org/refal/plus/Result">,
    9898      <MVvisitInsn <MV> &DUP>,
     
    104104  },
    105105
    106   <Store &MVbox <"visitMethod" s.cw &"ACC_STATIC" "<clinit>" "()V" <Null> ()>>,
     106  <Store &MVbox <CWvisitMethod s.cw &"ACC_STATIC" "<clinit>" "()V" <Null> ()>>,
    107107  {
    108108    <? &Objects> : e (s.j-name s.rf-name e.cl-name) e,
     
    131131//  {
    132132//    <? &Func-Refs> : e (s.cl-name s.mod-name s.func-name) e,
    133 //      <"visitInnerClass" s.cw s.cl-name <Null> <Null> &"ACC_STATIC">,
     133//      <CWvisitInnerClass s.cw s.cl-name <Null> <Null> &"ACC_STATIC">,
    134134//      $fail;;
    135135//  },
    136136     
    137   <"visitEnd" s.cw>,
    138 
    139   <Box (<"toByteArray" s.cw> e.java-module-name)> :: s.res,
     137  <CWvisitEnd s.cw>,
     138
     139  <Box (<CWtoByteArray s.cw> e.java-module-name)> :: s.res,
    140140  {
    141141    <? &Func-Refs> : e (s.cl-name s.mod-name s.func-name s.type) e,
    142142      <ClassWriter <"+" &"COMPUTE_MAXS" &"COMPUTE_FRAMES">> :: s.cw,
    143       <"visit" s.cw 46 &"ACC_FINAL" <To-Word s.class-name '$' s.cl-name> <Null> "java/lang/Object" ("org/refal/plus/Func")>,
    144       <"visitMethod" s.cw 0 "<init>" "()V" <Null> ()> :: s.mv,
     143      <CWvisit s.cw &"V1_2" &"ACC_FINAL" <To-Word s.class-name '$' s.cl-name> <Null> "java/lang/Object" ("org/refal/plus/Func")>,
     144      <CWvisitMethod s.cw 0 "<init>" "()V" <Null> ()> :: s.mv,
    145145      <MVvisitVarInsn s.mv &ALOAD 0>,
    146146      <MVvisitMethodInsn s.mv &INVOKESPECIAL "java/lang/Object" "<init>" "()V">,
     
    148148      <MVvisitMaxs s.mv 0 0>,
    149149      <MVvisitEnd s.mv>,
    150       <"visitEnd" s.cw>,
    151       <"visitMethod" s.cw &"ACC_PUBLIC" "eval" "(Lorg/refal/plus/Expr;Lorg/refal/plus/Result;)Z" <Null> ("org/refal/plus/RefalException")> :: s.mv,
     150      <CWvisitMethod s.cw &"ACC_PUBLIC" "eval" "(Lorg/refal/plus/Expr;Lorg/refal/plus/Result;)Z" <Null> ("org/refal/plus/RefalException")> :: s.mv,
    152151      <MVvisitVarInsn s.mv &ALOAD 1>,
    153152      <MVvisitVarInsn s.mv &ALOAD 2>,
     
    162161      <MVvisitMaxs s.mv 0 0>,
    163162      <MVvisitEnd s.mv>,
    164       <"visitEnd" s.cw>,
    165       <Put s.res (<"toByteArray" s.cw>
     163      <CWvisitEnd s.cw>,
     164      <Put s.res (<CWtoByteArray s.cw>
    166165        <Middle 0 1 e.java-module-name> <To-Word <R 0 e.java-module-name> '$' s.cl-name>)>,
    167166      $fail;;
     
    170169  <? s.res>;
    171170
    172 //  <"toByteArray" s.cw> e.java-module-name;
     171//  <CWtoByteArray s.cw> e.java-module-name;
    173172
    174173
     
    316315      { <? &Entry> : e t.name e = <Store &Entry-Name s.funcName>;; },
    317316      <Function-Description (e.args) (e.ress) s.retType> :: s.desc,
    318       <Store &MVbox <"visitMethod" s.cw s.accessMode s.funcName s.desc <Null> ("org/refal/plus/RefalException")>>,
     317      <Store &MVbox <CWvisitMethod s.cw s.accessMode s.funcName s.desc <Null> ("org/refal/plus/RefalException")>>,
    319318      <ASAIL-To-JBC e.body>,
    320319      s.tag : {
     
    331330      } :: e.n,
    332331      <To-Word e.n> :: s.n,
    333       <"visitField" s.cw s.accessMode s.n "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
     332      <CWvisitField s.cw s.accessMode s.n "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
    334333      <FVvisitEnd s.fv>,
    335334      <Put &Constants (s.n e.expr)>;
     
    340339      <To-Word <Rfp2Java s.obj-name>> :: s.n,
    341340      <"+" &"ACC_STATIC" <"+" &"ACC_FINAL" <Access-Mode t.name>>> :: s.accessMode,
    342       <"visitField" s.cw s.accessMode s.n "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
     341      <CWvisitField s.cw s.accessMode s.n "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
    343342      <FVvisitEnd s.fv>,
    344343      <Put &Objects (s.n s.obj-name e.class-name)>;
  • to-imperative/trunk/java/org/refal/plus/wrappers/org/objectweb/asm/ClassWriter.rfi

    r2342 r2395  
    22$const "COMPUTE_FRAMES" = 2; // int COMPUTE_FRAMES
    33$func "ClassWriter" s = s; // static org.objectweb.asm.ClassWriter ClassWriter (int)
    4 $func "ClassWriter1" s s = s; // static org.objectweb.asm.ClassWriter ClassWriter (org.objectweb.asm.ClassReader, int)
    5 $func "visit" s s s s s s (e) = ; // void visit (int, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])
    6 $func "visitSource" s s s = ; // void visitSource (java.lang.String, java.lang.String)
    7 $func "visitOuterClass" s s s s = ; // void visitOuterClass (java.lang.String, java.lang.String, java.lang.String)
    8 $func "visitAnnotation" s s s = s; // org.objectweb.asm.AnnotationVisitor visitAnnotation (java.lang.String, boolean)
    9 $func "visitAttribute" s s = ; // void visitAttribute (org.objectweb.asm.Attribute)
    10 $func "visitInnerClass" s s s s s = ; // void visitInnerClass (java.lang.String, java.lang.String, java.lang.String, int)
    11 $func "visitField" s s s s s s = s; // org.objectweb.asm.FieldVisitor visitField (int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)
    12 $func "visitMethod" s s s s s (e) = s; // org.objectweb.asm.MethodVisitor visitMethod (int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])
    13 $func "visitEnd" s = ; // void visitEnd ()
    14 $func "toByteArray" s = s; // byte[] toByteArray ()
    15 $func "newConst" s s = s; // int newConst (java.lang.Object)
    16 $func "newUTF8" s s = s; // int newUTF8 (java.lang.String)
    17 $func "newClass" s s = s; // int newClass (java.lang.String)
    18 $func "newField" s s s s = s; // int newField (java.lang.String, java.lang.String, java.lang.String)
    19 $func "newMethod" s s s s s = s; // int newMethod (java.lang.String, java.lang.String, java.lang.String, boolean)
    20 $func "newNameType" s s s = s; // int newNameType (java.lang.String, java.lang.String)
     4$func "ClassWriterFromClassReader" s s = s; // static org.objectweb.asm.ClassWriter ClassWriter (org.objectweb.asm.ClassReader, int)
     5$func "CWvisit" s s s s s s (e) = ; // void visit (int, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])
     6$func "CWvisitSource" s s s = ; // void visitSource (java.lang.String, java.lang.String)
     7$func "CWvisitOuterClass" s s s s = ; // void visitOuterClass (java.lang.String, java.lang.String, java.lang.String)
     8$func "CWvisitAnnotation" s s s = s; // org.objectweb.asm.AnnotationVisitor visitAnnotation (java.lang.String, boolean)
     9$func "CWvisitAttribute" s s = ; // void visitAttribute (org.objectweb.asm.Attribute)
     10$func "CWvisitInnerClass" s s s s s = ; // void visitInnerClass (java.lang.String, java.lang.String, java.lang.String, int)
     11$func "CWvisitField" s s s s s s = s; // org.objectweb.asm.FieldVisitor visitField (int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)
     12$func "CWvisitMethod" s s s s s (e) = s; // org.objectweb.asm.MethodVisitor visitMethod (int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])
     13$func "CWvisitEnd" s = ; // void visitEnd ()
     14$func "CWtoByteArray" s = s; // byte[] toByteArray ()
     15$func "CWnewConst" s s = s; // int newConst (java.lang.Object)
     16$func "CWnewUTF8" s s = s; // int newUTF8 (java.lang.String)
     17$func "CWnewClass" s s = s; // int newClass (java.lang.String)
     18$func "CWnewField" s s s s = s; // int newField (java.lang.String, java.lang.String, java.lang.String)
     19$func "CWnewMethod" s s s s s = s; // int newMethod (java.lang.String, java.lang.String, java.lang.String, boolean)
     20$func "CWnewNameType" s s s = s; // int newNameType (java.lang.String, java.lang.String)
Note: See TracChangeset for help on using the changeset viewer.