Skip to content

Commit b4e475a

Browse files
committed
Bring NQPQ up-to-date with latest NQP compiler.
1 parent 265a34e commit b4e475a

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/NQPQ/Actions.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,11 @@ class NQP::Actions is HLL::Actions {
459459
$past := PAST::Var.new(
460460
:name($name), :scope('attribute_6model'),
461461
:viviself( vivitype( $<sigil> ) ),
462-
PAST::Var.new( :name('self') ),
462+
PAST::Op.new( :pirop('nqp_decontainerize PP'), PAST::Var.new( :name('self') ) ),
463463
PAST::Var.new( :name('$?CLASS') )
464464
);
465465

466-
# Make sure the attribute exists.
466+
# Make sure the attribute exists and add type info.
467467
unless $*IN_DECL {
468468
my $attr;
469469
for $*PACKAGE.HOW.attributes($*PACKAGE, :local(1)) {

src/NQPQ/Grammar.pm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ grammar NQP::Grammar is HLL::Grammar {
1717
# Serialization context builder - keeps track of objects that
1818
# cross the compile-time/run-time boundary that are associated
1919
# with this compilation unit.
20-
my $*SC := NQP::SymbolTable.new(
21-
# XXX Need to hash the source, or something.
22-
:handle(~pir::time__N()));
20+
my $file := pir::find_caller_lex__ps('$?FILES');
21+
my $*SC := pir::isnull($file) ??
22+
NQP::SymbolTable.new(:handle(~pir::time__N())) !!
23+
NQP::SymbolTable.new(:handle(~pir::time__N()), :description($file));
2324

2425
my $*SCOPE := '';
2526
my $*MULTINESS := '';

src/NQPQ/SymbolTable.pm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,11 @@ class NQP::SymbolTable is HLL::Compiler::SerializationContextBuilder {
421421
PAST::Var.new( :name('cur_sc'), :scope('register'), :isdecl(1) ),
422422
PAST::Op.new( :pirop('nqp_create_sc Ps'), self.handle() )
423423
),
424+
PAST::Op.new(
425+
:pasttype('callmethod'), :name('set_description'),
426+
PAST::Var.new( :name('cur_sc'), :scope('register') ),
427+
self.sc.description
428+
),
424429
$des
425430
),
426431
$fix

0 commit comments

Comments
 (0)