Author: coke
Date: Wed Nov 12 19:31:47 2008
New Revision: 32585
Modified:
trunk/compilers/tge/TGE/Compiler.pir
trunk/compilers/tge/TGE/Tree.pir
trunk/t/compilers/imcc/reg/spill.t
trunk/t/compilers/imcc/syn/objects.t
trunk/t/compilers/pct/pct_hllcompiler.t
trunk/t/compilers/pge/03-optable.t
trunk/t/compilers/tge/basic.t
trunk/t/compilers/tge/grammar.t
trunk/t/library/test_builder_tester.t
trunk/t/library/test_more.t
trunk/t/oo/composition.t
trunk/t/oo/metamodel.t
trunk/t/oo/mro-c3.t
trunk/t/oo/new.t
trunk/t/oo/ops.t
trunk/t/oo/subclass.t
trunk/t/pmc/class.t
trunk/t/pmc/codestring.t
trunk/t/pmc/complex.t
trunk/t/pmc/eval.t
trunk/t/pmc/exceptionhandler.t
trunk/t/pmc/io.t
trunk/t/pmc/namespace.t
trunk/t/pmc/nci.t
trunk/t/pmc/object-meths.t
trunk/t/pmc/os.t
trunk/t/pmc/pmcproxy.t
trunk/t/pmc/resizablepmcarray.t
trunk/t/pmc/role.t
trunk/t/pmc/string.t
trunk/t/pmc/sub.t
Log:
bareword method names are [DEPRECATED].
Remove one explicit test for it. ('make test' works now)
Modified: trunk/compilers/tge/TGE/Compiler.pir
==============================================================================
--- trunk/compilers/tge/TGE/Compiler.pir (original)
+++ trunk/compilers/tge/TGE/Compiler.pir Wed Nov 12 19:31:47 2008
@@ -42,8 +42,8 @@
# Transform the parse tree and return the result
.local pmc tree_match
- tree_match = self.apply(match)
- $P5 = tree_match.get('result')
+ tree_match = self.'apply'(match)
+ $P5 = tree_match.'get'('result')
# say 'Data structure dump:'
# '_dumper'($P5, "syntax tree")
.return($P5)
@@ -55,17 +55,17 @@
.end
.sub init :vtable :method
- self.add_rule("ROOT", "result", ".", "ROOT_result")
- self.add_rule("statements", "result", ".", "statements_result")
- self.add_rule("statement", "result", ".", "statement_result")
- self.add_rule("transrule", "result", ".", "transrule_result")
- self.add_rule("grammardec", "result", ".", "grammardec_result")
- self.add_rule("type", "value", ".", "type_value")
- self.add_rule("inherit", "value", ".", "inherit_value")
- self.add_rule("name", "value", ".", "name_value")
- self.add_rule("parent", "value", ".", "parent_value")
- self.add_rule("action", "value", ".", "action_value")
- self.add_rule("language", "value", ".", "language_value")
+ self.'add_rule'("ROOT", "result", ".", "ROOT_result")
+ self.'add_rule'("statements", "result", ".", "statements_result")
+ self.'add_rule'("statement", "result", ".", "statement_result")
+ self.'add_rule'("transrule", "result", ".", "transrule_result")
+ self.'add_rule'("grammardec", "result", ".", "grammardec_result")
+ self.'add_rule'("type", "value", ".", "type_value")
+ self.'add_rule'("inherit", "value", ".", "inherit_value")
+ self.'add_rule'("name", "value", ".", "name_value")
+ self.'add_rule'("parent", "value", ".", "parent_value")
+ self.'add_rule'("action", "value", ".", "action_value")
+ self.'add_rule'("language", "value", ".", "language_value")
.end
.sub ROOT_result :method
@@ -74,7 +74,7 @@
$I0 = exists node["TGE::Parser::statements"]
unless $I0 goto err_no_tree
$P0 = node["TGE::Parser::statements"]
- $P2 = tree.get('result', $P0, 'statements')
+ $P2 = tree.'get'('result', $P0, 'statements')
.return ($P2)
err_no_tree:
@@ -96,7 +96,7 @@
loop_start:
unless iter goto loop_end
$P1 = shift iter
- $P2 = tree.get('result', $P1, 'statement')
+ $P2 = tree.'get'('result', $P1, 'statement')
push statements, $P2
goto loop_start
loop_end:
@@ -120,7 +120,7 @@
shift $S1, iter # get the key of the iterator
$P2 = iter[$S1]
- result = tree.get('result', $P2, $S1)
+ result = tree.'get'('result', $P2, $S1)
goto iter_loop
iter_end:
@@ -143,7 +143,7 @@
shift $S1, iter # get the key of the iterator
$P2 = iter[$S1]
- $P3 = tree.get('value', $P2, $S1)
+ $P3 = tree.'get'('value', $P2, $S1)
rule[$S1] = $P3
goto iter_loop
@@ -177,7 +177,7 @@
shift $S1, iter # get the key of the iterator
$P2 = iter[$S1]
- $P3 = tree.get('value', $P2, $S1)
+ $P3 = tree.'get'('value', $P2, $S1)
decl[$S1] = $P3
goto iter_loop
@@ -193,7 +193,7 @@
$P1 = node[0]
$P2 = $P1['type']
.local pmc value
- value = tree.get('value', $P2, 'type')
+ value = tree.'get'('value', $P2, 'type')
.return (value)
.end
@@ -357,7 +357,7 @@
type = rule["type"]
name = rule["name"]
parent = rule["parent"]
- output = " self.add_rule('"
+ output = " self.'add_rule'('"
output .= type
output .= "', '"
output .= name
Modified: trunk/compilers/tge/TGE/Tree.pir
==============================================================================
--- trunk/compilers/tge/TGE/Tree.pir (original)
+++ trunk/compilers/tge/TGE/Tree.pir Wed Nov 12 19:31:47 2008
@@ -77,7 +77,7 @@
dec index
if index < 0 goto end_loop
currule = actions[index]
- self._install_action(node, currule)
+ self.'_install_action'(node, currule)
goto loop
end_loop:
.return()
@@ -130,10 +130,10 @@
if $I0 goto eval_cell
scan_name:
if got_type goto scan_with_type
- self._scan_node(node)
+ self.'_scan_node'(node)
goto done_scan
scan_with_type:
- self._scan_node(node,type)
+ self.'_scan_node'(node,type)
done_scan:
# Second check to see if _scan_node defined the cell
cell = $P2[id]
@@ -152,7 +152,7 @@
print ") that you asked for.\n"
.return ()
eval_cell:
- $P3 = self._eval_cell(cell,node)
+ $P3 = self.'_eval_cell'(cell,node)
.return($P3)
.end
@@ -210,7 +210,7 @@
parent = getattribute rule, 'parent'
if parent == '.' goto use_parent_id
.local pmc child_node
- child_node = self._lookup_child(node, parent)
+ child_node = self.'_lookup_child'(node, parent)
id = self.'_lookup_id'(child_node)
goto use_child_id
use_parent_id:
Modified: trunk/t/compilers/imcc/reg/spill.t
==============================================================================
--- trunk/t/compilers/imcc/reg/spill.t (original)
+++ trunk/t/compilers/imcc/reg/spill.t Wed Nov 12 19:31:47 2008
@@ -435,95 +435,95 @@
$S0 = "Foo"
newclass $P0, $S0
$P1 = new $S0
- $P1.method1()
- $P1.method2()
+ $P1.'method1'()
+ $P1.'method2'()
$P2 = new $S0
- $P2.method1()
- $P2.method2()
+ $P2.'method1'()
+ $P2.'method2'()
$P3 = new $S0
- $P3.method1()
- $P3.method2()
+ $P3.'method1'()
+ $P3.'method2'()
$P4 = new $S0
- $P4.method1()
- $P4.method2()
+ $P4.'method1'()
+ $P4.'method2'()
$P5 = new $S0
- $P5.method1()
- $P5.method2()
+ $P5.'method1'()
+ $P5.'method2'()
$P6 = new $S0
- $P6.method1()
- $P6.method2()
+ $P6.'method1'()
+ $P6.'method2'()
$P7 = new $S0
- $P7.method1()
- $P7.method2()
+ $P7.'method1'()
+ $P7.'method2'()
$P8 = new $S0
- $P8.method1()
- $P8.method2()
+ $P8.'method1'()
+ $P8.'method2'()
$P9 = new $S0
- $P9.method1()
- $P9.method2()
+ $P9.'method1'()
+ $P9.'method2'()
$P10 = new $S0
- $P10.method1()
- $P10.method2()
+ $P10.'method1'()
+ $P10.'method2'()
$P11 = new $S0
- $P11.method1()
- $P11.method2()
+ $P11.'method1'()
+ $P11.'method2'()
$P12 = new $S0
- $P12.method1()
- $P12.method2()
+ $P12.'method1'()
+ $P12.'method2'()
$P13 = new $S0
- $P13.method1()
- $P13.method2()
+ $P13.'method1'()
+ $P13.'method2'()
$P14 = new $S0
- $P14.method1()
- $P14.method2()
+ $P14.'method1'()
+ $P14.'method2'()
$P15 = new $S0
- $P15.method1()
- $P15.method2()
+ $P15.'method1'()
+ $P15.'method2'()
- $P1.method1()
- $P1.method2()
- $P2.method1()
- $P2.method2()
- $P3.method1()
- $P3.method2()
- $P4.method1()
- $P4.method2()
- $P5.method1()
- $P5.method2()
- $P6.method1()
- $P6.method2()
- $P7.method1()
- $P7.method2()
- $P8.method1()
- $P8.method2()
- $P9.method1()
- $P9.method2()
- $P10.method1()
- $P10.method2()
- $P11.method1()
- $P11.method2()
- $P12.method1()
- $P12.method2()
- $P13.method1()
- $P13.method2()
- $P14.method1()
- $P14.method2()
- $P15.method1()
- $P15.method2()
+ $P1.'method1'()
+ $P1.'method2'()
+ $P2.'method1'()
+ $P2.'method2'()
+ $P3.'method1'()
+ $P3.'method2'()
+ $P4.'method1'()
+ $P4.'method2'()
+ $P5.'method1'()
+ $P5.'method2'()
+ $P6.'method1'()
+ $P6.'method2'()
+ $P7.'method1'()
+ $P7.'method2'()
+ $P8.'method1'()
+ $P8.'method2'()
+ $P9.'method1'()
+ $P9.'method2'()
+ $P10.'method1'()
+ $P10.'method2'()
+ $P11.'method1'()
+ $P11.'method2'()
+ $P12.'method1'()
+ $P12.'method2'()
+ $P13.'method1'()
+ $P13.'method2'()
+ $P14.'method1'()
+ $P14.'method2'()
+ $P15.'method1'()
+ $P15.'method2'()
end
.end
Modified: trunk/t/compilers/imcc/syn/objects.t
==============================================================================
--- trunk/t/compilers/imcc/syn/objects.t (original)
+++ trunk/t/compilers/imcc/syn/objects.t Wed Nov 12 19:31:47 2008
@@ -35,7 +35,7 @@
.local pmc obj
newclass class, "Foo"
obj = new "Foo"
- obj._meth()
+ obj.'_meth'()
print "done\n"
end
.end
@@ -57,7 +57,7 @@
obj = new "Foo"
$P0 = new 'String'
$P0 = "ok\n"
- obj._meth($P0)
+ obj.'_meth'($P0)
print "done\n"
end
.end
@@ -82,7 +82,7 @@
obj = new "Foo"
$P0 = new 'String'
$P0 = "ok\n"
- $S0 = obj._meth($P0)
+ $S0 = obj.'_meth'($P0)
print $S0
end
.end
@@ -111,7 +111,6 @@
newclass class, "Foo"
obj = new "Foo"
obj."_meth"()
- obj._meth()
set S10, "_meth"
obj.S10()
set $S10, "_meth"
@@ -127,7 +126,6 @@
in meth
in meth
in meth
-in meth
done
OUT
@@ -177,7 +175,7 @@
.local pmc obj
newclass class, "Foo"
obj = new "Foo"
- obj._meth()
+ obj.'_meth'()
print "done\n"
end
.end
@@ -315,7 +313,7 @@
.local pmc obj
newclass class, "Foo"
obj = new "Foo"
- obj.open()
+ obj.'open'()
print "done\n"
end
.end
Modified: trunk/t/compilers/pct/pct_hllcompiler.t
==============================================================================
--- trunk/t/compilers/pct/pct_hllcompiler.t (original)
+++ trunk/t/compilers/pct/pct_hllcompiler.t Wed Nov 12 19:31:47 2008
@@ -144,12 +144,12 @@
.local pmc hllcompiler
hllcompiler = new ['PCT';'HLLCompiler']
- hllcompiler.removestage('parse')
- hllcompiler.addstage('foo')
- hllcompiler.addstage('bar', 'before' => 'evalpmc')
- hllcompiler.addstage('optimize', 'after' => 'past')
- hllcompiler.addstage('optimize', 'after' => 'post')
- hllcompiler.addstage('peel', 'after' => 'optimize')
+ hllcompiler.'removestage'('parse')
+ hllcompiler.'addstage'('foo')
+ hllcompiler.'addstage'('bar', 'before' => 'evalpmc')
+ hllcompiler.'addstage'('optimize', 'after' => 'past')
+ hllcompiler.'addstage'('optimize', 'after' => 'post')
+ hllcompiler.'addstage'('peel', 'after' => 'optimize')
$P0 = getattribute hllcompiler, "@stages"
$S0 = join " ", $P0
say $S0
Modified: trunk/t/compilers/pge/03-optable.t
==============================================================================
--- trunk/t/compilers/pge/03-optable.t (original)
+++ trunk/t/compilers/pge/03-optable.t Wed Nov 12 19:31:47 2008
@@ -95,38 +95,38 @@
$P0 = get_hll_global ['PGE'], 'OPTable'
optable = $P0.'new'()
- optable.newtok('infix:+', 'precedence'=>'=')
- optable.newtok('infix:-', 'equiv'=>'infix:+')
- optable.newtok('infix:*', 'tighter'=>'infix:+')
- optable.newtok('infix:/', 'equiv'=>'infix:*')
- optable.newtok('infix:**', 'tighter'=>'infix:*')
- optable.newtok('infix:==', 'looser'=>'infix:+')
- optable.newtok('infix:=', 'looser'=>'infix:==', 'assoc'=>'right')
- optable.newtok('infix:,', 'tighter'=>'infix:=', 'assoc'=>'list')
- optable.newtok('infix:;', 'looser'=>'infix:=', 'assoc'=>'list')
-
- optable.newtok('prefix:++', 'tighter'=>'infix:**')
- optable.newtok('prefix:--', 'equiv'=>'prefix:++')
- optable.newtok('postfix:++', 'equiv'=>'prefix:++')
- optable.newtok('postfix:--', 'equiv'=>'prefix:++')
+ optable.'newtok'('infix:+', 'precedence'=>'=')
+ optable.'newtok'('infix:-', 'equiv'=>'infix:+')
+ optable.'newtok'('infix:*', 'tighter'=>'infix:+')
+ optable.'newtok'('infix:/', 'equiv'=>'infix:*')
+ optable.'newtok'('infix:**', 'tighter'=>'infix:*')
+ optable.'newtok'('infix:==', 'looser'=>'infix:+')
+ optable.'newtok'('infix:=', 'looser'=>'infix:==', 'assoc'=>'right')
+ optable.'newtok'('infix:,', 'tighter'=>'infix:=', 'assoc'=>'list')
+ optable.'newtok'('infix:;', 'looser'=>'infix:=', 'assoc'=>'list')
+
+ optable.'newtok'('prefix:++', 'tighter'=>'infix:**')
+ optable.'newtok'('prefix:--', 'equiv'=>'prefix:++')
+ optable.'newtok'('postfix:++', 'equiv'=>'prefix:++')
+ optable.'newtok'('postfix:--', 'equiv'=>'prefix:++')
.local pmc ident
ident = get_global ['PGE';'Match'], 'ident'
- optable.newtok('term:', 'tighter'=>'prefix:++', 'parsed'=>ident)
- optable.newtok('circumfix:( )', 'equiv'=>'term:')
- optable.newtok('circumfix:[ ]', 'equiv'=>'term:')
- optable.newtok('postcircumfix:( )', 'looser'=>'term:', 'nows'=>1,
'nullterm'=>1)
- optable.newtok('postcircumfix:[ ]', 'equiv'=>'postcircumfix:( )',
'nows'=>1)
+ optable.'newtok'('term:', 'tighter'=>'prefix:++', 'parsed'=>ident)
+ optable.'newtok'('circumfix:( )', 'equiv'=>'term:')
+ optable.'newtok'('circumfix:[ ]', 'equiv'=>'term:')
+ optable.'newtok'('postcircumfix:( )', 'looser'=>'term:', 'nows'=>1,
'nullterm'=>1)
+ optable.'newtok'('postcircumfix:[ ]', 'equiv'=>'postcircumfix:( )',
'nows'=>1)
.local string test
test = "<<test>>"
.local pmc match
- match = optable.parse(test, 'stop'=>' ;')
+ match = optable.'parse'(test, 'stop'=>' ;')
unless match goto fail
$P0 = match['expr']
tree($P0)
- $I0 = match.to()
+ $I0 = match.'to'()
$I1 = length test
if $I0 == $I1 goto succeed
print " (pos="
Modified: trunk/t/compilers/tge/basic.t
==============================================================================
--- trunk/t/compilers/tge/basic.t (original)
+++ trunk/t/compilers/tge/basic.t Wed Nov 12 19:31:47 2008
@@ -25,7 +25,7 @@
.local pmc AG
AG = new ['TGE';'Grammar']
- AG.add_rule('Leaf', 'min', '.', '.return(1)')
+ AG.'add_rule'('Leaf', 'min', '.', '.return(1)')
$P1 = getattribute AG, 'rules'
.local pmc rule_obj
Modified: trunk/t/compilers/tge/grammar.t
==============================================================================
--- trunk/t/compilers/tge/grammar.t (original)
+++ trunk/t/compilers/tge/grammar.t Wed Nov 12 19:31:47 2008
@@ -98,9 +98,9 @@
.local pmc right_val
left = getattribute node, "left"
- left_val = tree.get('min', left)
+ left_val = tree.'get'('min', left)
right = getattribute node, "right"
- right_val = tree.get('min', right)
+ right_val = tree.'get'('min', right)
min = left_val
if min <= right_val goto got_min
@@ -113,19 +113,19 @@
transform gmin (ROOT) :language('PIR') {
.local pmc gmin
gmin = new 'Integer'
- gmin = tree.get('min', node)
+ gmin = tree.'get'('min', node)
.return (gmin)
}
transform gmin (Branch) :applyto('left') :language('PIR') {
.local pmc gmin
- gmin = tree.get('gmin', node)
+ gmin = tree.'get'('gmin', node)
.return (gmin)
}
transform gmin (Branch) :applyto('right') :language('PIR') {
.local pmc gmin
- gmin = tree.get('gmin', node)
+ gmin = tree.'get'('gmin', node)
.return (gmin)
}
@@ -135,7 +135,7 @@
.local pmc newnode
newnode = new 'Leaf'
- $P1 = tree.get('gmin', node)
+ $P1 = tree.'get'('gmin', node)
setattribute newnode, 'value', $P1
.return(newnode)
}
@@ -147,8 +147,8 @@
newnode = new 'Branch'
left_child = getattribute node, 'left'
right_child = getattribute node, 'right'
- $P1 = tree.get('result', left_child)
- $P2 = tree.get('result', right_child)
+ $P1 = tree.'get'('result', left_child)
+ $P2 = tree.'get'('result', right_child)
setattribute newnode, 'left', $P1
setattribute newnode, 'right', $P2
@@ -167,10 +167,10 @@
# Apply the grammar to the test tree
.local pmc AGI
- AGI = grammar.apply(tree)
+ AGI = grammar.'apply'(tree)
# Retrieve the value of a top level attribute
- $P4 = AGI.get('gmin')
+ $P4 = AGI.'get'('gmin')
print "the global minimum attribute value is: "
print $P4
print " of type: "
@@ -179,7 +179,7 @@
print "\n"
# Rerieve the transformed tree
- $P5 = AGI.get('result')
+ $P5 = AGI.'get'('result')
$P6 = getattribute tree, 'left'
$P7 = getattribute $P6, 'left'
@@ -311,10 +311,10 @@
# Apply the grammar to the test tree
.local pmc AGI
- AGI = grammar.apply(testing)
+ AGI = grammar.'apply'(testing)
# Retrieve the value of a top level attribute
- $P4 = AGI.get('tiddlywinks')
+ $P4 = AGI.'get'('tiddlywinks')
end
.end
Modified: trunk/t/library/test_builder_tester.t
==============================================================================
--- trunk/t/library/test_builder_tester.t (original)
+++ trunk/t/library/test_builder_tester.t Wed Nov 12 19:31:47 2008
@@ -36,51 +36,51 @@
test_out( 'ok 3 - A message' )
test_diag( "some\nlines" )
- test.ok( 1, 'A message' )
- test.diag( 'some' )
- test.diag( 'lines' )
+ test.'ok'( 1, 'A message' )
+ test.'diag'( 'some' )
+ test.'diag'( 'lines' )
test_test( 'passing test with diagnostics' )
test_out( 'not ok 4 - another message' )
- test.ok( 0, 'another message' )
- test.diag( "many\nmany\nlines" )
+ test.'ok'( 0, 'another message' )
+ test.'diag'( "many\nmany\nlines" )
test_diag( 'many' )
test_diag( 'many' )
test_diag( 'lines' )
test_test( 'failing test with diagnostics' )
test_out( 'ok 5 #skip just one skip' )
- test.skip( 1, 'just one skip' )
+ test.'skip'( 1, 'just one skip' )
test_test( 'single skip' )
test_out( 'ok 6 #skip three skips' )
test_out( 'ok 7 #skip three skips' )
test_out( 'ok 8 #skip three skips' )
- test.skip( 3, 'three skips' )
+ test.'skip'( 3, 'three skips' )
test_test( 'multiple skips' )
test_out( 'not ok 9 # TODO some todo test' )
- test.todo( 0, 'some todo test' )
+ test.'todo'( 0, 'some todo test' )
test_test( 'failing todo test' )
test_out( 'ok 10 # TODO another todo test' )
- test.todo( 1, 'another todo test' )
+ test.'todo'( 1, 'another todo test' )
test_test( 'passing todo test' )
test_pass()
- test.ok( 1 )
+ test.'ok'( 1 )
test_test( 'passing test with no description' )
test_pass( 'my description' )
- test.ok( 1, 'my description' )
+ test.'ok'( 1, 'my description' )
test_test( 'passing test with a description' )
test_fail()
- test.ok( 0 )
+ test.'ok'( 0 )
test_test( 'failing test with no description' )
test_fail( 'failing description' )
- test.ok( 0, 'failing description' )
+ test.'ok'( 0, 'failing description' )
test_test( 'failing test with description' )
test.'finish'()
Modified: trunk/t/library/test_more.t
==============================================================================
--- trunk/t/library/test_more.t (original)
+++ trunk/t/library/test_more.t Wed Nov 12 19:31:47 2008
@@ -16,11 +16,11 @@
curr_namespace = get_namespace
test_namespace = get_namespace [ 'Test'; 'More' ]
exports = split " ", "ok is diag like skip todo is_deeply isa_ok isnt"
- test_namespace.export_to(curr_namespace, exports)
+ test_namespace.'export_to'(curr_namespace, exports)
test_namespace = get_namespace [ 'Test'; 'Builder'; 'Tester' ]
exports = split " ", "plan test_out test_diag test_fail test_pass
test_test"
- test_namespace.export_to(curr_namespace, exports)
+ test_namespace.'export_to'(curr_namespace, exports)
plan( 74 )
Modified: trunk/t/oo/composition.t
==============================================================================
--- trunk/t/oo/composition.t (original)
+++ trunk/t/oo/composition.t Wed Nov 12 19:31:47 2008
@@ -303,10 +303,10 @@
$P3 = new 'ResizableStringArray'
push $P3, "badger"
- $P1.resolve_method($P3)
+ $P1.'resolve_method'($P3)
print "ok 1 - set resolve list\n"
- $P4 = $P1.resolve_method()
+ $P4 = $P1.'resolve_method'()
$S0 = $P4[0]
if $S0 == "badger" goto ok_2
print "not "
@@ -371,10 +371,10 @@
print "ok 2 - added one rule that does another role to the class\n"
$P0 = PHB.'new'()
- $P0.give_payrise()
+ $P0.'give_payrise'()
print "ok 3 - called method from direct role\n"
- $P0.fire()
+ $P0.'fire'()
print "ok 4 - called method from indirect role\n"
.end
Modified: trunk/t/oo/metamodel.t
==============================================================================
--- trunk/t/oo/metamodel.t (original)
+++ trunk/t/oo/metamodel.t Wed Nov 12 19:31:47 2008
@@ -23,7 +23,7 @@
curr_namespace = get_namespace
test_namespace = get_namespace [ 'Test'; 'More' ]
exports = split " ", "plan ok is isa_ok skip todo"
- test_namespace.export_to(curr_namespace, exports)
+ test_namespace.'export_to'(curr_namespace, exports)
plan( 12 )
@@ -33,9 +33,9 @@
class = new "Class", init_args1
isa_ok(class, "Class", "created class isa Class")
- $P1 = class.name()
+ $P1 = class.'name'()
is($P1, "Dog", "created a new class via Class")
- $P1 = class.name()
+ $P1 = class.'name'()
is($P1, "Dog", "Class accessor doesn't destroy value")
class.'add_attribute'('bark')
@@ -125,7 +125,7 @@
.param pmc bark :optional
.param int got_bark :opt_flag
.local pmc rv
- rv = self._accessor( "bark", bark, got_bark )
+ rv = self.'_accessor'( "bark", bark, got_bark )
.return(rv)
.end
@@ -133,7 +133,7 @@
.param pmc tail :optional
.param int got_tail :opt_flag
.local pmc rv
- rv = self._accessor( "tail", tail, got_tail )
+ rv = self.'_accessor'( "tail", tail, got_tail )
.return(rv)
.end
Modified: trunk/t/oo/mro-c3.t
==============================================================================
--- trunk/t/oo/mro-c3.t (original)
+++ trunk/t/oo/mro-c3.t Wed Nov 12 19:31:47 2008
@@ -37,8 +37,8 @@
B.'add_method'("foo", $P0)
$P0 = B.'new'()
- $P0.foo()
- $P0.bar()
+ $P0.'foo'()
+ $P0.'bar'()
.end
.sub testA :method
@@ -74,9 +74,9 @@
C.'add_method'("foo", $P0)
$P0 = C.'new'()
- $P0.foo()
- $P0.bar()
- $P0.baz()
+ $P0.'foo'()
+ $P0.'bar'()
+ $P0.'baz'()
.end
.sub testA :method
@@ -116,9 +116,9 @@
C.'add_method'("foo", $P0)
$P0 = C.'new'()
- $P0.foo()
- $P0.bar()
- $P0.baz()
+ $P0.'foo'()
+ $P0.'bar'()
+ $P0.'baz'()
.end
.sub testA :method
@@ -167,10 +167,10 @@
D.'add_method'("foo", $P0)
$P0 = D.'new'()
- $P0.foo()
- $P0.bar()
- $P0.baz()
- $P0.wag()
+ $P0.'foo'()
+ $P0.'bar'()
+ $P0.'baz'()
+ $P0.'wag'()
.end
.sub testA :method
Modified: trunk/t/oo/new.t
==============================================================================
--- trunk/t/oo/new.t (original)
+++ trunk/t/oo/new.t Wed Nov 12 19:31:47 2008
@@ -89,7 +89,7 @@
pir_output_is( <<'CODE', <<'OUT', 'manually create named class object' );
.sub main :main
$P1 = new "Class"
- $P1.name("Foo")
+ $P1.'name'("Foo")
$S1 = typeof $P1
say $S1
Modified: trunk/t/oo/ops.t
==============================================================================
--- trunk/t/oo/ops.t (original)
+++ trunk/t/oo/ops.t Wed Nov 12 19:31:47 2008
@@ -29,7 +29,7 @@
addrole $P1, $P0
print "ok 1 - addrole op executed\n"
- $P2 = $P1.roles()
+ $P2 = $P1.'roles'()
$I0 = elements $P2
if $I0 == 1 goto ok_2
print "not "
@@ -62,8 +62,8 @@
pir_output_is( <<'CODE', <<'OUT', 'inspect_p_p_s' );
.sub 'test' :main
$P0 = new 'Class'
- $P0.name('foo')
- $P0.add_attribute('a')
+ $P0.'name'('foo')
+ $P0.'add_attribute'('a')
$P1 = inspect $P0, 'name'
say $P1
Modified: trunk/t/oo/subclass.t
==============================================================================
--- trunk/t/oo/subclass.t (original)
+++ trunk/t/oo/subclass.t Wed Nov 12 19:31:47 2008
@@ -107,7 +107,7 @@
push parent_list, parent
class_init_args['parents'] = parent_list
$P1 = new "Class", class_init_args
- $P1.name("Foo")
+ $P1.'name'("Foo")
$S1 = typeof $P1
say $S1
Modified: trunk/t/pmc/class.t
==============================================================================
--- trunk/t/pmc/class.t (original)
+++ trunk/t/pmc/class.t Wed Nov 12 19:31:47 2008
@@ -325,19 +325,19 @@
.local int test_val
class = new 'Class'
- class.name('foo')
- class.add_attribute('a')
+ class.'name'('foo')
+ class.'add_attribute'('a')
- result = class.inspect()
+ result = class.'inspect'()
ok(1, 'inspect() with no args called returns successfully')
test_val = elements result
is(test_val, 6, 'inspect() returns correctly sized value')
- result = class.inspect('name')
+ result = class.'inspect'('name')
is(result, 'foo', 'inspect() "name" param returns expected value')
- result = class.inspect('attributes')
+ result = class.'inspect'('attributes')
test_val = elements result
is(test_val, 1, 'inspect() "attributes" param returns correctly sized
value')
.end
@@ -352,7 +352,7 @@
attrs = new 'Hash'
attrs['name'] = 'Monkey'
class = new 'Class', attrs
- class.add_attribute('banana')
+ class.'add_attribute'('banana')
class_instance = class.'new'()
ok(1, 'clone() created class Monkey and instantiated it')
@@ -370,7 +370,7 @@
test_val = elements test_pmc
is(test_val, 1, 'clone() attribute survived cloning')
- class_instance.add_attribute('jungle')
+ class_instance.'add_attribute'('jungle')
ok(1, 'clone() can modify cloned class')
.end
@@ -383,7 +383,7 @@
class = new 'Hash'
class['name'] = 'Monkey2'
class_instance = new 'Class', class
- class_instance.add_attribute('banana')
+ class_instance.'add_attribute'('banana')
monkey = class_instance.'new'()
ok(1, 'clone_pmc() created class Monkey and instantiated it')
@@ -403,7 +403,7 @@
num_elems = elements test_ns
is(num_elems, 1, 'clone_pmc() attribute survived cloning')
- mandrill.add_attribute('jungle')
+ mandrill.'add_attribute'('jungle')
ok(1, 'clone_pmc() can modify cloned class')
.end
@@ -441,7 +441,7 @@
ok(1, 'new() set second attribute')
# Call method.
- result = class_instance.add()
+ result = class_instance.'add'()
is(result, 42, 'new() added method returns expected value')
.end
Modified: trunk/t/pmc/codestring.t
==============================================================================
--- trunk/t/pmc/codestring.t (original)
+++ trunk/t/pmc/codestring.t Wed Nov 12 19:31:47 2008
@@ -60,10 +60,10 @@
.sub basic_emit
.local pmc code
code = new 'CodeString'
- code.emit('label:')
- code.emit(' say "Hello, World"')
- code.emit(' $I0 = 1')
- code.emit(' $N0 = 0.1')
+ code.'emit'('label:')
+ code.'emit'(' say "Hello, World"')
+ code.'emit'(' $I0 = 1')
+ code.'emit'(' $N0 = 0.1')
is(code, <<'CODE', "code string looks fine")
label:
say "Hello, World"
@@ -75,9 +75,9 @@
.sub emit_with_pos_args
.local pmc code
code = new 'CodeString'
- code.emit('label_%0:', 1234)
- code.emit(' say "%0, %1"', 'Hello', 'World')
- code.emit(' %0 = %2', '$I0', 24, 48)
+ code.'emit'('label_%0:', 1234)
+ code.'emit'(' say "%0, %1"', 'Hello', 'World')
+ code.'emit'(' %0 = %2', '$I0', 24, 48)
is(code, <<'CODE', "code string with positional args looks fine")
label_1234:
say "Hello, World"
@@ -88,9 +88,9 @@
.sub emit_with_percent_args
.local pmc code
code = new 'CodeString'
- code.emit('label_%0:', 1234)
- code.emit(' say "%,"', 'Hello')
- code.emit(' say "%,"', 'Hello', 'World', 'of', 'Parrot')
+ code.'emit'('label_%0:', 1234)
+ code.'emit'(' say "%,"', 'Hello')
+ code.'emit'(' say "%,"', 'Hello', 'World', 'of', 'Parrot')
is(code, <<'CODE', "code string with % args looks fine")
label_1234:
say "Hello"
@@ -101,9 +101,9 @@
.sub emit_with_named_args
.local pmc code
code = new 'CodeString'
- code.emit('label_%a:', 'a'=>1234)
- code.emit(' say "%b, %c"', 'b'=>'Hello', 'c'=>'World')
- code.emit(' say "%d"', 'b'=>'Hello', 'c'=>'World')
+ code.'emit'('label_%a:', 'a'=>1234)
+ code.'emit'(' say "%b, %c"', 'b'=>'Hello', 'c'=>'World')
+ code.'emit'(' say "%d"', 'b'=>'Hello', 'c'=>'World')
is(code, <<'CODE', "emit with named args looks fine")
label_1234:
say "Hello, World"
@@ -114,9 +114,9 @@
.sub emit_with_pos_and_named_args
.local pmc code
code = new 'CodeString'
- code.emit('label_%a:', 'a'=>1234)
- code.emit(' %0 "%b, %c"', 'say', 'print', 'b'=>'H', 'c'=>'W')
- code.emit(' say "%,, %c"', 'alpha', 'beta', 'b'=>'H', 'c'=>'W')
+ code.'emit'('label_%a:', 'a'=>1234)
+ code.'emit'(' %0 "%b, %c"', 'say', 'print', 'b'=>'H', 'c'=>'W')
+ code.'emit'(' say "%,, %c"', 'alpha', 'beta', 'b'=>'H', 'c'=>'W')
is(code, <<'CODE', "emit with pos + named args")
label_1234:
say "H, W"
@@ -155,7 +155,7 @@
.local pmc code
null $P0
code = new 'CodeString'
- code.emit('new', 'n'=>$P0)
+ code.'emit'('new', 'n'=>$P0)
is(code, "new\n", "regression on first char repl bug looks fine")
.end
Modified: trunk/t/pmc/complex.t
==============================================================================
--- trunk/t/pmc/complex.t (original)
+++ trunk/t/pmc/complex.t Wed Nov 12 19:31:47 2008
@@ -691,7 +691,7 @@
$N0 *= 4
c[0] = 0.0
c[1] = $N0
- c2 = c.exp()
+ c2 = c.'exp'()
c2 += 1.0
.sprintf_is( "%.3f%+.3fi", c2, "0.000+0.000i" )
.end
Modified: trunk/t/pmc/eval.t
==============================================================================
--- trunk/t/pmc/eval.t (original)
+++ trunk/t/pmc/eval.t Wed Nov 12 19:31:47 2008
@@ -322,7 +322,7 @@
close io
load_bytecode "temp.pbc"
os = new 'OS'
- os.rm("temp.pbc")
+ os.'rm'("temp.pbc")
f2 = compi("foo_2", "hello from foo_2")
io = open "temp.pbc", ">"
print io, f2
Modified: trunk/t/pmc/exceptionhandler.t
==============================================================================
--- trunk/t/pmc/exceptionhandler.t (original)
+++ trunk/t/pmc/exceptionhandler.t Wed Nov 12 19:31:47 2008
@@ -29,14 +29,14 @@
ok(1, 'Instantiated ExceptionHandler')
set_addr eh, nonfatal_handler_one
- eh.min_severity(.EXCEPT_NORMAL)
- eh.max_severity(.EXCEPT_WARNING)
+ eh.'min_severity'(.EXCEPT_NORMAL)
+ eh.'max_severity'(.EXCEPT_WARNING)
push_eh eh
new eh, 'ExceptionHandler'
set_addr eh, error_handler_one
- eh.min_severity(.EXCEPT_ERROR)
- eh.max_severity(.EXCEPT_FATAL)
+ eh.'min_severity'(.EXCEPT_ERROR)
+ eh.'max_severity'(.EXCEPT_FATAL)
push_eh eh
$P0 = new 'Exception'
@@ -71,12 +71,12 @@
new eh, 'ExceptionHandler'
set_addr eh, typed_handler_one
- eh.handle_types(.CONTROL_OK, .CONTROL_BREAK)
+ eh.'handle_types'(.CONTROL_OK, .CONTROL_BREAK)
push_eh eh
new eh, 'ExceptionHandler'
set_addr eh, typed_handler_two
- eh.handle_types(.EXCEPTION_SYNTAX_ERROR, .EXCEPTION_UNEXPECTED_NULL)
+ eh.'handle_types'(.EXCEPTION_SYNTAX_ERROR, .EXCEPTION_UNEXPECTED_NULL)
push_eh eh
$P0 = new 'Exception'
Modified: trunk/t/pmc/io.t
==============================================================================
--- trunk/t/pmc/io.t (original)
+++ trunk/t/pmc/io.t Wed Nov 12 19:31:47 2008
@@ -117,7 +117,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "get_fd()/fdopen" );
.sub main :main
getstdout P0
- I0 = P0.get_fd()
+ I0 = P0.'get_fd'()
fdopen P1, I0, ">"
defined I0, P1
unless I0, nok
@@ -135,7 +135,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', 'fdopen - no close' );
.sub main :main
getstdout P0
- I0 = P0.get_fd()
+ I0 = P0.'get_fd'()
fdopen P1, I0, ">"
defined I0, P1
unless I0, nok
@@ -464,16 +464,16 @@
pir_output_is( <<'CODE', <<'OUT', 'standard file descriptors' );
.sub main :main
getstdin P0
- I0 = P0.get_fd()
+ I0 = P0.'get_fd'()
# I0 is 0 on Unix and non-Null on stdio and win32
print "ok 1\n"
getstdout P1
- I1 = P1.get_fd()
+ I1 = P1.'get_fd'()
if I1, OK_2
print "not "
OK_2: print "ok 2\n"
getstderr P2
- I2 = P2.get_fd()
+ I2 = P2.'get_fd'()
if I2, OK_3
print "not "
OK_3: print "ok 3\n"
Modified: trunk/t/pmc/namespace.t
==============================================================================
--- trunk/t/pmc/namespace.t (original)
+++ trunk/t/pmc/namespace.t Wed Nov 12 19:31:47 2008
@@ -972,14 +972,14 @@
print "\n"
.local pmc bar_ns
- bar_ns = foo_ns.find_namespace( 'Bar' )
+ bar_ns = foo_ns.'find_namespace'( 'Bar' )
$S0 = bar_ns
print "Found nested namespace: "
print $S0
print "\n"
.local pmc baz_ns
- baz_ns = bar_ns.find_namespace( 'Baz' )
+ baz_ns = bar_ns.'find_namespace'( 'Baz' )
no_symbol = 'Baz'
.local int is_defined
@@ -995,7 +995,7 @@
find_symbols:
.local pmc a_sub
- a_sub = bar_ns.find_sub( 'a_sub' )
+ a_sub = bar_ns.'find_sub'( 'a_sub' )
$S0 = a_sub
a_sub()
print "Found sub: "
@@ -1003,20 +1003,20 @@
print "\n"
.local pmc some_sub
- some_sub = bar_ns.find_sub( 'some_sub' )
+ some_sub = bar_ns.'find_sub'( 'some_sub' )
no_symbol = 'some_sub'
is_defined = defined some_sub
if is_defined goto oops
.local pmc a_var
- a_var = bar_ns.find_var( 'a_var' )
+ a_var = bar_ns.'find_var'( 'a_var' )
print "Found var: "
print a_var
print "\n"
.local pmc some_var
- some_var = bar_ns.find_var( 'some_var' )
+ some_var = bar_ns.'find_var'( 'some_var' )
no_symbol = 'some_var'
is_defined = defined some_var
Modified: trunk/t/pmc/nci.t
==============================================================================
--- trunk/t/pmc/nci.t (original)
+++ trunk/t/pmc/nci.t Wed Nov 12 19:31:47 2008
@@ -2626,17 +2626,17 @@
.local pmc nci_c
nci_c = dlfunc libnci_test, "nci_c", "c"
- $I0 = nci_c.arity()
+ $I0 = nci_c.'arity'()
say $I0
.local pmc multiply
multiply = dlfunc libnci_test, "nci_pii", "pii"
- $I0 = multiply.arity()
+ $I0 = multiply.'arity'()
say $I0
.local pmc nci_iiii
nci_iiii = dlfunc libnci_test, "nci_iiii", "iiii"
- $I0 = nci_iiii.arity()
+ $I0 = nci_iiii.'arity'()
say $I0
.end
CODE
Modified: trunk/t/pmc/object-meths.t
==============================================================================
--- trunk/t/pmc/object-meths.t (original)
+++ trunk/t/pmc/object-meths.t Wed Nov 12 19:31:47 2008
@@ -799,7 +799,7 @@
n = new 'Integer'
n = 2000
setattribute o, [ "Foo" ], "n", n
- o.go()
+ o.'go'()
n = getattribute o, [ "Foo" ], "n"
print n
print "\n"
Modified: trunk/t/pmc/os.t
==============================================================================
--- trunk/t/pmc/os.t (original)
+++ trunk/t/pmc/os.t Wed Nov 12 19:31:47 2008
@@ -190,7 +190,7 @@
pir_output_is( <<'CODE', $entries, 'Test OS.readdir' );
.sub main :main
$P1 = new 'OS'
- $P2 = $P1.readdir('docs')
+ $P2 = $P1.'readdir'('docs')
$S0 = join ' ', $P2
print $S0
@@ -206,11 +206,11 @@
pir_output_is( <<'CODE', <<"OUT", 'Test OS.rename' );
.sub main :main
$P1 = new 'OS'
- $P1.rename('____some_test_file', '___some_other_file')
+ $P1.'rename'('____some_test_file', '___some_other_file')
$I0 = stat '___some_other_file', 0
print $I0
print "\n"
- $P1.rm('___some_other_file')
+ $P1.'rm'('___some_other_file')
.end
CODE
1
Modified: trunk/t/pmc/pmcproxy.t
==============================================================================
--- trunk/t/pmc/pmcproxy.t (original)
+++ trunk/t/pmc/pmcproxy.t Wed Nov 12 19:31:47 2008
@@ -183,7 +183,7 @@
$P2 = $P0.'new'()
ok(1, 'instantiated the class')
- $P3 = $P2.inspect('methods')
+ $P3 = $P2.'inspect'('methods')
is($P3, 42, "the magic overriding sub was called")
ok(1, 'Called non-overridden method, which called overridden vtable
method')
.end
Modified: trunk/t/pmc/resizablepmcarray.t
==============================================================================
--- trunk/t/pmc/resizablepmcarray.t (original)
+++ trunk/t/pmc/resizablepmcarray.t Wed Nov 12 19:31:47 2008
@@ -654,7 +654,7 @@
$P99 = new 'Sub'
push $P5, $P99
- $P4.append( $P4 )
+ $P4.'append'( $P4 )
ok( 1, 'parsing' )
$I1 = $P4
@@ -662,14 +662,14 @@
$P10 = $P1
$I1 = $P10
- $P10.append( $P4 )
+ $P10.'append'( $P4 )
$I2 = $P10
is( $I1, $I2, 'append empty ResizablePMCArray' )
$S1 = $P10[2]
is( $S1, 'c', 'indexing elements' )
- $P10.append( $P2 )
+ $P10.'append'( $P2 )
is( $P10, 5, 'append FixedPMCArray' )
$S1 = $P10[2]
@@ -678,7 +678,7 @@
$S1 = $P10[4]
is( $S1, 'e', 'indexing elements' )
- $P3.append( $P10 )
+ $P3.'append'( $P10 )
is( $P3, 8, 'append ResizablePMCArray' )
$S1 = $P3[2]
@@ -687,7 +687,7 @@
$S1 = $P3[4]
is( $S1, 'b', 'indexing elements' )
- $P3.append( $P5 )
+ $P3.'append'( $P5 )
is( $P3, 9, 'append subclass' )
$S1 = $P3[2]
@@ -884,7 +884,7 @@
is($S0, "4 5 3 2 5 1", "RPA has expected values")
$P0 = get_global 'cmp_func'
- array.sort($P0)
+ array.'sort'($P0)
ok(1, "sort returns without crashing")
.end
Modified: trunk/t/pmc/role.t
==============================================================================
--- trunk/t/pmc/role.t (original)
+++ trunk/t/pmc/role.t Wed Nov 12 19:31:47 2008
@@ -37,13 +37,13 @@
$P1 = new 'Role', $P0
ok(1, 'Created a Role initialized with a Hash')
- $P2 = $P1.inspect('name')
+ $P2 = $P1.'inspect'('name')
$S0 = $P2
$I0 = $S0 == 'Wob'
ok($I0, 'Role name was set correctly')
- $P2 = $P1.inspect('namespace')
+ $P2 = $P1.'inspect'('namespace')
$S0 = $P2
$I0 = $S0 == 'Wob'
ok($I0, 'Role namespace was set correctly')
Modified: trunk/t/pmc/string.t
==============================================================================
--- trunk/t/pmc/string.t (original)
+++ trunk/t/pmc/string.t Wed Nov 12 19:31:47 2008
@@ -928,13 +928,13 @@
.local pmc s
s = new 'String'
s = "123"
- $I0 = s.to_int(10)
+ $I0 = s.'to_int'(10)
is( $I0, "123", 'String.to_int(10)' )
s = "2a"
- $I0 = s.to_int(16)
+ $I0 = s.'to_int'(16)
is( $I0, "42", '... 16' )
s = "1001"
- $I0 = s.to_int(2)
+ $I0 = s.'to_int'(2)
is( $I0, "9", '... 2' )
.end
@@ -1002,7 +1002,7 @@
s = new 'String'
s = "123"
push_eh handler
- $I0 = s.to_int(3)
+ $I0 = s.'to_int'(3)
handler:
.exception_is( 'invalid conversion to int - bad char 3' )
.end
@@ -1012,7 +1012,7 @@
s = new 'String'
s = "123"
push_eh handler
- $I0 = s.to_int(37)
+ $I0 = s.'to_int'(37)
handler:
.exception_is( 'invalid conversion to int - bad base 37' )
.end
Modified: trunk/t/pmc/sub.t
==============================================================================
--- trunk/t/pmc/sub.t (original)
+++ trunk/t/pmc/sub.t Wed Nov 12 19:31:47 2008
@@ -1379,31 +1379,31 @@
pir_output_is( <<'CODE', <<'OUTPUT', 'arity()' );
.sub main :main
$P0 = get_global 'none'
- $I0 = $P0.arity()
+ $I0 = $P0.'arity'()
say $I0
$P0 = get_global 'one'
- $I0 = $P0.arity()
+ $I0 = $P0.'arity'()
say $I0
$P0 = get_global 'four'
- $I0 = $P0.arity()
+ $I0 = $P0.'arity'()
say $I0
$P0 = get_global 'all_slurpy'
- $I0 = $P0.arity()
+ $I0 = $P0.'arity'()
say $I0
$P0 = get_global 'some_optional'
- $I0 = $P0.arity()
+ $I0 = $P0.'arity'()
say $I0
$P0 = get_global 'some_named'
- $I0 = $P0.arity()
+ $I0 = $P0.'arity'()
say $I0
$P0 = get_global 'allsorts'
- $I0 = $P0.arity()
+ $I0 = $P0.'arity'()
say $I0
.end
@@ -1459,7 +1459,7 @@
.sub main :main
$P0 = get_hll_global "example_outer"
$P1 = get_hll_global "example_inner"
- $P1.set_outer($P0)
+ $P1.'set_outer'($P0)
$P0()
$P1()
.end