Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Teach P6opaque how to deal with odd (not multiple of 8) native bit wi…
…dths.
  • Loading branch information
arnsholt committed Feb 2, 2013
1 parent 1a8e58a commit 6b1e294
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/6model/reprs/P6opaque.c
Expand Up @@ -226,7 +226,9 @@ static void compute_allocation_strategy_OLD(PARROT_INTERP, PMC *WHAT, P6opaqueRE
bits = spec.bits;
align = spec.align;
repr_data->flattened_stables[i] = STABLE(type);


if (bits % 8) bits += bits % 8;

/* Does it need special initialization? */
if (REPR(type)->initialize) {
if (!repr_data->initialize_slots)
Expand Down Expand Up @@ -471,6 +473,8 @@ static void compute_allocation_strategy(PARROT_INTERP, PMC *repr_info, P6opaqueR
align = spec.align;
repr_data->flattened_stables[i] = STABLE(type);

if (bits % 8) bits += bits % 8;

/* Does it need special initialization? */
if (REPR(type)->initialize) {
if (!repr_data->initialize_slots)
Expand Down

0 comments on commit 6b1e294

Please sign in to comment.