Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get an SC to track those others it ends up referencing.
  • Loading branch information
jnthn committed Jul 26, 2011
1 parent 1b06d16 commit e9244ec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/HLL/SerializationContextBuilder.pm
Expand Up @@ -54,6 +54,9 @@ class HLL::Compiler::SerializationContextBuilder {
# The event stream that builds or fixes up objects.
has @!event_stream;

# Other SCs that we are dependent on (maps handle to SC).
has %!dependencies;

# XXX Fix BUILD...
method new(:$handle!) {
my $obj := self.CREATE();
Expand Down Expand Up @@ -151,8 +154,10 @@ class HLL::Compiler::SerializationContextBuilder {
self.get_slot_past_for_object($obj);
}
else {
my $handle := $sc.handle;
%!dependencies{$handle} := $sc;
PAST::Op.new( :pirop('nqp_get_sc_object Psi'),
$sc.handle, $sc.slot_index_for($obj)
$handle, $sc.slot_index_for($obj)
)
}
}
Expand Down

0 comments on commit e9244ec

Please sign in to comment.