Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'nom' of github.com:rakudo/rakudo into nom
  • Loading branch information
japhb committed Apr 9, 2013
2 parents ccaae41 + 4402426 commit df6a910
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 31 deletions.
3 changes: 2 additions & 1 deletion src/Perl6/Metamodel/ContainerDescriptor.pm
Expand Up @@ -23,6 +23,7 @@ class Perl6::Metamodel::ContainerDescriptor {
method instantiate_generic($type_environment) {
my $ins_of := $!of.HOW.instantiate_generic($!of, $type_environment);
my $ins := nqp::clone(self);
pir::setattribute__0PPsP($ins, $?CLASS, '$!of', $ins_of)
nqp::bindattr($ins, $?CLASS, '$!of', $ins_of);
$ins
}
}
2 changes: 1 addition & 1 deletion src/Perl6/World.pm
Expand Up @@ -1158,7 +1158,7 @@ class Perl6::World is HLL::World {
# Creates a new container descriptor and adds it to the SC.
method create_container_descriptor($of, $rw, $name) {
my $cd_type := self.find_symbol(['ContainerDescriptor']);
my $cd := pir::perl6_create_container_descriptor__PPPis($cd_type, $of, $rw, $name);
my $cd := $cd_type.new(:$of, :$rw, :$name);
self.add_object($cd);
$cd
}
Expand Down
12 changes: 0 additions & 12 deletions src/binder/container.c
Expand Up @@ -169,15 +169,3 @@ PMC * Rakudo_cont_scalar_with_value_no_descriptor(PARROT_INTERP, PMC *value) {
PARROT_GC_WRITE_BARRIER(interp, new_scalar);
return new_scalar;
}

/* Creates and populates a new container descriptor. */
PMC * Rakudo_create_container_descriptor(PARROT_INTERP, PMC *type, PMC *of, INTVAL rw, STRING *name) {
PMC *result = REPR(type)->allocate(interp, STABLE(type));
Rakudo_ContainerDescriptor *desc = (Rakudo_ContainerDescriptor *)PMC_data(result);
REPR(result)->initialize(interp, STABLE(result), OBJECT_BODY(result));
desc->of = of;
desc->rw = rw;
desc->name = name;
PARROT_GC_WRITE_BARRIER(interp, result);
return result;
}
1 change: 0 additions & 1 deletion src/binder/container.h
Expand Up @@ -23,4 +23,3 @@ void Rakudo_cont_store(PARROT_INTERP, PMC *cont, PMC *value, INTVAL type_check,
PMC * Rakudo_cont_scalar_from_descriptor(PARROT_INTERP, PMC *container_descriptor);
PMC * Rakudo_cont_scalar_with_value_no_descriptor(PARROT_INTERP, PMC *value);
INTVAL Rakudo_cont_is_rw_scalar(PARROT_INTERP, PMC *check);
PMC * Rakudo_create_container_descriptor(PARROT_INTERP, PMC *type, PMC *of, INTVAL rw, STRING *name);
16 changes: 0 additions & 16 deletions src/ops/perl6.ops
Expand Up @@ -934,22 +934,6 @@ inline op perl6_container_store_unchecked(in PMC, in PMC) :base_core {
}


/*

=item perl6_create_container_descriptor

Creates a container descriptor and puts in in $1. $2 is the type of the
descriptor to create. $3 is the 'of' type, $4 is the rw flag and $5 is
the name.

=cut

*/
inline op perl6_create_container_descriptor(out PMC, in PMC, in PMC, in INT, in STR) :base_core {
$1 = Rakudo_create_container_descriptor(interp, $2, $3, $4, $5);
}


/*

=item perl6_assert_bind_ok(in PMC, in PMC)
Expand Down

0 comments on commit df6a910

Please sign in to comment.