Changeset 2718


Ignore:
Timestamp:
Apr 19, 2007, 1:46:10 PM (14 years ago)
Author:
yura
Message:
  • Field annotation - refal constants and objects declaration.
Location:
to-imperative/trunk
Files:
5 edited

Legend:

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

    r2693 r2718  
    289289      <Store &MVbox <CWvisitMethod s.cw s.accessMode s.funcName s.desc <Null> ("org/refal/plus/RefalException")>>,
    290290      {
    291         <PrintFunctionFormat t.name> :: e.format =
     291        <PrintFunctionFormat t.name> :: s.format =
    292292          <MVvisitAnnotation <MV> "Lorg/refal/plus/RefalFormat;" False> :: s.aw,
    293           <AnnotationVisitor.visit s.aw "value" <WordToString <ToWord e.format>>>,
     293          <AnnotationVisitor.visit s.aw "value" <WordToString s.format>>,
    294294          <AnnotationVisitor.visitEnd s.aw>;;
    295295      },
     
    305305        (STATIC (e)) = t.name;
    306306        (e s.const_name) = s.const_name;
    307       } :: t.name,
    308       <GetJBCName t.name> :: s.name,
     307      } :: t.const_name,
     308      <GetJBCName t.const_name> :: s.jbcName,
    309309      <Add &ACC_STATIC <Add &ACC_FINAL <Access_Mode s.linkage>>> :: s.accessMode,
    310       <CWvisitField s.cw s.accessMode s.name "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
     310      <CWvisitField s.cw s.accessMode s.jbcName "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
     311      {
     312        <PrintConstDefinition t.name> :: s.def =
     313          <FVvisitAnnotation s.fv "Lorg/refal/plus/RefalFormat;" False> :: s.aw,
     314          <AnnotationVisitor.visit s.aw "value" <WordToString s.def>>,
     315          <AnnotationVisitor.visitEnd s.aw>;;
     316      },
    311317      <FVvisitEnd s.fv>,
    312       <Put &Constants (s.name e.expr)>;
     318      <Put &Constants (s.jbcName e.expr)>;
    313319    (OBJ s.linkage s.tag t.name) =
    314320      t.name : (e s.obj_name),
    315321      <ToChars s.tag> : s1 e2,
    316322      s1 <ToLower e2> :: e.class_name,
    317       <GetJBCName s.obj_name> :: s.n,
     323      <GetJBCName s.obj_name> :: s.jbcName,
    318324      <Add &ACC_STATIC <Add &ACC_FINAL <Access_Mode s.linkage>>> :: s.accessMode,
    319       <CWvisitField s.cw s.accessMode s.n "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
     325      <CWvisitField s.cw s.accessMode s.jbcName "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
     326      {
     327        <PrintObjectDefinition t.name> :: s.def =
     328          <FVvisitAnnotation s.fv "Lorg/refal/plus/RefalFormat;" False> :: s.aw,
     329          <AnnotationVisitor.visit s.aw "value" <WordToString s.def>>,
     330          <AnnotationVisitor.visitEnd s.aw>;;
     331      },
    320332      <FVvisitEnd s.fv>,
    321       <Put &Objects (s.n s.obj_name e.class_name)>;
     333      <Put &Objects (s.jbcName s.obj_name e.class_name)>;
    322334    ("DECL-OBJ" t.name) = ;
    323335    ("DECL-FUNC" t.name) = ;
  • to-imperative/trunk/compiler/rfp_helper.rf

    r2693 r2718  
    9090        (REF (e s.name)) = "&" s.name;
    9191        (PAREN e.subformat) = "(" <PrintFormat  e.subformat> ")";
    92         (SVAR) = "s";
    93         (TVAR) = "t";
    94         (VVAR) = "v";
    95         (EVAR) = "e";
     92        (SVAR e) = "s";
     93        (TVAR e) = "t";
     94        (VVAR e) = "v";
     95        (EVAR e) = "e";
    9696        e = "UNKNOWN";
    9797      } :: e.subres,
     
    116116  <PrintFormat e.Fout> :: e.out,
    117117  <ToWord s.funcType " " s.funcName " " e.in "= " e.out ";">;
     118
     119PrintConstDefinition t.name,
     120  <Lookup &Const t.name> : s.linkage s.tag t.pragma e.def =
     121  t.name : (e s.constName),
     122  <ToWord "$const " s.constName " = " <PrintFormat e.def> ";">;
     123
     124PrintObjectDefinition t.name,
     125  <Lookup &Object t.name> : s.linkage s.tag t.pragma e.def =
     126  t.name : (e s.objectName),
     127  s.tag : {
     128    BOX = "$box";
     129    TABLE = "$table";
     130    VECTOR = "$vector";
     131    STRING = "$string";
     132    CHANNEL = "$channel";
     133  } :: s.type,
     134  <ToWord s.type " " s.objectName ";">;
  • to-imperative/trunk/compiler/rfp_helper.rfi

    r2693 r2718  
    3030// Print refal function format ("$func F s = e;")
    3131$func? PrintFunctionFormat t.name = s.format ;
     32
     33// Print constant definition ("$const F = 'abc';")
     34$func? PrintConstDefinition t.name = s.def ;
     35
     36// Print object definition ("$box F;")
     37$func? PrintObjectDefinition t.name = s.def ;
  • to-imperative/trunk/java/org/refal/plus/wrappers/org/objectweb/asm/FieldVisitor.rfi

    r2342 r2718  
     1$func FVvisitAnnotation s s s = s; // org.objectweb.asm.AnnotationVisitor visitAnnotation (java.lang.String, boolean)
    12$func FVvisitEnd s = ; // void visitEnd ()
Note: See TracChangeset for help on using the changeset viewer.