Skip to content

Commit

Permalink
Add ops for doing checked/unchecked storage.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 2, 2011
1 parent 4a8e16a commit 9a10c1d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/ops/perl6.ops
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,38 @@ inline op perl6_decontainerize(out PMC, in PMC) :base_core {
}


/*

=item perl6_container_store(in PMC, in PMC)

Stores a value in a container. If it's Scalar, there's a fast path;
otherwise, calls the .STORE method.

=cut

*/
inline op perl6_container_store(in PMC, in PMC) :base_core {
Rakudo_cont_store(interp, $1, $2, 1, 1);
}


/*

=item perl6_container_store_unchecked(in PMC, in PMC)

Stores a value in a container. If it's Scalar, there's a fast path;
otherwise, calls the .STORE method. In the fast path case, with this
op no rw or type checking is done (assumes that the compiler has
already decided that it's safe).

=cut

*/
inline op perl6_container_store_unchecked(in PMC, in PMC) :base_core {
Rakudo_cont_store(interp, $1, $2, 0, 0);
}


/*

=item find_method_null_ok(out PMC, in PMC, in STR)
Expand Down

0 comments on commit 9a10c1d

Please sign in to comment.