Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method 'pirflags' not found in class 'PIRT::Ops' #199

Closed
duzy opened this issue Nov 9, 2014 · 4 comments
Closed

Method 'pirflags' not found in class 'PIRT::Ops' #199

duzy opened this issue Nov 9, 2014 · 4 comments

Comments

@duzy
Copy link

duzy commented Nov 9, 2014

Hi, is this another bug? It shouldn't have such errors.

t/mo/00.mo .. Method 'pirflags' not found for invocant of class 'PIRT::Ops'
current instr.: 'as_post' pc 53958 (gen/parrot/stage2/QAST.pir:19277) (gen/parrot/stage2/QAST.nqp:3424)
called from Sub 'as_post' pc 53126 (gen/parrot/stage2/QAST.pir:18966) (gen/parrot/stage2/QAST.nqp:3350)
called from Sub 'compile_all_the_stmts' pc 60124 (gen/parrot/stage2/QAST.pir:21433) (gen/parrot/stage2/QAST.nqp:3837)
called from Sub '' pc 57730 (gen/parrot/stage2/QAST.pir:20533) (gen/parrot/stage2/QAST.nqp:3601)
called from Sub '' pc 56500 (gen/parrot/stage2/QAST.pir:20138) (gen/parrot/stage2/QAST.nqp:3590)
called from Sub 'as_post' pc 55711 (gen/parrot/stage2/QAST.pir:19822) (gen/parrot/stage2/QAST.nqp:3581)
called from Sub 'as_post' pc 53126 (gen/parrot/stage2/QAST.pir:18966) (gen/parrot/stage2/QAST.nqp:3350)
called from Sub 'as_post' pc 53324 (gen/parrot/stage2/QAST.pir:19074) (gen/parrot/stage2/QAST.nqp:3377)
called from Sub 'as_post' pc 53126 (gen/parrot/stage2/QAST.pir:18966) (gen/parrot/stage2/QAST.nqp:3350)
called from Sub 'post' pc 52646 (gen/parrot/stage2/QAST.pir:18769) (gen/parrot/stage2/QAST.nqp:3308)
called from Sub 'post' pc 1335 (gen/parrot/stage2/NQPHLL.pir:625) (gen/parrot/stage2/NQPHLL.nqp:98)
called from Sub 'compile' pc 31904 (gen/parrot/stage2/NQPHLL.pir:12370) (gen/parrot/stage2/NQPHLL.nqp:1412)
@FROGGS
Copy link
Contributor

FROGGS commented Nov 9, 2014

Where do you got a test file t/mo/00.mo from?

@duzy
Copy link
Author

duzy commented Nov 9, 2014

It's actually not part of NQP, is of another 'sub-language'. The 'sub-language' have no direct manipulation to PIR, it shouldn't have errors like this.

@duzy
Copy link
Author

duzy commented Nov 9, 2014

I believe this code segment reproduce the error:

use QRegex;

grammar TestGrammar is HLL::Grammar {
    method TOP() {
        my %*LANG;
        %*LANG<Regex>         := QRegex::P6Regex::Grammar;
        %*LANG<Regex-actions> := QRegex::P6Regex::Actions;

        my $rule := %*COMPILING<%?OPTIONS><rule>;
        if nqp::defined($rule) && $rule eq 'regex' {
            self.regex
        } else {
            self.NYI
        }
    }
    token regex {
        #:my %*RX;
        #<p6regex=.LANG('Regex','nibbler')>
        <p6regex=.LANG('Regex','TOP')>
    }
    token NYI { <?> }
}

class TestActions is HLL::Actions {
    method regex($/) {
        make QAST::Block.new( :node($/), $<p6regex>.ast );
    }
}

class TestCompiler is HLL::Compiler {
}

my $comp := TestCompiler.new();
$comp.language('Test');
$comp.parsegrammar(TestGrammar);
$comp.parseactions(TestActions);

my $rx := $comp.compile('.*', :rule<regex>);
my $m := $rx('anything goes here');

The dumps should be looking like this:

nqp-p pirflags.nqp
Method 'pirflags' not found for invocant of class 'PIRT::Ops'
current instr.: 'as_post' pc 53958 (gen/parrot/stage2/QAST.pir:19277) (gen/parrot/stage2/QAST.nqp:3424)
called from Sub 'as_post' pc 53126 (gen/parrot/stage2/QAST.pir:18966) (gen/parrot/stage2/QAST.nqp:3350)
called from Sub 'compile_all_the_stmts' pc 60124 (gen/parrot/stage2/QAST.pir:21433) (gen/parrot/stage2/QAST.nqp:3837)
called from Sub '' pc 57730 (gen/parrot/stage2/QAST.pir:20533) (gen/parrot/stage2/QAST.nqp:3601)
called from Sub '' pc 56500 (gen/parrot/stage2/QAST.pir:20138) (gen/parrot/stage2/QAST.nqp:3590)
called from Sub 'as_post' pc 55711 (gen/parrot/stage2/QAST.pir:19822) (gen/parrot/stage2/QAST.nqp:3581)
called from Sub 'as_post' pc 53126 (gen/parrot/stage2/QAST.pir:18966) (gen/parrot/stage2/QAST.nqp:3350)
called from Sub 'as_post' pc 53324 (gen/parrot/stage2/QAST.pir:19074) (gen/parrot/stage2/QAST.nqp:3377)
called from Sub 'as_post' pc 53126 (gen/parrot/stage2/QAST.pir:18966) (gen/parrot/stage2/QAST.nqp:3350)
called from Sub 'post' pc 52646 (gen/parrot/stage2/QAST.pir:18769) (gen/parrot/stage2/QAST.nqp:3308)
called from Sub 'post' pc 1335 (gen/parrot/stage2/NQPHLL.pir:625) (gen/parrot/stage2/NQPHLL.nqp:98)
called from Sub 'compile' pc 31904 (gen/parrot/stage2/NQPHLL.pir:12370) (gen/parrot/stage2/NQPHLL.nqp:1412)
called from Sub '<mainline>' pc 151 ((file unknown):74) (pirflags.nqp:43)
called from Sub 'eval' pc 27839 (gen/parrot/stage2/NQPHLL.pir:10706) (gen/parrot/stage2/NQPHLL.nqp:1173)
called from Sub 'evalfiles' pc 30722 (gen/parrot/stage2/NQPHLL.pir:11905) (gen/parrot/stage2/NQPHLL.nqp:1367)
called from Sub 'command_eval' pc 29725 (gen/parrot/stage2/NQPHLL.pir:11512) (gen/parrot/stage2/NQPHLL.nqp:1297)
called from Sub 'command_line' pc 28603 (gen/parrot/stage2/NQPHLL.pir:11066) (gen/parrot/stage2/NQPHLL.nqp:1245)
called from Sub 'MAIN' pc 601 (gen/parrot/stage2/NQP.pir:203) (gen/parrot/stage2/NQP.nqp:4046)
called from Sub '<mainline>' pc 578 (gen/parrot/stage2/NQP.pir:191) (gen/parrot/stage2/NQP.nqp:4041)
called from Sub '' pc 165096 (gen/parrot/stage2/NQP.pir:58004) (gen/parrot/stage2/NQP.nqp:4018)

@pmurias pmurias added the Parrot label Jul 19, 2016
@pmurias
Copy link
Contributor

pmurias commented Jul 24, 2016

wontfix until Parrot resurfaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants