Jens Rieks <[EMAIL PROTECTED]> wrote:

> % cat error.imc
> .sub _main @MAIN
>     .local string na123me

>     na123me = "/foo"
>     loadlib $P0, na123me

>     end
> .end

> % ./parrot -o error.pbc error.imc
> Couldn't load 'runtime/parrot/a123m':

The parser currently loads extensions at compile time to be able to load
in new PMC types. This of course fails with variables.

I can see some ways to fix that:
- allow only string constants for loadlib
- don't load extensions at compile time, so that dynamic PMCs have to be
  created with

   $I0 = find_type "Foo"
   $P0 = new $I0

- just don't try to load the lib, if it's name isn't a string constant

leo

Reply via email to