Changeset 2377


Ignore:
Timestamp:
Feb 11, 2007, 12:56:55 AM (14 years ago)
Author:
orlov
Message:
  • Use Expr.termEq for term matching.
  • Small corrections for JBC -- all Select examples are working now!
Location:
to-imperative/trunk/compiler
Files:
2 edited

Legend:

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

    r2366 r2377  
    396396    <Expr-Ref-To-Java e.expr2> :: e.a2 (e.j-expr2),
    397397    <Put s.acc e.a1 e.a2>,
    398     e.j-expr1'.eq ('e.j-expr2', '<Expr-Int-To-Java s.acc e.pos> ')';
     398    e.j-expr1'.termEq ('e.j-expr2', '<Expr-Int-To-Java s.acc e.pos> ')';
    399399  (NOT t.not-cond) =
    400400    '!' <Cond-To-Java s.acc t.not-cond>;
  • to-imperative/trunk/compiler/rfp_asail_jbc.rf

    r2366 r2377  
    9999  <Store &MVbox <"visitMethod" s.cw &"ACC_STATIC" "<clinit>" "()V" <Null> ()>>,
    100100  {
    101     <? &Constants> : e (s.const-name e.expr) e =
     101    <? &Constants> : e (s.const-name e.expr) e,
    102102      <Const-Expr-To-JBC e.expr>,
    103       <MVvisitFieldInsn <MV> &PUTSTATIC <To-Word <Intersperse ('/') e.java-module-name>> s.const-name "Lorg/refal/plus/Expr;">;
     103      <MVvisitFieldInsn <MV> &PUTSTATIC <To-Word <Intersperse ('/') e.java-module-name>> s.const-name "Lorg/refal/plus/Expr;">,
     104      $fail;;
    104105  },
    105106  <MVvisitInsn <MV> &RETURN>,
     
    451452    <MVvisitInsn <MV> &DUP>,
    452453    <Expr-Ref-To-JBC e.expr>,
    453     <MVvisitMethodInsn <MV> &INVOKESPECIAL "org/refal/plus/Expr" "<init>" "(Lorg/refal/plus/Expr;)V">;
     454    <MVvisitMethodInsn <MV> &INVOKESPECIAL "org/refal/plus/Expr" "<init>" "(Ljava/lang/Object;)V">;
    454455  (DEREF e.expr (e.pos)) =
    455456    <Expr-Ref-To-JBC e.expr>,
     
    538539    },
    539540    <MVvisitMethodInsn <MV> &INVOKESTATIC s.module s.name s.desc>,
    540     &IFEQ;
     541    &IFNE;
     542  (ITER-FAILS e.expr) =
     543    <Lookup-Iter-Var e.expr> :: s.i s s,
     544    <MVvisitVarInsn <MV> &ALOAD s.i>,
     545    <MVvisitMethodInsn <MV> &INVOKEVIRTUAL "org/refal/plus/Expr$SplitIterator" "isValid" "()Z">,
     546    &IFNE;
    541547  (SYMBOL? e.expr (e.pos)) =
    542548    <Expr-Ref-To-JBC e.expr>,
     
    544550    <MVvisitMethodInsn <MV> &INVOKEVIRTUAL "org/refal/plus/Expr" "symbolAt" "(I)Z">,
    545551    &IFEQ;
    546   (ITER-FAILS e.expr) =
    547     <Lookup-Iter-Var e.expr> :: s.i s s,
    548     <MVvisitVarInsn <MV> &ALOAD s.i>,
    549     <MVvisitMethodInsn <MV> &INVOKEVIRTUAL "org/refal/plus/Expr$SplitIterator" "isValid" "()Z">,
    550     &IFNE;
    551552  (EQ e.expr1 (e.expr2) (e.pos)) =
    552553    <Expr-Ref-To-JBC e.expr1>,
     
    559560    <Expr-Ref-To-JBC e.expr2>,
    560561    <Expr-Int-To-JBC e.pos>,
    561     <MVvisitMethodInsn <MV> &INVOKEVIRTUAL "org/refal/plus/Expr" "term_eq" "(Lorg/refal/plus/Expr;I)Z">,
     562    <MVvisitMethodInsn <MV> &INVOKEVIRTUAL "org/refal/plus/Expr" "termEq" "(Lorg/refal/plus/Expr;I)Z">,
    562563    &IFEQ;
    563564  (NOT t.cond) =
     
    658659    <MVvisitInsn <MV> &DUP>,
    659660    <Const-Expr-To-JBC e.expr>,
    660     <MVvisitMethodInsn <MV> &INVOKESPECIAL "org/refal/plus/Expr" "<init>" "(Lorg/refal/plus/Expr;)V">;
     661    <MVvisitMethodInsn <MV> &INVOKESPECIAL "org/refal/plus/Expr" "<init>" "(Ljava/lang/Object;)V">;
    661662  t.term, t.term : \{
    662663    (REF (s.module s.obj-name)) = <Qualified-Module-Name s.module> s.obj-name;
Note: See TracChangeset for help on using the changeset viewer.