Author: coke Date: Wed Nov 16 06:45:11 2005 New Revision: 10023 Modified: trunk/languages/tcl/lib/commands/expr.pir trunk/languages/tcl/lib/commands/proc.pir trunk/languages/tcl/lib/parser.pir Log: tcl: Don't use Data::Escape's String, use 'escape' opcode instead.
Modified: trunk/languages/tcl/lib/commands/expr.pir ============================================================================== --- trunk/languages/tcl/lib/commands/expr.pir (original) +++ trunk/languages/tcl/lib/commands/expr.pir Wed Nov 16 06:45:11 2005 @@ -34,8 +34,8 @@ loop: goto loop loop_done: - ($I0,$P1) = expression_compiler(0,expr) - $P2 = pir_compiler($I0,$P1) + ($I0,$S0) = expression_compiler(0,expr) + $P2 = pir_compiler($I0,$S0) .return $P2() no_args: Modified: trunk/languages/tcl/lib/commands/proc.pir ============================================================================== --- trunk/languages/tcl/lib/commands/proc.pir (original) +++ trunk/languages/tcl/lib/commands/proc.pir Wed Nov 16 06:45:11 2005 @@ -62,9 +62,8 @@ got_args: $P1[name] = args_p .local pmc escaper - escaper = find_global "Data::Escape", "String" .local string esc_name - esc_name = escaper(name) + esc_name = escape name .local string proc_body, temp_code Modified: trunk/languages/tcl/lib/parser.pir ============================================================================== --- trunk/languages/tcl/lib/parser.pir (original) +++ trunk/languages/tcl/lib/parser.pir Wed Nov 16 06:45:11 2005 @@ -167,7 +167,7 @@ set_args: compile_it: .local pmc pir_compiler pir_compiler = compreg "PIR" - + .return pir_compiler(pir_code) .end @@ -718,10 +718,11 @@ Return register_num is the register numb rquote = "" if thing_type == "TclString" goto stringish if thing_type == "String" goto stringish + $S0 = thing goto set_args stringish: - $P1 = find_global "Data::Escape", "String" - thing = $P1(thing,"\"") + $S0 = thing + $S0 = escape $S0 lquote = "unicode:\"" rquote = "\"" @@ -734,7 +735,7 @@ set_args: printf_args[1] = thing_type printf_args[2] = register_num printf_args[3] = lquote - printf_args[4] = thing + printf_args[4] = $S0 printf_args[5] = rquote pir_code = sprintf "$P%i = new .%s\n$P%i=%s%s%s\n", printf_args
