Author: coke
Date: Tue Dec 30 13:04:05 2008
New Revision: 34669

Modified:
   trunk/runtime/parrot/library/JSON.pir

Log:
take advantage of calling conventions and an opcode that probably didn't exist 
when this written.



Modified: trunk/runtime/parrot/library/JSON.pir
==============================================================================
--- trunk/runtime/parrot/library/JSON.pir       (original)
+++ trunk/runtime/parrot/library/JSON.pir       Tue Dec 30 13:04:05 2008
@@ -123,18 +123,15 @@
 .end
 
 .sub '_json_string'
-  .param pmc thing
+  .param string thing
   .param int pretty
   .param int indent
 
   .local string result
 
-  $S0 = thing
-  .local pmc escaper
-  escaper = find_global "Data::Escape", "String"
-  $S0 = escaper($S0,'"')
+  thing = escape thing
 
-  result = '"' . $S0
+  result = '"' . thing
   result = result . '"'
 
   unless pretty goto plain

Reply via email to