Skip to content

Commit 60e2607

Browse files
authored
Valhalla lab: three-truths method, causal isolation, 3 real reproducers (#2)
* Core vertical slice: docs/abi.md contract, native/lgj-abi, Java facade Ships the fully verified core of the Panama x ndarray::simd x Valhalla vertical slice (Phases A-E of the mission plan): - docs/abi.md: the normative Rust<->Java ABI contract, written before either side was implemented so both could be checked against one frozen doc instead of each other. - Five new ndarray::simd primitives (eq_u32_to_mask, gt_i32_to_mask, mask_and/mask_or(_assign), masked_sum_i32), added under ndarray's own W1a consumer contract. - native/lgj-abi: the Rust ABI crate. Generation-checked handle registry, generic SoA fixture, bulk kernels routed exclusively through ndarray::simd, 14-symbol extern "C" surface. 72/72 tests green, clippy/fmt clean, and the registry's core safety check was disable-verified (short-circuited, confirmed exactly the two guarding tests go red, restored). - java/: the Panama membrane (internal/ffm, never exposed publicly) and the public semantic facade (NativePattern/View/Predicate/ Pattern/Mask). 132/132 checks green across 8 suites, including a reflection-enforced ApiSurfaceTest that mechanically proves zero FFM types ever reach a public signature, and a LazinessTest that empirically proves the thesis: building a chain costs zero crossings, evaluating it costs exactly one, independent of row count up to 1,000,000. - .claude/: a 6-agent ensemble, 6 knowledge docs, and a full board (LATEST_STATE/STATUS_BOARD/AGENT_LOG/EPIPHANIES/TECH_DEBT/ISSUES/ PR_ARC_INVENTORY/INTEGRATION_PLANS/CODEX_REVIEW_CHECKLIST), all scoped to this repo's actual seams. A mechanical audit (D-LGJ-AUDIT) found and fixed the one real rule violation before this commit: kernels.rs::simd_popcount was calling the internal ndarray::hpc::bitwise path instead of the sanctioned ndarray::simd re-export. Deliberately NOT included: the Valhalla lab (valhalla-lab/) and the Vector API benchmark harness (bench/) — still in flight, tracked as open STATUS_BOARD.md rows, to land in a follow-up PR once reviewed with the same rigor as this slice. Generated by [Claude Code](https://claude.ai/code) * Valhalla lab: three-truths method, causal isolation, 3 real reproducers Completes D-LGJ-F. One experiment source (src/shared/), compiled twice against real JDKs -- stable JDK 26 GA (record) and the official JEP 401 early-access binary (value record) -- via a self-verifying run.sh that mechanically diffs the two Vocab.java files modulo the 'value' keyword before trusting the A/B is honest. Experiments: IdentityExperiment (semantic truth -- is identity actually unobservable), FootprintExperiment (real per-object/array/field bytes via allocation-delta + JOL where available), FfmAddressingExperiment (is the wrapper free where it touches native memory), ThesisExperiment (the mandatory headline: 65,536 rows as one native lane vs hydrated Java objects, on both platforms). Causal isolation via three additional run.sh passes: escape analysis off, and UseArrayFlattening/UseFieldFlattening toggled independently -- isolates which flag actually drives the measured difference rather than inferring it. Three real Valhalla limitations reproduced and filed under reproducers/, none of which changed the production API: - R1: @NullRestricted field on an identity class is a VerifyError (javac's fault -- no source form expresses the required strict-field init order relative to super()) - R2: array flattening has a hard 8-byte payload cliff, confirmed via -XX:+PrintFlatArrayLayout. LaneId/Ordinal/MaskId (<=8B) flatten; RowRange/Row (16B) do not. This turns "Valhalla helps descriptors, not entities" from a hand-wave into a measured VM cutoff -- and RowRange landing on the wrong side is flagged as the one place the expectation was too optimistic. - R3: the densest null-restricted array form is jdk.internal-only and generics erase flattening entirely; Foo! null-restricted type syntax confirmed not to parse, matching the earlier archaeology finding. One real defect found and fixed before landing: IdentityExperiment and the stable Platform called Class::isValue() directly on four vocabulary types with a comment incorrectly claiming it was "final API on JDK 26" -- it does not exist there at all, confirmed by a real javac failure. Fixed by routing every query through Platform.isValueClass(Class<?>), answered honestly per platform. Generated by [Claude Code](https://claude.ai/code)
1 parent 617e9d1 commit 60e2607

40 files changed

Lines changed: 2392 additions & 2 deletions

.claude/board/EPIPHANIES.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,57 @@
44
> `**Status:**`/`**Confidence:**` line. A correction gets its own new,
55
> dated entry that references the one it corrects — the storno rule.
66
7+
## 2026-08-17 — E-LGJ-VALHALLA-MEASURED-NOT-ASSUMED-1
8+
9+
**Status:** FINDING. **Confidence:** High (real numbers, both JDKs actually
10+
run, reproducible via `valhalla-lab/README.md`).
11+
12+
The mandatory N-objects-vs-N-values-vs-1-lane experiment
13+
(`.claude/knowledge/valhalla-three-truths-method.md`'s "one experiment that
14+
must never be skipped") ran on both real JDKs. Headline, on 65,536 rows,
15+
identical question, identical answer on every path:
16+
17+
| | native, one crossing | hydrate 65,536 `Row`, then scan |
18+
|---|---:|---:|
19+
| stable JDK 26 | 19.5 µs, 289 KiB | 746 µs, 2.00 MiB |
20+
| Valhalla JDK 27 EA | 15.7 µs, 289.5 KiB | 900 µs, 2.50 MiB |
21+
22+
**The thesis's prediction held, and the reason why is itself a measured
23+
finding, not an assumption:** `LaneId` (one field) measured `FLAT` under
24+
Valhalla via the real VM query `ValueClass.isFlatArray` (2.90 B/element vs
25+
16.00 B on stable — ~5.5× smaller), but `Row` (multiple fields) measured
26+
**`NOT-FLAT`** even under Valhalla, and its per-row heap cost (40.01 B) was
27+
*larger* than the stable JDK's own record-array cost (32.01 B). Valhalla
28+
genuinely helps a single-field descriptor; it did not flatten the
29+
multi-field materialization the thesis explicitly said to check rather
30+
than assume away.
31+
32+
**One real defect found and fixed before this landed** — a bug of the
33+
falsifiability-discipline-caught-it, not the happy-path-hid-it kind. The
34+
first version of `IdentityExperiment` and the stable-JDK `Platform` called
35+
`Class::isValue()` directly on four vocabulary types, with a comment
36+
incorrectly asserting *"Class::isValue is final API on JDK 26."* It does
37+
not exist there at all — confirmed by a real `javac` compile failure, not
38+
by re-reading documentation. Fixed by routing every identity query through
39+
`Platform.isValueClass(Class<?>)`: the stable half answers `false`
40+
honestly (a JDK with no value-class concept can never produce one — the
41+
answer is exact, not a guess, unlike the genuinely-unknowable
42+
`arrayFlatness` case the same file already handles correctly), the
43+
Valhalla half answers with the real `type.isValue()`. The correction
44+
mirrors `E-LGJ-CORE-SLICE-GREEN-DISABLE-VERIFIED-1`'s finding about
45+
`kernels.rs`: an agent's own doc comment stated the WRONG fact confidently
46+
one line above the code that relied on it, and only compiling both
47+
variants for real (not trusting the report that they "should" compile)
48+
caught it.
49+
50+
**Two javac usage facts worth keeping** (real dead ends this session hit
51+
and resolved, recorded so a future session doesn't re-hit them):
52+
`--release N` cannot be combined with `--add-exports` for a system module
53+
(a hard javac restriction, not a bug) — use `-source N` instead when
54+
compiling for the same JDK you'll run on; and `--enable-preview` requires
55+
an explicit `-source`/`--release` to be present at all, it is not
56+
self-sufficient.
57+
758
## 2026-08-17 — E-LGJ-CORE-SLICE-GREEN-DISABLE-VERIFIED-1
859

960
**Status:** FINDING. **Confidence:** High (measured, not asserted — every

.claude/board/STATUS_BOARD.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ list.
1313
| D-LGJ-C | `native/lgj-abi` — manifest, generation-checked registry, generic SoA fixture, kernels, `extern "C"` surface | **DONE 2026-08-17**`cargo test` **72/72**, `clippy -D warnings` clean, `fmt --check` clean, release build → 14/14 symbols verified via `nm -D`. **Disable-verified**: the registry's generation check was short-circuited and exactly the 2 tests that should catch it went red, 70 stayed green; restored, re-verified 72/72 | D, H |
1414
| D-LGJ-D | Java FFM membrane `internal/ffm` | **DONE 2026-08-17** — compiles clean with `-Xlint:all`; 7 `[restricted]` warnings, all in `internal/ffm/*` or a test deliberately exercising it; `AbiContractTest` 7/7 incl. proving the manifest cross-check genuinely rejects a wrong `.so` (`libz.so.1` loads but is refused for exporting no `lgj_abi_manifest`) | E |
1515
| D-LGJ-E | Java public facade (`NativePattern`/`View`/`Predicate`/`Pattern`/`Mask`) | **DONE 2026-08-17**`AllTests` **132/132**: `ApiSurfaceTest` (reflection-enforced zero-FFM-leakage), `SmokeTest` 14/14, `FixtureParityTest` 30/30 (Java independently recomputes expected counts from the transcribed generator), `FusionParityTest` 31/31 (fused/unfused/scalar bit-identical across 6 row-count shapes), `LazinessTest` 8/8 (empirically: 0 crossings to build a 16-condition chain, exactly 1 to evaluate it, independent of rows up to 1,000,000 — the thesis's central claim, measured), `NarrowingTest` 16/16, `LifetimeTest` 23/23 | F, G |
16-
| D-LGJ-F | Valhalla lab — three-truths method on the small semantic value vocabulary | **In flight** — sequenced after E, now reading the real Java types; deferred to a follow-up PR, not blocking PR #1 | I |
17-
| D-LGJ-G | Java Vector API comparative bench vs Panama→`ndarray::simd` | **In flight** — real JMH jars fetched (`jmh-core`/`jmh-generator-annprocess`/`jopt-simple`/`commons-math3`) to `bench/lib/` (gitignored); no bench source written yet; deferred to the same follow-up PR as F | I |
16+
| D-LGJ-F | Valhalla lab — three-truths method on the small semantic value vocabulary | **DONE 2026-08-17** — `valhalla-lab/`: 4 experiments + a self-verifying `run.sh` (mechanically diffs the two `Vocab.java`s modulo the `value` keyword before trusting the A/B) + 3 causal-isolation runs (escape-analysis off; `UseArrayFlattening`/`UseFieldFlattening` toggled independently). 3 real Valhalla limitations reproduced and filed under `reproducers/` (R1: `@NullRestricted` field on an identity class is a `VerifyError`, javac's fault — no source form expresses required strict-field order; **R2: array flattening has a hard 8-byte payload cliff, VM-confirmed via `-XX:+PrintFlatArrayLayout`** — `LaneId`/`Ordinal`/`MaskId` (≤8B) flatten, `RowRange`/`Row` (16B) do not, so "Valhalla helps descriptors not entities" is a measured VM cutoff, not a hand-wave, and `RowRange` landing on the wrong side is flagged as the one place the expectation was too optimistic; R3: the densest null-restricted array form is `jdk.internal`-only and generics erase flattening entirely — `Foo!` type syntax confirmed NOT to parse, matching the archaeology finding). 1 real defect found + fixed before landing (see `EPIPHANIES.md`). None of the three limitations changed the production API — the migration path stays exactly `record` → `value record` | I |
17+
| D-LGJ-G | Java Vector API comparative bench vs Panama→`ndarray::simd` | **In flight** — real JMH + JOL jars fetched (`jmh-core`/`jmh-generator-annprocess`/`jopt-simple`/`commons-math3`/`jol-core`) to `bench/lib/` (gitignored); no bench source written yet; the ONLY remaining open row | I |
1818
| D-LGJ-H | Falsification: handle lifecycle (adversarial), SIMD/scalar parity, Java/native parity | **DONE 2026-08-17 for the Rust+Java core** — see D-LGJ-C's disable-verification and D-LGJ-E's `FusionParityTest`/`LifetimeTest`. Re-opens for F/G once the Lab lands | I |
1919
| D-LGJ-I | Docs: `architecture.md`, `panama.md`, `valhalla-lab.md`, `execution-boundary.md` | **Queued** — gated on F/G landing (the docs synthesize Lab results, not just the core) ||
2020
| D-LGJ-AUDIT | Mechanical post-fan-out audit: `grep` for `ndarray::hpc` imports, any `.h`/`cbindgen`/`jextract` artifact, any FFM type leaking into public Java API | **DONE 2026-08-17** — 1 real violation found (`kernels.rs::simd_popcount` used the internal `ndarray::hpc::bitwise` path), fixed in place; everything else confirmed to be the one sanctioned exception or explanatory prose | closed D-LGJ-C/D/E for the core |

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Cargo.lock.bak
1111
/bench/out/
1212
/bench/lib/*.jar
1313
/valhalla-lab/out/
14+
# run.sh's own compiled output (results/*-api, results/*-lab class trees) — the
15+
# .txt/.diff/.log evidence files alongside them ARE committed, the compiled
16+
# classes are pure build residue, regenerated by ./run.sh on demand.
17+
/valhalla-lab/results/*/
1418

1519
# Downloaded JDKs and artifacts (never committed — see docs/abi.md and
1620
# .claude/knowledge/jdk-toolchain-facts.md for how to obtain them)

valhalla-lab/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# The Valhalla laboratory
2+
3+
The three-truths method (`.claude/knowledge/valhalla-three-truths-method.md`) applied to this
4+
project's small semantic value vocabulary — `LaneId`, `Ordinal`, `MaskId`, `RowRange`, `Row` — and
5+
to the mission's mandatory headline experiment: does Valhalla rescue per-entity materialization at
6+
65,536-row scale, or only the tiny descriptor vocabulary around it?
7+
8+
**Same experiment source, compiled twice** — once against a stable JDK where the vocabulary types
9+
are plain `record`s, once against the JEP 401 early-access JDK where they are `value record`s — so
10+
the comparison is genuinely apples-to-apples, not two different programs.
11+
12+
## Layout
13+
14+
```
15+
src/shared/ experiment logic, byte-identical on both compiles
16+
src/stable/ Vocab.java (record), Containers.java, Platform.java — the stable-JDK half of the A/B
17+
src/valhalla/ Vocab.java (value record), Containers.java, Platform.java — the Valhalla half
18+
```
19+
20+
`Platform` is the one seam between them: same signatures on both sides, so `src/shared/` never
21+
branches on which platform it's running on except by asking `Platform` — never by calling a
22+
Valhalla-only API (like `Class::isValue` or `jdk.internal.value.ValueClass`) directly. That is a
23+
real rule, not a style preference: `Class::isValue` does not exist at all on a stable JDK, so a
24+
direct call would fail to *compile* the stable half, not just report the wrong answer.
25+
26+
`NativeAccess` (in `src/shared/`, package `com.adaworldapi.lancegraph`) is a read-only, split-package
27+
escape hatch into the shipped library's package-private handle — documented in the file itself. It
28+
exists because the lab has to build the very thing the thesis says you should not build (65,536 Java
29+
objects) from the *same bytes* the native kernel reads, or the comparison proves nothing. Nothing
30+
under `java/` changes to support this.
31+
32+
## Build and run
33+
34+
### Stable half (JDK 26 GA, plain `record`s)
35+
36+
```sh
37+
javac -d out-stable $(find ../java/src/main/java src/shared src/stable -name '*.java')
38+
39+
java --enable-native-access=ALL-UNNAMED \
40+
-Dlgj.library=../target/release/liblgj_abi.so \
41+
-cp out-stable com.adaworldapi.lancegraph.lab.RunAll
42+
```
43+
44+
### Valhalla half (the JEP 401 EA build, `value record`s)
45+
46+
`--release` cannot be combined with `--add-exports` (a real javac restriction — `--release` uses a
47+
stricter cross-compilation module model). Use `-source` instead when compiling *for* the JDK you are
48+
also running on, which is the case here.
49+
50+
```sh
51+
javac --enable-preview -source 27 \
52+
--add-exports java.base/jdk.internal.value=ALL-UNNAMED \
53+
--add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED \
54+
-d out-valhalla $(find ../java/src/main/java src/shared src/valhalla -name '*.java')
55+
56+
java --enable-preview --enable-native-access=ALL-UNNAMED \
57+
--add-exports java.base/jdk.internal.value=ALL-UNNAMED \
58+
--add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED \
59+
-Dlgj.library=../target/release/liblgj_abi.so \
60+
-cp out-valhalla com.adaworldapi.lancegraph.lab.RunAll
61+
```
62+
63+
Both need the JDK paths from `.claude/knowledge/jdk-toolchain-facts.md` — do not use `/usr/bin/java`
64+
(JDK 21, no value classes at all) for either.
65+
66+
## What each experiment measures
67+
68+
| Class | Question |
69+
|---|---|
70+
| `IdentityExperiment` | Truth (a), semantic: is identity actually unobservable? `Class::isValue`, reference equality, array flatness, `synchronized` legality — measured on both platforms, asked to agree everywhere except reference equality (which no caller in the production API uses). |
71+
| `FootprintExperiment` | Truth (b)/(c), representation: per-object bytes, array layout, field flattening, call-argument passing — via `jol-core`'s real VM instrumentation where available, allocation-delta measurement elsewhere. |
72+
| `FfmAddressingExperiment` | Is the wrapper free where it actually touches native memory — a `RowRange`/`Ordinal` around an FFM offset vs a bare `long`? |
73+
| `ThesisExperiment` | The mandatory headline: 65,536 rows as (1) one native lane + one packed mask + one crossing, vs (2)/(3) hydrated Java objects, on the SAME question and the SAME answer. Heap cost and wall time, both platforms. |
74+
75+
## Measured headline (2026-08-17, this environment)
76+
77+
Real numbers from a real run — reproduce with the commands above before citing a different number.
78+
79+
| | native, one crossing | hydrate 65,536 `Row`, then scan |
80+
|---|---:|---:|
81+
| stable JDK 26 | 19.5 µs, 289 KiB Java-side | 746 µs, 2.00 MiB |
82+
| Valhalla (JDK 27 EA) | 15.7 µs, 289.5 KiB Java-side | 900 µs, 2.50 MiB |
83+
84+
The native path wins by roughly **38–57×** on time and **7–9×** on Java heap, on **both** platforms —
85+
Valhalla does not close this gap, because `Row` (multiple fields) measured `NOT-FLAT` even under
86+
Valhalla, while the single-field `LaneId` measured `FLAT` (2.90 B/element vs 16.00 B on stable, ~5.5×
87+
smaller). This is the mission thesis's prediction, confirmed rather than assumed: **Valhalla helps
88+
the tiny descriptor vocabulary; it does not rescue per-entity materialization at this scale.** See
89+
`IdentityExperiment`'s and `FootprintExperiment`'s full output for the field-by-field evidence.
90+
91+
## A defect found and fixed while wiring this up
92+
93+
The first version of `IdentityExperiment`/stable `Platform` called `Class::isValue()` directly for
94+
four of the five vocabulary types (`Ordinal`/`MaskId`/`RowRange`/`Row`), with a comment incorrectly
95+
claiming it was "final API on JDK 26." It is not — `javac` on JDK 26 GA does not have that method at
96+
all, confirmed by a real compile failure, not by reading documentation. Fixed by routing every
97+
identity query through `Platform.isValueClass(Class<?>)`, which the stable half answers `false` (a
98+
JDK with no value-class concept can never produce one, so the answer is exact, not a guess) and the
99+
Valhalla half answers with the real `type.isValue()`. See `EPIPHANIES.md`
100+
`E-LGJ-CORE-SLICE-GREEN-DISABLE-VERIFIED-1` for the audit discipline this caught it under.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Picked up JAVA_TOOL_OPTIONS:
2+
identity container FAILED: java.lang.VerifyError
3+
All strict final fields must be initialized before super(): 1 field(s), lane:LR1_NullRestrictedFieldInIdentityClass$LaneId; in R1_NullRestrictedFieldInIdentityClass$Descriptor
4+
value container: LaneId[index=1] (works)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Reproducer R1 — @NullRestricted on a field of an ORDINARY (identity) class fails at class load.
2+
// javac emits the fields' initialisers AFTER the super() call; the VM demands strict fields be
3+
// assigned BEFORE it. There is no @Strict in this build for javac to key on and no source form
4+
// that expresses the required order, so the combination is unreachable from Java source.
5+
//
6+
// javac --enable-preview -source 27 -target 27 \
7+
// --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED -d out R1_*.java
8+
// java --enable-preview \
9+
// --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED -cp out R1_NullRestrictedFieldInIdentityClass
10+
import jdk.internal.vm.annotation.NullRestricted;
11+
12+
public class R1_NullRestrictedFieldInIdentityClass {
13+
static value record LaneId(int index) {}
14+
15+
/** An ordinary class that wants a flat LaneId field. Compiles. Does not load. */
16+
static final class Descriptor {
17+
@NullRestricted final LaneId lane;
18+
Descriptor(int i) { this.lane = new LaneId(i); }
19+
}
20+
21+
/** The workaround: make the CONTAINER a value class too. Its fields are then strict already. */
22+
static value class ValueDescriptor {
23+
@NullRestricted final LaneId lane;
24+
ValueDescriptor(int i) { this.lane = new LaneId(i); }
25+
}
26+
27+
public static void main(String[] a) {
28+
try {
29+
System.out.println("identity container: " + new Descriptor(1).lane);
30+
} catch (Throwable t) {
31+
System.out.println("identity container FAILED: " + t.getClass().getName());
32+
System.out.println(" " + String.valueOf(t.getMessage()).lines().findFirst().orElse(""));
33+
}
34+
System.out.println("value container: " + new ValueDescriptor(1).lane + " (works)");
35+
}
36+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Picked up JAVA_TOOL_OPTIONS:
2+
type payload NR-nonAtomic NR-atomic nullable-atomic
3+
P4 4 B true true true
4+
P8i 8 B true true false
5+
P8l 8 B true true false
6+
P12 12 B false false false
7+
P16 16 B false false false
8+
P16l 16 B false false false
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Reproducer R2 — array flattening stops at an 8-byte payload in this build.
2+
// Sweeps payload shapes and asks the VM directly via ValueClass.isFlatArray for all three
3+
// array flavours. Every shape wider than 8 bytes is NOT flattened, in any flavour.
4+
//
5+
// javac --enable-preview -source 27 -target 27 \
6+
// --add-exports java.base/jdk.internal.value=ALL-UNNAMED -d out R2_FlatteningCliff.java
7+
// java --enable-preview --add-exports java.base/jdk.internal.value=ALL-UNNAMED \
8+
// -cp out R2_FlatteningCliff
9+
// Add -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlatArrayLayout to see the VM's own layout log.
10+
import jdk.internal.value.ValueClass;
11+
12+
public class R2_FlatteningCliff {
13+
static value record P4(int a) {} // 4 B
14+
static value record P8i(int a, int b) {} // 8 B
15+
static value record P8l(long a) {} // 8 B
16+
static value record P12(long a, int b) {} // 12 B
17+
static value record P16(long a, int b, int c) {} // 16 B <- the shape of a real entity
18+
static value record P16l(long a, long b) {} // 16 B
19+
20+
record Case(String name, int payload, Class<?> type, Object init) {}
21+
22+
public static void main(String[] x) {
23+
Case[] cases = {
24+
new Case("P4", 4, P4.class, new P4(0)),
25+
new Case("P8i", 8, P8i.class, new P8i(0, 0)),
26+
new Case("P8l", 8, P8l.class, new P8l(0)),
27+
new Case("P12", 12, P12.class, new P12(0, 0)),
28+
new Case("P16", 16, P16.class, new P16(0, 0, 0)),
29+
new Case("P16l",16, P16l.class, new P16l(0, 0)),
30+
};
31+
System.out.printf("%-6s %-8s %-16s %-16s %s%n",
32+
"type", "payload", "NR-nonAtomic", "NR-atomic", "nullable-atomic");
33+
for (Case c : cases) {
34+
System.out.printf("%-6s %5d B %-16s %-16s %s%n", c.name(), c.payload(),
35+
ValueClass.isFlatArray(ValueClass.newNullRestrictedNonAtomicArray(c.type(), 16, c.init())),
36+
ValueClass.isFlatArray(ValueClass.newNullRestrictedAtomicArray(c.type(), 16, c.init())),
37+
ValueClass.isFlatArray(ValueClass.newNullableAtomicArray(c.type(), 16)));
38+
}
39+
}
40+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Picked up JAVA_TOOL_OPTIONS: -Djavax.net.ssl.trustStore=/root/.ccr/java-truststore.p12 -Djavax.net.ssl.trustStorePassword=changeit -Djavax.net.ssl.trustStoreType=PKCS12 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=34795 -Dhttp.nonProxyHosts=localhost|127.0.0.1|::1|127.*|0.*|::|169.254.*|anthropic.com|*.anthropic.com|*.anthropic.com|registry.npmjs.org|jsr.io|npm.jsr.io|pypi.org|files.pythonhosted.org|index.crates.io|proxy.golang.org|host.docker.internal|10.*|172.16.*|172.17.*|172.18.*|172.19.*|172.20.*|172.21.*|172.22.*|172.23.*|172.24.*|172.25.*|172.26.*|172.27.*|172.28.*|172.29.*|172.30.*|172.31.*|192.168.*|100.64.0.0/10|*.svc.cluster.local|*.svc.cluster.local -Djdk.http.auth.tunneling.disabledSchemes= -Djdk.http.auth.proxying.disabledSchemes=
2+
/tmp/Bang.java:1: error: not a statement
3+
public class Bang { static value record L(int i){} public static void main(String[] a){ L![] x = new L![2]; System.out.println(x.length);} }
4+
^
5+
/tmp/Bang.java:1: error: ';' expected
6+
public class Bang { static value record L(int i){} public static void main(String[] a){ L![] x = new L![2]; System.out.println(x.length);} }

0 commit comments

Comments
 (0)