[svn:parrot] r49775 - in branches/gsoc_nci: . config/gen/makefiles config/init lib/Parrot/Configure/Options lib/Parrot/Configure/Options/Conf src t/steps/init

plobsing at svn.parrot.org plobsing at svn.parrot.org
Thu Nov 4 03:01:42 UTC 2010


Author: plobsing
Date: Thu Nov  4 03:01:41 2010
New Revision: 49775
URL: https://trac.parrot.org/parrot/changeset/49775

Log:
add --without-core-nci-thunks configure option to build without core nci thunks (depends entirely on framebuilder)

Modified:
   branches/gsoc_nci/Configure.pl
   branches/gsoc_nci/config/gen/makefiles/root.in
   branches/gsoc_nci/config/init/defaults.pm
   branches/gsoc_nci/lib/Parrot/Configure/Options/Conf.pm
   branches/gsoc_nci/lib/Parrot/Configure/Options/Conf/Shared.pm
   branches/gsoc_nci/src/global_setup.c
   branches/gsoc_nci/t/steps/init/defaults-01.t

Modified: branches/gsoc_nci/Configure.pl
==============================================================================
--- branches/gsoc_nci/Configure.pl	Thu Nov  4 03:00:45 2010	(r49774)
+++ branches/gsoc_nci/Configure.pl	Thu Nov  4 03:01:41 2010	(r49775)
@@ -623,7 +623,6 @@
     auto::signal
     auto::socklen_t
     auto::env
-    auto::extra_nci_thunks
     auto::gmp
     auto::readline
     auto::pcre

Modified: branches/gsoc_nci/config/gen/makefiles/root.in
==============================================================================
--- branches/gsoc_nci/config/gen/makefiles/root.in	Thu Nov  4 03:00:45 2010	(r49774)
+++ branches/gsoc_nci/config/gen/makefiles/root.in	Thu Nov  4 03:01:41 2010	(r49775)
@@ -488,8 +488,8 @@
     src/namespace$(O) \
     src/nci/api$(O) \
     src/nci/signatures$(O) \
-    src/nci/core_thunks$(O) \
 #IF(has_libffi):    src/nci/libffi$(O) \
+#IF(has_core_nci_thunks):  src/nci/core_thunks$(O) \
 #IF(has_extra_nci_thunks): src/nci/extra_thunks$(O) \
     src/oo$(O) \
     src/packfile$(O) \
@@ -694,7 +694,7 @@
     src/multidispatch.str \
     src/namespace.str \
     src/nci/api.str \
-    src/nci/core_thunks.str \
+#IF(has_core_nci_thunks):  src/nci/core_thunks.str \
 #IF(has_extra_nci_thunks): src/nci/extra_thunks.str \
     src/nci/signatures.str \
     src/packfile.str \

Modified: branches/gsoc_nci/config/init/defaults.pm
==============================================================================
--- branches/gsoc_nci/config/init/defaults.pm	Thu Nov  4 03:00:45 2010	(r49774)
+++ branches/gsoc_nci/config/init/defaults.pm	Thu Nov  4 03:01:41 2010	(r49775)
@@ -262,6 +262,13 @@
 
     $conf->data->set( 'archname', $Config{archname});
 
+    $conf->data->set( has_core_nci_thunks => 1 );
+    $conf->data->set( HAS_CORE_NCI_THUNKS => 1 );
+    if ( $conf->options->get( 'without-core-nci-thunks' ) ) {
+        $conf->data->set( has_core_nci_thunks => 0 );
+        $conf->data->set( HAS_CORE_NCI_THUNKS => 0 );
+    }
+
     $conf->data->set( has_extra_nci_thunks => 1 );
     $conf->data->set( HAS_EXTRA_NCI_THUNKS => 1 );
     if ( $conf->options->get( 'without-extra-nci-thunks' ) ) {

Modified: branches/gsoc_nci/lib/Parrot/Configure/Options/Conf.pm
==============================================================================
--- branches/gsoc_nci/lib/Parrot/Configure/Options/Conf.pm	Thu Nov  4 03:00:45 2010	(r49774)
+++ branches/gsoc_nci/lib/Parrot/Configure/Options/Conf.pm	Thu Nov  4 03:01:41 2010	(r49775)
@@ -93,6 +93,10 @@
    --execcapable        Use JIT to emit a native executable
    --without-threads    Build parrot without thread support
    --buildframes        Dynamically build NCI call frames
+   --without-core-nci-thunks
+                        Build parrot without core-required
+                        statically compiled NCI call frames
+                        (useful for testing dynamic frame builders)
    --without-extra-nci-thunks
                         Build parrot without unnecessary
                         statically compiled NCI call frames

Modified: branches/gsoc_nci/lib/Parrot/Configure/Options/Conf/Shared.pm
==============================================================================
--- branches/gsoc_nci/lib/Parrot/Configure/Options/Conf/Shared.pm	Thu Nov  4 03:00:45 2010	(r49774)
+++ branches/gsoc_nci/lib/Parrot/Configure/Options/Conf/Shared.pm	Thu Nov  4 03:01:41 2010	(r49775)
@@ -71,6 +71,7 @@
     verbose-step
     version
     without-crypto
+    without-core-nci-thunks
     without-extra-nci-thunks
     without-gdbm
     without-gettext

Modified: branches/gsoc_nci/src/global_setup.c
==============================================================================
--- branches/gsoc_nci/src/global_setup.c	Thu Nov  4 03:00:45 2010	(r49774)
+++ branches/gsoc_nci/src/global_setup.c	Thu Nov  4 03:01:41 2010	(r49775)
@@ -194,7 +194,9 @@
 
     pmc = Parrot_pmc_new(interp, enum_class_Hash);
     VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS, pmc);
+#if PARROT_HAS_CORE_NCI_THUNKS
     Parrot_nci_load_core_thunks(interp);
+#endif
 #if PARROT_HAS_EXTRA_NCI_THUNKS
     Parrot_nci_load_extra_thunks(interp);
 #endif

Modified: branches/gsoc_nci/t/steps/init/defaults-01.t
==============================================================================
--- branches/gsoc_nci/t/steps/init/defaults-01.t	Thu Nov  4 03:00:45 2010	(r49774)
+++ branches/gsoc_nci/t/steps/init/defaults-01.t	Thu Nov  4 03:01:41 2010	(r49775)
@@ -145,6 +145,41 @@
 
 $conf->replenish($serialized);
 
+##### with core-nci-thunks #####
+($args, $step_list_ref) = process_options(
+    {
+        argv => [ ],
+        mode => q{configure},
+    }
+);
+
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+$ret = $step->runstep($conf);
+ok( defined $ret, "runstep() returned defined value" );
+ok($conf->data->get( 'has_core_nci_thunks' ),
+    "Got expected value for has_core_nci_thunks" );
+ok($conf->data->get( 'HAS_CORE_NCI_THUNKS' ),
+    "Got expected value for HAS_CORE_NCI_THUNKS" );
+
+$conf->replenish($serialized);
+
+##### without core-nci-thunks #####
+($args, $step_list_ref) = process_options(
+    {
+        argv => [ q{--without-core-nci-thunks} ],
+        mode => q{configure},
+    }
+);
+
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+$ret = $step->runstep($conf);
+ok( defined $ret, "runstep() returned defined value" );
+ok(! $conf->data->get( 'has_core_nci_thunks' ),
+    "Got expected value for has_core_nci_thunks" );
+ok(! $conf->data->get( 'HAS_CORE_NCI_THUNKS' ),
+    "Got expected value for HAS_CORE_NCI_THUNKS" );
 ##### with extra-nci-thunks #####
 ($args, $step_list_ref) = process_options(
     {


More information about the parrot-commits mailing list