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

eval() in fails inside of methods #800

Closed
p6rt opened this issue Mar 19, 2009 · 7 comments
Closed

eval() in fails inside of methods #800

p6rt opened this issue Mar 19, 2009 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Mar 19, 2009

Migrated from rt.perl.org#63978 (status was 'resolved')

Searchable as RT63978$

@p6rt
Copy link
Author

p6rt commented Mar 19, 2009

From @ilyabelikin

Hi there,

example​:

class C {
  method foo { eval("'​:)'.say") }
}

C.foo;

die with​:
Null PMC access in inspect_str()
current instr.​: 'eval' pc 16074 (src/builtins/control.pir​:317)
<...>

Ilya

@p6rt
Copy link
Author

p6rt commented Mar 19, 2009

From @moritz

On Wed Mar 18 18​:21​:15 2009, ihrd wrote​:

Hi there,

example​:

class C {
method foo { eval("'​:)'.say") }
}

C.foo;

die with​:
Null PMC access in inspect_str()

I bisected it, and unsurprisingly it's this commit​:

e9aca5feac943b526021646f7144b1a7736fe201 is first bad commit
commit e9aca5feac943b526021646f7144b1a7736fe201
Author​: jnthn <jnthn@​jnthn.net>
Date​: Sat Mar 14 17​:53​:04 2009 +0100

  Make lexicals visible inside of eval. This depends on some recent
Parrot changes, so bump up required version number. There are two parts
to this​: letting the parser know what lexicals are declared in the outer
scope so it doesn't claim about them being undeclared, and then doing a
.set_outer so the lexicals can be found at runtime.

:040000 040000 b20308de7a0b5c535c450c9a722110e9c71e6e84
c031ec1c43519601a6688a6c7fba2fedac5a7d56 M build
:040000 040000 e5812a2fb7120fc97ff7b0d4c1d05c146ddd801b
6f19a8476c0fecbac8413e497996183fce596bf3 M src

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Mar 19, 2009

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Mar 20, 2009

From fireartist@gmail.com

eval() within a method fails with a "NULL PMC access" error,
though all tests + spectests pass ok.

This is on​:
rakudo version 44e1496989cf1b6f9fbd97152a31987841f2e0ff
parrot r37609

@p6rt
Copy link
Author

p6rt commented Mar 20, 2009

From @moritz

Tests are now (fudged) in t/spec/S29-context/eval.t.

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Mar 20, 2009

From @jnthn

On Wed Mar 18 18​:21​:15 2009, ihrd wrote​:

class C {
method foo { eval("'​:)'.say") }
}

C.foo;

die with​:
Null PMC access in inspect_str()
current instr.​: 'eval' pc 16074 (src/builtins/control.pir​:317)
<...>

Fixed in git 977b948, and we now have spectests for this too thanks to
moritz++, which I've unfudged.

Thanks,

Jonathan

@p6rt
Copy link
Author

p6rt commented Mar 20, 2009

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Mar 20, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant