#1382: auto::alignptrs:   Eliminate this config step
-----------------------+----------------------------------------------------
 Reporter:  jkeenan    |       Owner:       
     Type:  RFC        |      Status:  new  
 Priority:  normal     |   Milestone:       
Component:  configure  |     Version:  1.9.0
 Severity:  medium     |    Keywords:       
     Lang:             |       Patch:       
 Platform:             |  
-----------------------+----------------------------------------------------
 In TT #498, Andy Dougherty noted that the result of configuration step
 `auto::alignptrs` is used in only two `PARROT_ASSERT` statements in
 ''src/pmc/unmanagedstruct.pmc'':
 {{{
  127 static char *
  128 char_offset_key(PARROT_INTERP, PMC *pmc, PMC *key, int *type)
  129 {
  ...
  186             if (*type == enum_type_struct_ptr) {
  187                 /* that is either a pointer */
  188                 PARROT_ASSERT((PTR2INTVAL(p) & (PARROT_PTR_ALIGNMENT
 - 1)) ==      0);
  189                 VTABLE_set_pointer(interp, init, *(void**)p);
  190             }
  ...
  196         else if (init->vtable->base_type == enum_class_ManagedStruct
  197              && *type                    == enum_type_struct_ptr) {
  198             /* a nested struct pointer belonging to us
  199              * p is the location of the struct pointer in the
  200              * outer struct, the inner is at PMC_data(init) */
  201
  202             PARROT_ASSERT((PTR2INTVAL(p) & (PARROT_PTR_ALIGNMENT -
 1)) == 0);
  203             *(void **)p = VTABLE_get_pointer(interp, init);
  204         }
  205
  206         return char_offset_key(interp, init, next, type);
  207     }
 }}}
 So tonight I created the `noalignptrs` branch to see what would happen if
 we did indeed eliminate this step.  So far, it has built and passed `make
 test`.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1382>
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