File Coverage

File:config/auto/gc.pm
Coverage:100.0%

linestmtbrancondsubcode
1# Copyright (C) 2001-2009, Parrot Foundation.
2# $Id: gc.pm 43593 2010-01-26 02:39:50Z jkeenan $
3
4 - 22
=head1 NAME

config/auto/gc.pm - Garbage Collection

=head1 DESCRIPTION

Sets memory allocator.

Currently, we have only one choice:  the memory allocator in
F<src/gc/alloc_resources.c>.

In the future, we will have a C<--gc> command-line option which will enable
the configurer to choose among several garbage collectors.

=over 4

=back

=cut
23
24package auto::gc;
25
26
81
81
81
use strict;
27
81
81
81
use warnings;
28
29
81
81
81
use base qw(Parrot::Configure::Step);
30
31
81
81
81
use Parrot::Configure::Utils ':auto';
32
33sub _init {
34
81
    my $self = shift;
35
81
    my %data;
36
81
    $data{description} = q{Determine allocator to use};
37
81
    $data{result} = q{};
38
81
    return \%data;
39}
40
41sub runstep {
42
81
    my ( $self, $conf ) = @_;
43
44
81
    my $gc = 'gc';
45
46
81
    $conf->data->set(
47        TEMP_gc_c => <<"EOF",
48src/gc/alloc_resources\$(O): \$(GENERAL_H_FILES) src/gc/alloc_resources.c
49EOF
50        TEMP_gc_o => "src/gc/alloc_resources\$(O)",
51        gc_flag => '',
52    );
53
81
    print(" ($gc) ") if $conf->options->get('verbose');
54
55
81
    return 1;
56}
57
581;
59
60# Local Variables:
61# mode: cperl
62# cperl-indent-level: 4
63# fill-column: 100
64# End:
65# vim: expandtab shiftwidth=4: