While I'm already at oplib, interpreter and predereferenced code, I've 
another one:

Currently we have 3 incarnations of one core.ops:
- core_ops.c
- core_ops_cg.c
- core_ops_prederef.c

While the 1st and the the 3rd have an op_info_table (and and op lib 
descriptor, core_ops_cg.c doesn't has these.

As all of these 3 files implement the same core.ops, it would be useful 
to separate op_info_table into e.g. core_ops_info_table.c, providing the 
table and the look-up function.

All 3 implementations above could use this info table for their 
op_info_table in their op_lib descriptor (core_ops_cg.c should have an 
op_lib descriptor).

This would allow building parrot with just one of this cores + one 
info_table (or without an info_table at all, when no debugger/trace/JIT 
is needed).

As these cores are by far the hughest parts of parrot, this would allow 
to build very small parrot interpreters. For systems having dynamic 
loading, there could be one standard core statically included (or none), 
while the others could be loaded on demand at runtime.

Finally I have here a patch, that cuts down core_ops_prederef.c by 50% 
and core_ops_prederef.o by 1/3 saving ~160 KB in the final executables. 
I'll send it in separately.

A final note: when patches to this (or parts of it) will be excepted, it 
will be crucial to get them in in the correct order.

leo

Reply via email to