1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
//! Shared backend decisions keyed by the owning L2 artifact's node ids.
//!
//! This is the native decision boundary for issue #6839. It is separate
//! from the flat [`crate::op::Program`]: DOM and SSR consume these facts
//! beside L2, while Vapor requests the program separately. The borrowed
//! producer computes conservative static/binding/control facts;
//! placement analysis and production selection remain unfinished.
use Vec;
use ;
use Artifact;
use cratePlacement;
pub use ;
pub use ;
use TargetPolicy;
/// Complete native decisions bound to their actual immutable L2 owner.
///
/// Only [`build_decisions`] can construct this result. A consumer takes this
/// sole input and derives the artifact and read-only tables from it; equal
/// local node indices in another artifact cannot establish that association.
/// Keeping the borrow also prevents unsealing the owner while this result lives.
///
/// Arbitrary complete tables cannot claim an owner's identity:
/// ```compile_fail
/// use vize_l2::artifact::Artifact;
/// use vize_l3::decision::{DecisionTables, NativeAnalysis};
/// fn forge<'o, 'a>(artifact: &'o Artifact<'a>, tables: DecisionTables) {
/// let _ = NativeAnalysis { artifact, tables };
/// }
/// ```
/// Its tables cannot be modified through the analysis:
/// ```compile_fail
/// use vize_l3::decision::NativeAnalysis;
/// fn edit(analysis: &mut NativeAnalysis<'_, '_>) {
/// analysis.tables().nodes.clear();
/// }
/// ```
/// Unsealing the owner cannot invalidate live decisions:
/// ```compile_fail
/// use vize_l2::artifact::Artifact;
/// use vize_l3::decision::{build_decisions, policy::TargetPolicy};
/// fn unseal(artifact: Artifact<'_>) {
/// let analysis = build_decisions(&artifact, TargetPolicy::Ssr).unwrap();
/// let _parts = artifact.into_parts();
/// let _ = analysis.tables();
/// }
/// ```
/// Neutral static classification of one L2 subtree.
///
/// This vocabulary does not encode DOM patch flags or SSR/Vapor output.
/// The current DOM analysis remains the comparison oracle until the native
/// producer computes the same facts and passes byte and instruction gates.
/// Decisions owned by one L2 region op or attached binding.
/// The authored construct that owns a control region.
/// Control containment beside the L2 tree, keyed by its owning L2 node.
///
/// This record names conditional, loop and slot-outlet containment;
/// grouped slot-content scopes and branch analysis remain unfinished. It
/// does not invent a flat-program region id or reorder
/// any branch, slot, cache, or effect.
/// Mutable scratch records for native L3 decisions.
///
/// Completed consumer input is [`NativeAnalysis`], which retains the actual
/// owner and exposes these tables read-only. An empty or independently built
/// table cannot establish complete analysis or association with any artifact.
/// Storage is the existing sparse side table; no storage-cost reduction is
/// claimed by the native producer.