develooper Front page | perl.cvs.parrot | Postings from November 2008

[svn:parrot] r32587 - in trunk/languages/cardinal/src: builtins classes parser

From:
coke
Date:
November 12, 2008 20:21
Subject:
[svn:parrot] r32587 - in trunk/languages/cardinal/src: builtins classes parser
Message ID:
20081113042102.A5CFBCB9AF@x12.develooper.com
Author: coke
Date: Wed Nov 12 20:21:01 2008
New Revision: 32587

Modified:
   trunk/languages/cardinal/src/builtins/cmp.pir
   trunk/languages/cardinal/src/builtins/control.pir
   trunk/languages/cardinal/src/builtins/guts.pir
   trunk/languages/cardinal/src/builtins/op.pir
   trunk/languages/cardinal/src/builtins/say.pir
   trunk/languages/cardinal/src/classes/Array.pir
   trunk/languages/cardinal/src/classes/Object.pir
   trunk/languages/cardinal/src/classes/Range.pir
   trunk/languages/cardinal/src/parser/quote_expression.pir

Log:
[cardinal] use of bareword method names is [DEPRECATED]


Modified: trunk/languages/cardinal/src/builtins/cmp.pir
==============================================================================
--- trunk/languages/cardinal/src/builtins/cmp.pir	(original)
+++ trunk/languages/cardinal/src/builtins/cmp.pir	Wed Nov 12 20:21:01 2008
@@ -64,8 +64,8 @@
     .param pmc a
     .param pmc b
     .local int i
-    $I1 = a.elems()
-    $I2 = b.elems()
+    $I1 = a.'elems'()
+    $I2 = b.'elems'()
     ne $I1, $I2, fail
     i = 0
   loop:

Modified: trunk/languages/cardinal/src/builtins/control.pir
==============================================================================
--- trunk/languages/cardinal/src/builtins/control.pir	(original)
+++ trunk/languages/cardinal/src/builtins/control.pir	Wed Nov 12 20:21:01 2008
@@ -36,7 +36,7 @@
     .local pmc eh
     list = 'list'()
     eh = new 'ExceptionHandler'
-    eh.handle_types(.CONTROL_TAKE)
+    eh.'handle_types'(.CONTROL_TAKE)
     set_addr eh, handler
     push_eh eh
     block()
@@ -49,7 +49,7 @@
     message = exception['message']
     continuation = exception['resume']
     $P0 = exception['payload']
-    list.push($P0)
+    list.'push'($P0)
     continuation()
 .end
 

Modified: trunk/languages/cardinal/src/builtins/guts.pir
==============================================================================
--- trunk/languages/cardinal/src/builtins/guts.pir	(original)
+++ trunk/languages/cardinal/src/builtins/guts.pir	Wed Nov 12 20:21:01 2008
@@ -90,7 +90,7 @@
     .lex "$/", $P0
   no_match_to_copy:
 
-    $I0 = type.ACCEPTS(value)
+    $I0 = type.'ACCEPTS'(value)
     if $I0 goto ok
     'die'('Parameter type check failed')
 ok:
@@ -120,7 +120,7 @@
     push resolve_list, $P0
     goto resolve_loop
   resolve_loop_end:
-    class.resolve_method(resolve_list)
+    class.'resolve_method'(resolve_list)
 
     .return(class)
 .end

Modified: trunk/languages/cardinal/src/builtins/op.pir
==============================================================================
--- trunk/languages/cardinal/src/builtins/op.pir	(original)
+++ trunk/languages/cardinal/src/builtins/op.pir	Wed Nov 12 20:21:01 2008
@@ -121,7 +121,7 @@
     item = shift it
     $I0 = b.'include?'(item)
     unless $I0, loop
-    intersection.push(item)
+    intersection.'push'(item)
     goto loop
   loop_end:
     .return (intersection)

Modified: trunk/languages/cardinal/src/builtins/say.pir
==============================================================================
--- trunk/languages/cardinal/src/builtins/say.pir	(original)
+++ trunk/languages/cardinal/src/builtins/say.pir	Wed Nov 12 20:21:01 2008
@@ -36,7 +36,7 @@
 .sub 'readline'
     #.param pmc sep              :optional #record sep
     $P0 = getstdin
-    $S0 = $P0.readline('')
+    $S0 = $P0.'readline'('')
     .return($S0)
 .end
 

Modified: trunk/languages/cardinal/src/classes/Array.pir
==============================================================================
--- trunk/languages/cardinal/src/classes/Array.pir	(original)
+++ trunk/languages/cardinal/src/classes/Array.pir	Wed Nov 12 20:21:01 2008
@@ -146,7 +146,7 @@
     .local pmc elem_1, elem_2
     elem_1 = self[i]
     elem_2 = topic[i]
-    ($I0) = elem_1.ACCEPTS(elem_2)
+    ($I0) = elem_1.'ACCEPTS'(elem_2)
     unless $I0 goto no_match
     inc i
     goto list_cmp_loop
@@ -223,9 +223,9 @@
     if has_by goto have_by
     by = get_hll_global 'infix:cmp'
   have_by:
-    $P0 = self.sort()
+    $P0 = self.'sort'()
     self = 0
-    self.append($P0)
+    self.'append'($P0)
 .end
 
 =item uniq(...)
@@ -277,9 +277,9 @@
 .end
 
 .sub 'uniq!' :method
-    $P0 = self.uniq()
+    $P0 = self.'uniq'()
     self = 0
-    self.append($P0)
+    self.'append'($P0)
 .end
 
 .sub 'max' :method
@@ -905,7 +905,7 @@
     unless $P0 goto each_loop_end
     $P1 = shift $P0
     $P2 = block($P1)
-    result.push($P2)
+    result.'push'($P2)
     goto each_loop
   each_loop_end:
     .return (result)
@@ -1033,7 +1033,7 @@
     args_iter = new 'Iterator', args
     item = new 'CardinalArray'
     $P0 = shift iterator
-    item.push($P0)
+    item.'push'($P0)
   inner_loop:
     unless args_iter, inner_loop_done
     arg = shift args_iter
@@ -1041,11 +1041,11 @@
     unless null $P0 goto arg_not_null
     $P0 = get_hll_global 'nil'
   arg_not_null:
-    item.push($P0)
+    item.'push'($P0)
     goto inner_loop
   inner_loop_done:
     inc i
-    zipped.push(item)
+    zipped.'push'(item)
     goto setup_loop
   setup_loop_done:
 

Modified: trunk/languages/cardinal/src/classes/Object.pir
==============================================================================
--- trunk/languages/cardinal/src/classes/Object.pir	(original)
+++ trunk/languages/cardinal/src/classes/Object.pir	Wed Nov 12 20:21:01 2008
@@ -59,7 +59,7 @@
     push resolve_list, $P0
     goto resolve_loop
 resolve_loop_end:
-    class.resolve_method(resolve_list)
+    class.'resolve_method'(resolve_list)
 
     .return(class)
 .end
@@ -140,10 +140,10 @@
     # Instantiate.
     .local pmc cardinalmeta
     cardinalmeta = get_hll_global ['CardinalObject'], '!CARDINALMETA'
-    $P0 = cardinalmeta.get_parrotclass(self)
+    $P0 = cardinalmeta.'get_parrotclass'(self)
     $P1 = $P0.'new'()
     $P2 = $P1.'HOW'()
-    $I0 = $P2.can(self,'initialize')
+    $I0 = $P2.'can'(self,'initialize')
     unless $I0, no_initialize
     $P2 = $P1.'initialize'(args :flat, named_args :named :flat)
   no_initialize:
@@ -255,7 +255,7 @@
     .local pmc result
     .local pmc cardinalmeta
     cardinalmeta = get_hll_global ['CardinalObject'], '!CARDINALMETA'
-    $P0 = cardinalmeta.get_parrotclass(self)
+    $P0 = cardinalmeta.'get_parrotclass'(self)
     result = new $P0
 
     .local pmc attr_it
@@ -287,7 +287,7 @@
 .include 'library/dumper.pir'
 .sub 'methods' :method
     $P0 = class self
-    $P1 = $P0.methods()
+    $P1 = $P0.'methods'()
     .local pmc meth_iter
     meth_iter = new 'Iterator', $P1
     .local pmc method_list
@@ -295,7 +295,7 @@
   methods_loop:
     unless meth_iter goto methods_loop_end
     $P0 = shift meth_iter
-    method_list.push($P0)
+    method_list.'push'($P0)
     goto methods_loop
   methods_loop_end:
     .return(method_list)

Modified: trunk/languages/cardinal/src/classes/Range.pir
==============================================================================
--- trunk/languages/cardinal/src/classes/Range.pir	(original)
+++ trunk/languages/cardinal/src/classes/Range.pir	Wed Nov 12 20:21:01 2008
@@ -404,7 +404,7 @@
     .param pmc block    :named ("!BLOCK")
     $P0 = self.'first'()
     $P1 = $P0.'HOW'()
-    $I0 = $P1.can(self,'succ')
+    $I0 = $P1.'can'(self,'succ')
     if $I0 != 0 goto continuous_range
     $P0 = self.'iterator'()
     goto each_loop

Modified: trunk/languages/cardinal/src/parser/quote_expression.pir
==============================================================================
--- trunk/languages/cardinal/src/parser/quote_expression.pir	(original)
+++ trunk/languages/cardinal/src/parser/quote_expression.pir	Wed Nov 12 20:21:01 2008
@@ -440,7 +440,7 @@
     mob.'to'(pos)
     .return (mob)
   fail_backchar_digit:
-    self.panic('\123 form deprecated, use \o123 instead')
+    self.'panic'('\123 form deprecated, use \o123 instead')
   fail:
     mob.'to'(-1)
     .return (mob)



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About