Ignore:
Timestamp:
Apr 17, 2008, 9:09:37 PM (13 years ago)
Author:
yura
Message:
  • Static function Expr.create(Comparable) instead of constructor.
File:
1 edited

Legend:

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

    r3728 r3731  
    805805    <Get &Objects> : e (s.tag s.name) e,
    806806      { <ToChars s.tag> : s1 e2, <ToWord "new" s1 <ToLower e2>>; } :: s.objectType,
    807       <IIMVvisitTypeInsn <MV> <NEW> "org/refal/plus/Expr">,
    808       <IIMVvisitInsn <MV> <DUP>>,
    809807      <IIMVvisitLdcInsn <MV> s.name>,
    810808      <IIMVvisitMethodInsn <MV> <INVOKESTATIC> "org/refal/plus/Symbol" s.objectType "(Ljava/lang/String;)Ljava/lang/Comparable;">,
    811       <IIMVvisitMethodInsn <MV> <INVOKESPECIAL> "org/refal/plus/Expr" "<init>" "(Ljava/lang/Comparable;)V">,
     809      <IIMVvisitMethodInsn <MV> <INVOKESTATIC> "org/refal/plus/Expr" "create" "(Ljava/lang/Comparable;)Lorg/refal/plus/Expr;">,
    812810      <IIMVvisitFieldInsn <MV> <PUTSTATIC> s.class_name s.name "Lorg/refal/plus/Expr;">,
    813811      $fail;;
     
    12571255  {
    12581256    s.type : Comparable,
    1259       <IIMVvisitTypeInsn <MV> <NEW> "org/refal/plus/Expr">,
    1260       <IIMVvisitInsn <MV> <DUP_X1>>,
    1261       <IIMVvisitInsn <MV> <SWAP>>,
    1262       <IIMVvisitMethodInsn <MV> <INVOKESPECIAL> "org/refal/plus/Expr" "<init>" "(Ljava/lang/Comparable;)V">;;
     1257      <IIMVvisitMethodInsn <MV> <INVOKESTATIC> "org/refal/plus/Expr" "create" "(Ljava/lang/Comparable;)Lorg/refal/plus/Expr;">;;
    12631258  };
    12641259
     
    14901485    <IIMVvisitMethodInsn <MV> <INVOKESTATIC> "org/refal/plus/Expr" "fromSequence" "(Ljava/lang/CharSequence;)Lorg/refal/plus/Expr;">;
    14911486  (PAREN e.expr) =
    1492     <IIMVvisitTypeInsn <MV> <NEW> "org/refal/plus/Expr">,
    1493     <IIMVvisitInsn <MV> <DUP>>,
    14941487    <Const_Expr_To_JBC e.expr>,
    1495     <IIMVvisitMethodInsn <MV> <INVOKESPECIAL> "org/refal/plus/Expr" "<init>" "(Ljava/lang/Comparable;)V">;
     1488    <IIMVvisitMethodInsn <MV> <INVOKESTATIC> "org/refal/plus/Expr" "create" "(Ljava/lang/Comparable;)Lorg/refal/plus/Expr;">;
    14961489  t.term, t.term : \{
    14971490    (REF (e.module s.name)) = e.module s.name;
     
    15021495    <ToWord <Get &Class_Name> '$' <Length <Get &Func_Refs>>> :: s.cl_name,
    15031496    <Put &Func_Refs (<Length <Get &Func_Refs>> <GetJBCQName e.module s.name> s.func)>,
    1504     <IIMVvisitTypeInsn <MV> <NEW> "org/refal/plus/Expr">,
    1505     <IIMVvisitInsn <MV> <DUP>>,
    15061497    <IIMVvisitLdcInsn <MV> s.name>,
    15071498    <IIMVvisitTypeInsn <MV> <NEW> s.cl_name>,
     
    15091500    <IIMVvisitMethodInsn <MV> <INVOKESPECIAL> s.cl_name "<init>" "()V">,
    15101501    <IIMVvisitMethodInsn <MV> <INVOKESTATIC> "org/refal/plus/Symbol" "newFunc" "(Ljava/lang/String;Lorg/refal/plus/Func;)Ljava/lang/Comparable;">,
    1511     <IIMVvisitMethodInsn <MV> <INVOKESPECIAL> "org/refal/plus/Expr" "<init>" "(Ljava/lang/Comparable;)V">;
     1502    <IIMVvisitMethodInsn <MV> <INVOKESTATIC> "org/refal/plus/Expr" "create" "(Ljava/lang/Comparable;)Lorg/refal/plus/Expr;">;
    15121503  s.sym =
    15131504    {
     
    15151506      <IsWord s.sym> = "newWord";
    15161507    } :: s.meth,
    1517     <IIMVvisitTypeInsn <MV> <NEW> "org/refal/plus/Expr">,
    1518     <IIMVvisitInsn <MV> <DUP>>,
    15191508    <IIMVvisitLdcInsn <MV> <ToWord s.sym>>,
    15201509    <IIMVvisitMethodInsn <MV> <INVOKESTATIC> "org/refal/plus/Symbol" s.meth "(Ljava/lang/String;)Ljava/lang/Comparable;">,
    1521     <IIMVvisitMethodInsn <MV> <INVOKESPECIAL> "org/refal/plus/Expr" "<init>" "(Ljava/lang/Comparable;)V">;
     1510    <IIMVvisitMethodInsn <MV> <INVOKESTATIC> "org/refal/plus/Expr" "create" "(Ljava/lang/Comparable;)Lorg/refal/plus/Expr;">;
    15221511};
    15231512
Note: See TracChangeset for help on using the changeset viewer.