+ /**
+ * This field should live in AbstractResumedStatement, but is placed here for memory efficiency to squat in the
+ * alignment shadow of {@link #bitsAight} and {@link #executionOrder}.
+ */
+ private boolean implicitDeclaredFlag;
+
+ // TODO: we a single byte of alignment shadow left, we should think how we can use it to cache information we build
+ // during InferredStatementContext.tryToReusePrototype(). We usually end up being routed to
+ // copyAsChildOfImpl() -- which performs an eager instantiation and checks for changes afterwards. We should
+ // be able to capture how parent scope affects the copy in a few bits. If we can do that, than we can reap
+ // the benefits by just examining new parent context and old parent context contribution to the state. If
+ // their impact is the same, we can skip instantiation of statements and directly reuse them (individually,
+ // or as a complete file).
+ //
+ // Whatever we end up tracking, we need to track two views of that -- for the statement itself
+ // (sans substatements) and a summary of substatements. I think it should be possible to get this working
+ // with 2x5bits -- we have up to 15 mutable bits available if we share the field with implicitDeclaredFlag.
+