[svn:parrot] r37762 - branches/pge1/compilers/pge/PGE

pmichaud at svn.parrot.org pmichaud at svn.parrot.org
Fri Mar 27 20:16:19 UTC 2009


Author: pmichaud
Date: Fri Mar 27 20:16:17 2009
New Revision: 37762
URL: https://trac.parrot.org/parrot/changeset/37762

Log:
[pge]:  stringification of Match objects is now .Str instead of .ast (per S05)

Modified:
   branches/pge1/compilers/pge/PGE/Exp.pir
   branches/pge1/compilers/pge/PGE/Match.pir
   branches/pge1/compilers/pge/PGE/Perl6Regex.pir

Modified: branches/pge1/compilers/pge/PGE/Exp.pir
==============================================================================
--- branches/pge1/compilers/pge/PGE/Exp.pir	Fri Mar 27 19:36:58 2009	(r37761)
+++ branches/pge1/compilers/pge/PGE/Exp.pir	Fri Mar 27 20:16:17 2009	(r37762)
@@ -414,8 +414,8 @@
     $I0 = exp0['ignorecase']
     $I1 = exp1['ignorecase']
     if $I0 != $I1 goto concat_lit_shift
-    $S0 = exp0
-    $S1 = exp1
+    $S0 = exp0.'ast'()
+    $S1 = exp1.'ast'()
     concat $S0, $S1
     exp0.'result_object'($S0)
     goto concat_lit_loop
@@ -963,7 +963,7 @@
     .param pmc label
     .param pmc next
     .local string token, test
-    token = self
+    token = self.'ast'()
 
     if token == '^' goto anchor_bos
     if token == '$' goto anchor_eos
@@ -1071,7 +1071,7 @@
     .param pmc next
 
     .local string token
-    token = self
+    token = self.'ast'()
     self['negate'] = 1
     if token == '\D' goto digit
     if token == '\S' goto space
@@ -1106,7 +1106,7 @@
     .param string next
     .local int cclass, negate
 
-    $S0 = self
+    $S0 = self.'ast'()
     code.'emit'("        %0: # cclass %1", label, $S0)
     code.'emit'("          if pos >= lastpos goto fail")
     cclass = self['cclass']
@@ -1304,7 +1304,7 @@
     .param string next
 
     .local string charlist
-    $S0 = self
+    $S0 = self.'ast'()
     charlist = code.'escape'($S0)
 
     .local string test
@@ -1428,7 +1428,7 @@
     .param string label
     .param string next
     .local string value, lang
-    value = self
+    value = self.'ast'()
     lang = self['lang']
     value = code.'escape'(value)
     lang = code.'escape'(lang)

Modified: branches/pge1/compilers/pge/PGE/Match.pir
==============================================================================
--- branches/pge1/compilers/pge/PGE/Match.pir	Fri Mar 27 19:36:58 2009	(r37761)
+++ branches/pge1/compilers/pge/PGE/Match.pir	Fri Mar 27 20:16:17 2009	(r37762)
@@ -372,7 +372,7 @@
 =cut
 
 .sub 'get_string' :vtable :method
-    $S0 = self.'result_object'()
+    $S0 = self.'Str'()
     .return ($S0)
 .end
 

Modified: branches/pge1/compilers/pge/PGE/Perl6Regex.pir
==============================================================================
--- branches/pge1/compilers/pge/PGE/Perl6Regex.pir	Fri Mar 27 19:36:58 2009	(r37761)
+++ branches/pge1/compilers/pge/PGE/Perl6Regex.pir	Fri Mar 27 20:16:17 2009	(r37762)
@@ -1584,7 +1584,7 @@
     .local string key
     .local string value
     key = self['key']
-    value = self
+    value = self.'ast'()
     if key == 'words' goto sigspace
     if key == 's' goto sigspace
     if key == 'w' goto sigspace
@@ -1634,7 +1634,7 @@
     $I0 = defined closure_pp[lang]
     if $I0 == 0 goto end
     closure_fn = closure_pp[lang]
-    $S1 = self
+    $S1 = self.'ast'()
     $S1 = closure_fn($S1)
     self.'result_object'($S1)
   end:
@@ -1683,7 +1683,7 @@
 
 .sub 'perl6exp' :method
     .param pmc pad
-    $S0 = self
+    $S0 = self.'ast'()
     if $S0 == ':::' goto cut_rule
     if $S0 == '<commit>' goto cut_match
     self['cutmark'] = PGE_CUT_GROUP


More information about the parrot-commits mailing list