Changeset 2399


Ignore:
Timestamp:
Feb 11, 2007, 10:10:43 PM (14 years ago)
Author:
orlov
Message:
  • Don't escape control characters in byte code.
File:
1 edited

Legend:

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

    r2398 r2399  
    3737
    3838$func Const-Expr-To-JBC e.ASAIL-const-expr = ;
    39 
    40 $func Symbol-To-JBC s.RFP-Symbol = e.JAVA-String;
    4139
    4240$func Var-To-JBC t.var = ;
     
    788786Get-String-From-Const-Expr e.expr,
    789787  () e.expr F $iter {
    790     e.expr : s.sym e.rest, <Char? s.sym> = (e.chars <Symbol-To-JBC s.sym>) e.rest F;
     788    e.expr : s.sym e.rest, <Char? s.sym> = (e.chars s.sym) e.rest F;
    791789    (e.chars) e.expr T;
    792790  } :: (e.chars) e.expr s.flag, s.flag : T,
     
    846844      <MVvisitTypeInsn <MV> &NEW "org/refal/plus/Word">,
    847845      <MVvisitInsn <MV> &DUP>,
    848       <MVvisitLdcInsn <MV> <WordToString <To-Word <Symbol-To-JBC s.sym>>>>,
     846      <MVvisitLdcInsn <MV> <WordToString s.sym>>,
    849847      <MVvisitMethodInsn <MV> &INVOKESPECIAL "org/refal/plus/Word" "<init>" "(Ljava/lang/String;)V">,
    850848      <MVvisitMethodInsn <MV> &INVOKESPECIAL "org/refal/plus/Expr" "<init>" "(Ljava/lang/Object;)V">;
    851849  };
    852 };
    853 
    854 Symbol-To-JBC s.ObjectSymbol, {
    855   <To-Chars s.ObjectSymbol> () $iter {
    856     e.symbol : s.char e.rest, s.char : {
    857       '\\' = '\\\\';
    858       '\n' = '\\n';
    859       '\t' = '\\t';
    860 //        '\v' = '\\v';
    861 //        '\b' = '\\b';
    862       '\r' = '\\r';
    863 //        '\f' = '\\f';
    864       '\"' = '\\"';
    865 //      '\'' = '\\\'';
    866       s = s.char;
    867     } :: e.java-char,
    868     e.rest (e.java-symbol e.java-char);
    869   } :: e.symbol (e.java-symbol),
    870     e.symbol : /*empty*/ =
    871     e.java-symbol;
    872850};
    873851
Note: See TracChangeset for help on using the changeset viewer.