Changeset 2724


Ignore:
Timestamp:
Apr 20, 2007, 8:37:00 PM (14 years ago)
Author:
yura
Message:
  • Minor changes in object and const generations.
File:
1 edited

Legend:

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

    r2718 r2724  
    109109  <Store &MVbox <CWvisitMethod s.cw &ACC_STATIC "<clinit>" "()V" <Null> ()>>,
    110110  {
    111     <Get &Objects> : e (s.j_name s.rf_name e.cl_name) e,
    112       <ToWord "org/refal/plus/" e.cl_name "$Named"> :: s.cl_name,
     111    <Get &Objects> : e (s.tag s.name) e,
     112      { <ToChars s.tag> : s1 e2, <ToWord "org/refal/plus/" s1 <ToLower e2> "$Named">; } :: s.class,
    113113      <MVvisitTypeInsn <MV> &NEW "org/refal/plus/Expr">,
    114114      <MVvisitInsn <MV> &DUP>,
    115       <MVvisitTypeInsn <MV> &NEW s.cl_name>,
     115      <MVvisitTypeInsn <MV> &NEW s.class>,
    116116      <MVvisitInsn <MV> &DUP>,
    117       <MVvisitLdcInsn <MV> <WordToString s.rf_name>>,
    118       <MVvisitMethodInsn <MV> &INVOKESPECIAL s.cl_name "<init>" "(Ljava/lang/String;)V">,
     117      <MVvisitLdcInsn <MV> <WordToString s.name>>,
     118      <MVvisitMethodInsn <MV> &INVOKESPECIAL s.class "<init>" "(Ljava/lang/String;)V">,
    119119      <MVvisitMethodInsn <MV> &INVOKESPECIAL "org/refal/plus/Expr" "<init>" "(Ljava/lang/Object;)V">,
    120       <MVvisitFieldInsn <MV> &PUTSTATIC s.class_name s.j_name "Lorg/refal/plus/Expr;">,
     120      <MVvisitFieldInsn <MV> &PUTSTATIC s.class_name s.name "Lorg/refal/plus/Expr;">,
    121121      $fail;;
    122122  },
    123123  {
    124     <Get &Constants> : e (s.const_name e.expr) e,
     124    <Get &Constants> : e (s.name e.expr) e,
    125125      <Const_Expr_To_JBC e.expr>,
    126       <MVvisitFieldInsn <MV> &PUTSTATIC s.class_name s.const_name "Lorg/refal/plus/Expr;">,
     126      <MVvisitFieldInsn <MV> &PUTSTATIC s.class_name s.name "Lorg/refal/plus/Expr;">,
    127127      $fail;;
    128128  },
     
    301301      <MVvisitMaxs <MV> 0 0>,
    302302      <MVvisitEnd <MV>>;
    303     (CONSTEXPR s.linkage t.name (e.comment) e.expr) =
    304       t.name : {
    305         (STATIC (e)) = t.name;
    306         (e s.const_name) = s.const_name;
    307       } :: t.const_name,
    308       <GetJBCName t.const_name> :: s.jbcName,
    309       <Add &ACC_STATIC <Add &ACC_FINAL <Access_Mode s.linkage>>> :: s.accessMode,
    310       <CWvisitField s.cw s.accessMode s.jbcName "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
    311       {
    312         <PrintConstDefinition t.name> :: s.def =
     303    (CONSTEXPR s.linkage t.qname (e.comment) e.expr) =
     304      t.qname : {
     305        (STATIC (e)) = <GetJBCName t.qname>;
     306        (e s.name) = s.name;
     307      } :: s.name,
     308      <Add &ACC_FINAL <Add &ACC_STATIC <Access_Mode s.linkage>>> :: s.access,
     309      <CWvisitField s.cw s.access s.name "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
     310      {
     311        <PrintConstDefinition t.qname> :: s.def =
    313312          <FVvisitAnnotation s.fv "Lorg/refal/plus/RefalFormat;" False> :: s.aw,
    314313          <AnnotationVisitor.visit s.aw "value" <WordToString s.def>>,
     
    316315      },
    317316      <FVvisitEnd s.fv>,
    318       <Put &Constants (s.jbcName e.expr)>;
    319     (OBJ s.linkage s.tag t.name) =
    320       t.name : (e s.obj_name),
    321       <ToChars s.tag> : s1 e2,
    322       s1 <ToLower e2> :: e.class_name,
    323       <GetJBCName s.obj_name> :: s.jbcName,
    324       <Add &ACC_STATIC <Add &ACC_FINAL <Access_Mode s.linkage>>> :: s.accessMode,
    325       <CWvisitField s.cw s.accessMode s.jbcName "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
    326       {
    327         <PrintObjectDefinition t.name> :: s.def =
     317      <Put &Constants (s.name e.expr)>;
     318    (OBJ s.linkage s.tag t.qname) =
     319      t.qname : (e s.name),
     320      <Add &ACC_FINAL <Add &ACC_STATIC <Access_Mode s.linkage>>> :: s.access,
     321      <CWvisitField s.cw s.access s.name "Lorg/refal/plus/Expr;" <Null> <Null>> :: s.fv,
     322      {
     323        <PrintObjectDefinition t.qname> :: s.def =
    328324          <FVvisitAnnotation s.fv "Lorg/refal/plus/RefalFormat;" False> :: s.aw,
    329325          <AnnotationVisitor.visit s.aw "value" <WordToString s.def>>,
     
    331327      },
    332328      <FVvisitEnd s.fv>,
    333       <Put &Objects (s.jbcName s.obj_name e.class_name)>;
     329      <Put &Objects (s.tag s.name)>;
    334330    ("DECL-OBJ" t.name) = ;
    335331    ("DECL-FUNC" t.name) = ;
Note: See TracChangeset for help on using the changeset viewer.