#1105: change to a libjit based frame builder
----------------------+-----------------------------------------------------
 Reporter:  plobsing  |       Owner:  jkeenan 
     Type:  patch     |      Status:  assigned
 Priority:  normal    |   Milestone:          
Component:  core      |     Version:  branch  
 Severity:  medium    |    Keywords:          
     Lang:            |       Patch:  applied 
 Platform:            |  
----------------------+-----------------------------------------------------

Comment(by jkeenan):

 I've done some refactoring of `auto::libjit::runstep()` to make it more
 amenable to testing, eliminate unneeded variables and reduce the number of
 `return` points to just one.  I've added tests in
 ''t/steps/auto/libjit-01.t'', with the result that the test coverage is
 about as far as it's going to get on a box (like the one I use for this
 purpose) where libJIT is not yet installed.  (See
 [http://thenceforward.net/parrot/coverage/configure-build/config-auto-
 libjit-pm.html coverage report]).

 Two points:

 1.  In the `DESCRIPTION` section of ''config/auto/libjit.pm'', it would be
 good to have some documentation as to what libJIT is, where its
 documentation can be found and how to download and install it.

 2.  In `auto::libjit::_handle_has_libjit()` we set `has_exec_protect` to a
 true value in the Parrot::Configure object if the system has libJIT.  But
 two configuration steps later, in `auto::frames`, we have other code which
 sets `has_exec_protect`:
 {{{
  62         if ( -e "config/auto/frames/test_exec_${osname}_c.in" ) {
  63
 $conf->cc_gen("config/auto/frames/test_exec_${osname}_c.in");
  64             eval { $conf->cc_build(); };
  65             if ($@) {
  66                 $conf->data->set( has_exec_protect => 0 );
  67             }
  68             else {
  69                 my $exec_protect_test = (
  70                     $conf->cc_run(0) !~ /ok/ && $conf->cc_run(1) =~
 /ok/
  71                 );
  72                 if ($exec_protect_test) {
  73                     $conf->data->set( has_exec_protect => 1 );
  74                 }
  75                 else {
  76                     $conf->data->set( has_exec_protect => 0 );
  77                 }
  78             }
  79             $conf->cc_clean();
  80         }
  81         else {
  82             $conf->data->set( has_exec_protect => 0 );
  83         }
  84         $self->set_result( 'yes' );
  85     }
 }}}
 It doesn't seem right to make a determination of a Parrot::Configure
 element in one step only to re-set it two configuration steps later.  Can
 anyone shed light on this issue?

 Thank you very much.

 kid51

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1105#comment:19>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to