Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cherry-pick some patches from tt389_fix (r43525-r43529)

git-svn-id: https://svn.parrot.org/parrot/branches/pge_no_namespace_methods@43530 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
commit c4d411126c92ac3e9feaf0c469e599cf526fa761 1 parent 1f4ba87
@tene tene authored
View
5 compilers/json/JSON.pir
@@ -52,12 +52,13 @@ documentation at L<http://www.json.org/>.
.param string json_string
.local pmc parse, match
- parse = get_root_global ['parrot'; 'JSON'], 'value'
+ $P0 = get_root_global ['parrot'], 'JSON'
+ parse = find_method $P0, 'value'
$P0 = get_root_global ['parrot'; 'PGE'], 'Match'
match = $P0.'new'(json_string)
match.'to'(0)
- match = parse(match)
+ match = parse(match, 'grammar' => 'JSON')
unless match goto failed
.local pmc pirgrammar, pirbuilder, pir
View
2  t/compilers/pge/04-compile.t
@@ -47,7 +47,7 @@ Tests various arguments to the compiler.
.local pmc p6compiler
p6compiler = compreg 'PGE::Perl6Regex'
$P1 = p6compiler('.+', 'name'=>'xyz', 'grammar'=>'')
- $P2 = 'xyz'('ok 1')
+ $P2 = $P1('ok 1')
is($P2, 'ok 1', 'compile into current namespace')
.end
View
5 t/compilers/pge/06-grammar.t
@@ -150,7 +150,7 @@ EOF_SIMPLE_GRAMMAR
.local string target
target = shift targets
- ok = '_match_expr'( parser, target )
+ ok = '_match_expr'( parser, target, test_name )
test.'ok'( ok, description )
$I0 = targets
if $I0 goto next_target
@@ -173,6 +173,7 @@ EOF_SIMPLE_GRAMMAR
.sub '_match_expr'
.param pmc parser
.param string expr
+ .param string grammar
.local int ok
.local string result, test_name, test_num_str
@@ -183,7 +184,7 @@ EOF_SIMPLE_GRAMMAR
load_bytecode 'PGE/Perl6Grammar.pbc'
ok = 1
- match = parser(expr)
+ match = parser(expr, 'grammar' => grammar)
result = match
if result == expr goto match_ok
View
6 t/compilers/tge/parser.t
@@ -43,7 +43,8 @@ GRAMMAR
# Match against the source
.local pmc match
.local pmc start_rule
- start_rule = get_global ['TGE';'Parser'], "start"
+ $P0 = get_global ['TGE'], 'Parser'
+ start_rule = find_method $P0, "start"
match = start_rule(source)
# Verify the match
@@ -72,7 +73,8 @@ GRAMMAR
GRAMMAR
.local pmc match
.local pmc start_rule
- start_rule = get_global ['TGE';'Parser'], "start"
+ $P0 = get_global ['TGE'], 'Parser'
+ start_rule = find_method $P0, "start"
match = start_rule(source, 'grammar'=>'TGE::Parser') # should throw.
.end
CODE
View
3  t/library/p6object.t
@@ -160,7 +160,8 @@ Testing Perl 6 objects.
jklobj = p6obj_tests(jklproto, 'Foo::JKL', 'isa'=>'P6object', 'can'=>'foo', 'who'=>jklns)
## add a method to a class
- $P0 = get_hll_global ['ABC'], 'foo'
+ $P0 = get_hll_global 'ABC'
+ $P0 = find_method $P0, 'foo'
p6meta.'add_method'('bar', $P0, 'to'=>jklproto)
jklobj = new ['Foo';'JKL']
$S0 = jklobj.'bar'()
Please sign in to comment.
Something went wrong with that request. Please try again.