Changeset 3867


Ignore:
Timestamp:
Jul 23, 2008, 8:40:06 PM (12 years ago)
Author:
yura
Message:
  • Native (from Java to Refal), JBC backend.
Files:
3 edited

Legend:

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

    r3866 r3867  
    16861686  <Map &ReplaceDots (e.javaArgTypes)> :: e.javaArgTypes,
    16871687  <ToWord "(" <Map &ConvertType (e.javaArgTypes)> ")" <ConvertResType s.javaResType>> :: s.methodDesc,
    1688   <Store &MVbox <CWvisitMethod <CW> <Add <ACC_STATIC> <ACC_PUBLIC>> s.methodName s.methodName <Null> ("org/refal/plus/RefalException")>>,
     1688  <Store &MVbox <CWvisitMethod <CW> <Add <ACC_STATIC> <ACC_PUBLIC>> s.methodName s.methodDesc <Null> ("org/refal/plus/RefalException")>>,
    16891689  <IIMVvisitCode <MV>>,
    16901690  {
     
    16931693        <Length e.head> :: s.index,
    16941694        {
    1695           s.javaArgType : { "int"; "boolean"; "char"; "byte"; "short"; "int"; } = <ILOAD>;
     1695          s.javaArgType : \{ "int"; "boolean"; "char"; "byte"; "short"; "int"; } = <ILOAD>;
    16961696          s.javaArgType : "long" = <LLOAD>;
    16971697          = <ALOAD>;
    16981698        } :: s.instr,
    16991699        <IIMVvisitVarInsn <MV> s.instr s.index>,
    1700         <ConvertJavaToRefal s.javaArgType <L s.index e.rfArgTypes>>,
     1700        <ConvertJavaToRefal <ConvertType s.javaArgType> <L s.index e.rfArgTypes>>,
    17011701        $fail;;
    17021702    }, {
    1703       s.javaResType : "" = ;
     1703      s.javaResType : "void" = ;
    17041704      <IIMVvisitTypeInsn <MV> <NEW> "org/refal/plus/Result">,
    17051705        <IIMVvisitInsn <MV> <DUP>>,
     
    17141714  },
    17151715  {
    1716     s.javaResType : "" =
     1716    s.javaResType : "void" =
    17171717      <IIMVvisitInsn <MV> <RETURN>>;
    17181718    <IIMVvisitVarInsn <MV> <ALOAD> <Length e.javaArgTypes>>,
    17191719      <IIMVvisitMethodInsn <MV> <INVOKEVIRTUAL> "org/refal/plus/Result" "getExpr" "()Lorg/refal/plus/Expr;">,
    1720       <ConvertRefalToJava e.rfResTypes s.javaResType>,
     1720      <ConvertRefalToJava e.rfResTypes <ConvertType s.javaResType>>,
    17211721      {
    1722         s.javaResType : { "int"; "boolean"; "char"; "byte"; "short"; "int"; } = <IRETURN>;
     1722        s.javaResType : \{ "int"; "boolean"; "char"; "byte"; "short"; "int"; } = <IRETURN>;
    17231723        s.javaResType : "long" = <LRETURN>;
    17241724        = <ARETURN>;
  • to-imperative/trunk/compiler/refal/org/refal/plus/compiler/rfp_compile.rf

    r3864 r3867  
    130130        (EXTERN t.name) =
    131131          <Put &Declarations (EXTERN t.name)>;
    132 //        (NATIVE e) =
    133 //          t.item;
     132        (NATIVE e) =
     133          t.item;
    134134        (s.link s.tag t.name (e.in) (e.out) e.body), FUNC "FUNC?" TFUNC : e s.tag e =
    135135          {
Note: See TracChangeset for help on using the changeset viewer.