Author: pmichaud
Date: Tue Nov 15 19:37:56 2005
New Revision: 10012

Modified:
   trunk/compilers/pge/PGE.pir
   trunk/compilers/pge/PGE/Exp.pir
   trunk/compilers/pge/PGE/P6Rule.pir
   trunk/compilers/pge/mklib.pir
Log:
Removed calls to Data::Escape, replaced with escape opcode.


Modified: trunk/compilers/pge/PGE.pir
==============================================================================
--- trunk/compilers/pge/PGE.pir (original)
+++ trunk/compilers/pge/PGE.pir Tue Nov 15 19:37:56 2005
@@ -12,10 +12,6 @@ unit, calling the subroutines marked wit
 
 .namespace [ "PGE" ]
 
-.sub "__onload" :load
-    load_bytecode "Data/Escape.pbc"
-.end
-
 .include "compilers/pge/PGE/TokenHash.pir"
 .include "compilers/pge/PGE/Match.pir"
 .include "compilers/pge/PGE/OPTable.pir"

Modified: trunk/compilers/pge/PGE/Exp.pir
==============================================================================
--- trunk/compilers/pge/PGE/Exp.pir     (original)
+++ trunk/compilers/pge/PGE/Exp.pir     Tue Nov 15 19:37:56 2005
@@ -137,21 +137,13 @@ won't be a problem, but is the use of th
 
 .sub "escape" :method
     .param string str
-    $P0 = find_global "Data::Escape", "String"
-    str = $P0(str, '"')
-    $I0 = find_charset "ascii"
-    trans_charset str, $I0
+    str = escape str
     str = concat '"', str
     str = concat str, '"'
     $I0 = index str, "\\x"
-    if $I0 > 0 goto unicode
-    $I0 = index str, "\\2"
-    if $I0 > 0 goto unicode
-    $I0 = index str, "\\3"
-    if $I0 > 0 goto unicode
-    .return (str)
-  unicode:
+    if $I0 < 0 goto end
     str = concat "unicode:", str
+  end:
     .return (str)
 .end
 

Modified: trunk/compilers/pge/PGE/P6Rule.pir
==============================================================================
--- trunk/compilers/pge/PGE/P6Rule.pir  (original)
+++ trunk/compilers/pge/PGE/P6Rule.pir  Tue Nov 15 19:37:56 2005
@@ -411,8 +411,7 @@
     mob["subname"] = subname
     mob["iscapture"] = iscapture
     if iscapture == 0 goto end
-    $P1 = find_global "Data::Escape", "String"
-    $S0 = $P1(subname, '"')
+    $S0 = escape subname
     $S0 = concat '"', $S0
     $S0 = concat $S0, '"'
     mob["cname"] = $S0
@@ -530,8 +529,7 @@
   name_1:
     $I1 = $I0 - pos
     cname = substr target, pos, $I1
-    $P1 = find_global "Data::Escape", "String"
-    cname = $P1(cname, '"')
+    cname = escape cname
     cname = concat '"', cname
     cname = concat cname, '"'
     mob["cname"] = cname

Modified: trunk/compilers/pge/mklib.pir
==============================================================================
--- trunk/compilers/pge/mklib.pir       (original)
+++ trunk/compilers/pge/mklib.pir       Tue Nov 15 19:37:56 2005
@@ -21,7 +21,6 @@ file.
     .local string rulex
     .local string grammar
     .local string code
-    load_bytecode "Data/Escape.pbc"
     load = find_global "PGE::TokenHash", "__onload"
     load()
     load = find_global "PGE::Match", "__onload"

Reply via email to