pub enum Handle {
DHeader,
EmHeader,
Pid,
TryConstruct,
ReaderMark,
PidRead,
EmHeaderRead,
}Expand description
A small value of the runtime’s that the generated code declares.
A header is opened before the value it frames and closed after it,
and the close needs to know where the open wrote. Each runtime keeps
that in a small value of its own — zdw_dheader in C, DHeader in
Java — and the walk holds one in a local without knowing what it is.
Naming these in the walk was the last thing C’s spelling reached
into: a Java backend that inherited zdw_dheader as a type name
would generate source no compiler has a type for.
The reading direction adds four, and they were the leak the C++
reader found: the walk spelled zdw_try_construct,
zdw_reader_mark, zdw_pid_read and zdw_emheader_read into
CodecTarget::named directly, which is C’s namespace written into
what is supposed to be language-neutral. They went unnoticed because
the C column was the only one that generated a reader.
Variants§
DHeader
What CodecTarget::runtime’s write_dheader returns.
EmHeader
What write_emheader returns.
Pid
What write_pid and write_pid_extended return.
TryConstruct
The behaviour §7.2.2.7 attaches to a position, as the reader’s extra parameter takes it.
zdw_try_construct in C, TryConstruct in Java and C++. A
parameter rather than something the runtime hands back, and here
rather than beside Constant because the walk needs the
type to declare the parameter with; the three values it takes
are Constant::TryConstruct*. A walk that wrote C’s spelling
would name a type javac has never seen.
ReaderMark
What reader_save returns and reader_restore takes.
PidRead
What read_pid and read_pid_as return.
EmHeaderRead
What read_emheader returns.