On Mar 7, 2006, at 0:31, Allison Randal wrote:

  pio = socket(".AF_UNIX", ...)

It seems like a more general problem than that. Like, you want a way of flagging a constant when you define it as to whether it should be substituted when compiling to bytecode or substituted when interpreting the bytecode. (And a way of storing delayed constant substitutions in the bytecode.)

Exactly. The same problem is arising with all constants created at compile time in some certain order, which should be valid and the same at runtime too. The most prominent example is PMC type numbers:

  new P0, .TclInt

or such depends on the loading order of dynamic PMCs (if there are more than one) [1]. The general defered lookup is just using a string:

  new P0, "TclInt"

Runcores that are recompiling opcodes are doing the lookup just once per PBC location and replace it with the integer constant variant on-the-fly. Therefore it's not a real speed penalty.

[1] actually PMC types are handled within the HLL_info structure now, but the general problem is still existing.

Allison

leo

Reply via email to