Skip to content

Commit

Permalink
Eliminate obsolete FETCH methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Jun 17, 2010
1 parent 4cb5c39 commit 62f2219
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 49 deletions.
16 changes: 0 additions & 16 deletions src/builtins/Int.pir
Expand Up @@ -95,22 +95,6 @@ Overridden for Int.

=back

=head2 Private methods

=over 4

=item !FETCH()

Value type, so return self.

=cut

.sub '!FETCH' :method
.return (self)
.end

=back

=cut

# Local Variables:
Expand Down
4 changes: 2 additions & 2 deletions src/builtins/Mu.pir
Expand Up @@ -367,13 +367,13 @@ in the future.)
.param pmc source
# Get hold of the source object to assign.
$I0 = can source, '!FETCH'
$I0 = can source, 'item'
if $I0 goto source_fetch
source = deobjectref source
source = new ['ObjectRef'], source
goto have_source
source_fetch:
source = source.'!FETCH'()
source = source.'item'()
source = deobjectref source
have_source:
Expand Down
15 changes: 0 additions & 15 deletions src/builtins/Num.pir
Expand Up @@ -102,21 +102,6 @@ Overridden for Num.

=over 4

=item !FETCH()

Value type, so return self.

=cut

.sub '!FETCH' :method
.return (self)
.end


=back

=cut

=item radcalc

=cut
Expand Down
11 changes: 0 additions & 11 deletions src/builtins/Parcel.pir
Expand Up @@ -149,17 +149,6 @@ Coerce the Parcel into a capture.
.end


=item !FETCH()

=cut

.sub '!FETCH' :method
$P0 = self.'flat'()
$P0 = new ['Perl6Scalar'], $P0
.return ($P0)
.end


=back

=head2 Functions
Expand Down
6 changes: 1 addition & 5 deletions src/pmc/p6opaque.pmc
Expand Up @@ -37,7 +37,6 @@ static STRING *CREATE_str;
static STRING *defined_str;
static STRING *DISPATCH_JUNCTION_METHOD_str;
static STRING *do_str;
static STRING *FETCH_str;
static STRING *get_parrotclass_str;
static STRING *handles_dispatchers_str;
static STRING *HANDLES_DISPATCH_HELPER_str;
Expand Down Expand Up @@ -277,7 +276,6 @@ pmclass P6opaque extends Object dynpmc group perl6_group auto_attrs {
defined_str = CONST_STRING(interp, "defined");
DISPATCH_JUNCTION_METHOD_str = CONST_STRING(interp, "!DISPATCH_JUNCTION_METHOD");
do_str = CONST_STRING(interp, "$!do");
FETCH_str = CONST_STRING(interp, "!FETCH");
get_parrotclass_str = CONST_STRING(interp, "get_parrotclass");
handles_dispatchers_str = CONST_STRING(interp, "@!handles_dispatchers");
HANDLES_DISPATCH_HELPER_str = CONST_STRING(interp, "!HANDLES_DISPATCH_HELPER");
Expand Down Expand Up @@ -401,8 +399,7 @@ back some kind of iterator to let us get all of the possible candidates.
!Parrot_str_equal(interp, name, isa_str) &&
!Parrot_str_equal(interp, name, does_str) &&
!Parrot_str_equal(interp, name, item_str) &&
!Parrot_str_equal(interp, name, defined_str) &&
!Parrot_str_equal(interp, name, FETCH_str)) {
!Parrot_str_equal(interp, name, defined_str)) {
/* Look up closure maker, clone it, attach name and return that. */
PMC *sub = Parrot_find_global_n(interp, Parrot_get_ctx_HLL_namespace(interp),
MAKE_WHATEVER_CLOSURE_str);
Expand All @@ -425,7 +422,6 @@ back some kind of iterator to let us get all of the possible candidates.
!Parrot_str_equal(interp, name, perl_str) &&
!Parrot_str_equal(interp, name, select_str) &&
!Parrot_str_equal(interp, name, add_variant_str) &&
!Parrot_str_equal(interp, name, FETCH_str) &&
!Parrot_str_equal(interp, name, postcircumfix_str)) {
PMC *ns_key, *ns, *punner, *boxed_name;
ns_key = pmc_new(interp, enum_class_ResizableStringArray);
Expand Down

0 comments on commit 62f2219

Please sign in to comment.