[svn:parrot] r41300 - in branches/kill_jit: . config/auto lib/Parrot/Configure/Options lib/Parrot/Configure/Options/Conf lib/Parrot/Configure/Step
darbelo at svn.parrot.org
darbelo at svn.parrot.org
Wed Sep 16 17:44:21 UTC 2009
Author: darbelo
Date: Wed Sep 16 17:44:18 2009
New Revision: 41300
URL: https://trac.parrot.org/parrot/changeset/41300
Log:
Add a new configure step to determine a platform's capability to build JIT call frames. Run but not used yet.
Added:
branches/kill_jit/config/auto/frames.pm
Modified:
branches/kill_jit/Configure.pl
branches/kill_jit/lib/Parrot/Configure/Options/Conf.pm
branches/kill_jit/lib/Parrot/Configure/Options/Conf/Shared.pm
branches/kill_jit/lib/Parrot/Configure/Step/List.pm
Modified: branches/kill_jit/Configure.pl
==============================================================================
--- branches/kill_jit/Configure.pl Wed Sep 16 17:00:36 2009 (r41299)
+++ branches/kill_jit/Configure.pl Wed Sep 16 17:44:18 2009 (r41300)
@@ -351,6 +351,10 @@
Use JIT system.
+=item C<--buildframes>
+
+Dynamically build NCI call frames.
+
=item C<--execcapable>
Use JIT to emit a native executable.
@@ -617,6 +621,7 @@
auto::isreg
auto::arch
auto::jit
+ auto::frames
auto::cpu
auto::funcptr
auto::cgoto
Added: branches/kill_jit/config/auto/frames.pm
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/kill_jit/config/auto/frames.pm Wed Sep 16 17:44:18 2009 (r41300)
@@ -0,0 +1,57 @@
+# Copyright (C) 2009, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+config/auto/frmes -
+
+=head1 DESCRIPTION
+
+Determines whether the current platform is capable of building NCI call
+frames dynamically. Use the C<--buildframes> option to override the
+default value for your CPU architecture and operating system.
+
+=cut
+
+package auto::frames;
+
+use strict;
+use warnings;
+
+use base qw(Parrot::Configure::Step);
+
+sub _init {
+ my $self = shift;
+ my %data;
+ $data{description} = q{Determine call frame building capability};
+ $data{result} = q{};
+ return \%data;
+}
+
+sub runstep {
+ my ( $self, $conf ) = @_;
+
+ my $can_build_call_frames = 0;
+
+ my $osname = $conf->data->get('osname');
+ my $cpuarch = $conf->data->get('cpuarch');
+ my $nvsize = $conf->data->get('nvsize');
+
+ if (defined $conf->options->get('buildframes') || ($nvsize == 8
+ && $cpuarch eq 'i386' && $osname ne 'darwin')) {
+ $can_build_call_frames = 1;
+ }
+
+ $conf->data->set( can_build_call_frames => $can_build_call_frames );
+ $self->set_result($can_build_call_frames?'yes':'no');
+ return 1;
+}
+
+1;
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/kill_jit/lib/Parrot/Configure/Options/Conf.pm
==============================================================================
--- branches/kill_jit/lib/Parrot/Configure/Options/Conf.pm Wed Sep 16 17:00:36 2009 (r41299)
+++ branches/kill_jit/lib/Parrot/Configure/Options/Conf.pm Wed Sep 16 17:44:18 2009 (r41300)
@@ -95,6 +95,7 @@
--jitcapable Use JIT
--execcapable Use JIT to emit a native executable
--without-threads Build parrot without thread support
+ --buildframes Dynamically build NCI call frames
External Library Options:
Modified: branches/kill_jit/lib/Parrot/Configure/Options/Conf/Shared.pm
==============================================================================
--- branches/kill_jit/lib/Parrot/Configure/Options/Conf/Shared.pm Wed Sep 16 17:00:36 2009 (r41299)
+++ branches/kill_jit/lib/Parrot/Configure/Options/Conf/Shared.pm Wed Sep 16 17:44:18 2009 (r41300)
@@ -38,6 +38,7 @@
inline
intval
jitcapable
+ buildframes
languages
ld
ldflags
Modified: branches/kill_jit/lib/Parrot/Configure/Step/List.pm
==============================================================================
--- branches/kill_jit/lib/Parrot/Configure/Step/List.pm Wed Sep 16 17:00:36 2009 (r41299)
+++ branches/kill_jit/lib/Parrot/Configure/Step/List.pm Wed Sep 16 17:44:18 2009 (r41300)
@@ -40,6 +40,7 @@
auto::isreg
auto::arch
auto::jit
+ auto::frames
auto::cpu
auto::funcptr
auto::cgoto
More information about the parrot-commits
mailing list