hi,

i've been working on an actions file for the NQP compiler, written in
NQP. It can be found in compilers/nqp/bootstrap
to build it, go to the compilers/nqp directory, and type "make boot"

It seems to work pretty nicely, except that there's some weirdness going on.
The problem seems to be that some invocations to "get_scalar()" get lost.

Compare the output of ../../parrot nqp.pbc --target=pir
(note that this code doesn't make sense, and won't run. Just notice
the translation for $( 1) )

my $past := PAST::Var.new( $(1), :name('x'), :scope('lexical') );

.namespace
.sub "_block10"
    get_hll_global $P11, ["PAST"], "Var"
    new $P12, "Integer"
    assign $P12, 1
    $P13 = $P12."get_scalar"()
    $P14 = $P11."new"($P13, "x" :named("name"), "lexical" :named("scope"))
    .lex "$past", $P14
    .return ($P14)
.end

with ../../parrot bootstrap/nqp.pbc --target=pir:

my $past := PAST::Var.new( $(1), :name('x'), :scope('lexical') );

.namespace
.sub "_block10"
    get_hll_global $P11, ["PAST"], "Var"
    $P12 = $P11."new"(1, "x" :named("name"), "lexical" :named("scope"))
    .lex "$past", $P12
    .return ($P12)
.end


So, the "get_scalar()" call on "1" is removed.
Am I trying to do something impossible?

kjs

Reply via email to