feat(pbs): add Map and read-only Keyval associations
Test / Tests and coverage
Intrepid/Prometeu/Studio/pipeline/pr-master This commit looks good

This commit is contained in:
2026-10-26 20:37:06 +00:00
parent 8105604f92
commit 01a1968689
41 changed files with 4072 additions and 42 deletions
@@ -44,9 +44,10 @@ class PbsListCursorTest {
if(name.startsWith("gc"))module=PbsStructuredValuesTest.withTestSafepoint(module);
new BytecodePreloadVerifierService().verify(module);
Files.createDirectories(directory());Files.write(directory().resolve("pbs-"+collection+"-"+name+".pbx"),module.serialize());
if(!name.startsWith("gc")) {
if(!name.startsWith("gc") || collection.equals("map")) {
var optimized=new OptimizeIRVMService().optimize(new LowerToIRVMService().lower(backend));
var optimizedModule=new BytecodeEmitter().emit(optimized.coherentEmissionPlan());
if(name.startsWith("gc"))optimizedModule=PbsStructuredValuesTest.withTestSafepoint(optimizedModule);
new BytecodePreloadVerifierService().verify(optimizedModule);
Files.write(directory().resolve("pbs-"+collection+"-"+name+"-optimized.pbx"),optimizedModule.serialize());
}
@@ -0,0 +1,341 @@
package p.studio.compiler.backend.irvm;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import java.nio.file.Files;
import java.nio.file.Path;
import static org.junit.jupiter.api.Assertions.*;
class PbsMapKeyvalTest {
static void compile(String name,String source)throws Exception { PbsListCursorTest.compileCollection("map",name,source); }
static void probe(String name,String body)throws Exception { compile(name,"declare service Probe {fn main()->int {"+body+"}}"); }
@Test void fullApiAndConstructionPreservePreviousValues()throws Exception {
probe("basic","""
let values:map<str,int>=new map();let alias=values;
if values.isEmpty()==false or values.size()!=(0 as long){return 0;}
if values["missing"].hasSome() or values.remove("missing").hasSome() or values.containsKey("missing"){return 0;}
values["a"]=0;if values["a"].hasNone() or values.containsKey("a")==false{return 0;}
if (values.put(new keyval<str,int>("a",20)) else -1) != 0 {return 0;}
if (alias["a"] else 0) != 20 {return 0;}
if values.put(new keyval<str,int>("b",22)).hasSome(){return 0;}
if values.size()!=(2 as long){return 0;}
let total:int=(values.remove("a") else 0)+(values.remove("b") else 0);
if values.remove("a").hasSome() or values.isEmpty()==false{return 0;}
for i:int from 0 until 40 {let indexed=new map<int,int>();indexed[i]=42;if (indexed[i] else 0) != 42{return 0;}}
values["again"]=42;values.clear();values.clear();
let diamond:map<long,bool>=new map<>();diamond[9223372036854775807]=false;
if diamond[9223372036854775807].hasNone(){return 0;}
let maybe:optional (map<int,int>)=some(new map());
if let present=maybe {present[0]=total;return present[0] else 0;}return 0;
""");
}
@Test void optionalPayloadPresenceIsNeverEntryAbsence()throws Exception {
probe("optional","""
let values=new map<str,optional int>();
if values["a"].hasSome(){return 0;}
values["a"]=none;
if values.containsKey("a")==false{return 0;}
if let payload=values["a"] {if payload.hasSome(){return 0;}}else{return 0;}
if let old=values.put(new keyval<str,optional int>("a",some(42))) {if old.hasSome(){return 0;}}else{return 0;}
let capture=values.cursor();values["a"]=none;
if let entry=capture.current(){if (entry.value() else 0) != 42{return 0;}}else{return 0;}
if let removed=values.remove("a"){if removed.hasSome(){return 0;}}else{return 0;}
if values.remove("a").hasSome(){return 0;}
let nested=new map<int,optional (optional int)>();nested[0]=some(none);
if let outer=nested[0]{if let inner=outer{if inner.hasSome(){return 0;}}else{return 0;}}else{return 0;}
let independent=new keyval<optional int,optional int>(none,some(42));
if independent.key().hasSome(){return 0;}return independent.value() else 0;
""");
}
@Test void defaultIdentitiesPreserveStaticDomainsAndObjectAliases()throws Exception {
probe("scalars","""
let ints=new map<int,int>();ints[-2147483648]=20;ints[0]=22;
let longs=new map<long,int>();longs[-9223372036854775808]=20;longs[9223372036854775807]=22;
let floats=new map<float,int>();floats[0.0]=20;floats[-0.0]=42;
if floats.size()!=(1 as long) or (floats[0.0] else 0)!=42{return 0;}
let flags=new map<bool,bool>();flags[false]=false;flags[true]=true;
if flags[false].hasNone() or (flags[false] else true){return 0;}
let text=new map<str,int>();text["hel"+"lo"]=42;text[""]=0;text["ação 😀"]=20;
if (text["hello"] else 0)!=42 or text.size()!=(3 as long){return 0;}
return (ints[-2147483648] else 0)+(longs[9223372036854775807] else 0);
""");
compile("objects","""
declare struct Item(pub mut value:int);
declare contract Read{fn read()->int;}
implements Read for Item using x{fn read()->int{return x.value;}}
declare service Probe{fn main()->int{
let a=new Item(20);let b=new Item(20);let values=new map<Item,Item>();
values[a]=a;values[b]=b;a.value=42;
if values.size()!=(2 as long){return 0;}
if let stored=values[a]{if stored!=a or stored.value!=42{return 0;}}else{return 0;}
let views=new map<Read,int>();views[a as Read]=20;views[b as Read]=22;
if views.size()!=(2 as long){return 0;}
let receivers=new map<Read,Read>();receivers[a as Read]=b as Read;
let capture=receivers.cursor();receivers.clear();
if let e=capture.current(){if e.key().read()!=42 or e.value().read()!=20{return 0;}}else{return 0;}
return (views[a as Read] else 0)+(views[b as Read] else 0);
}}
""");
String random;
try(var stream=getClass().getResourceAsStream("/game/stdlib/1/sdk/random/main.pbs")) {
assertNotNull(stream);random=new String(stream.readAllBytes(),java.nio.charset.StandardCharsets.UTF_8);
}
compile("random",random+"""
fn randomMapProbe()->int{
let values=new map<Random,Random>();let a=random.new(42);let b=random.new(42);
values[a]=b;values[b]=a;random.next(a);
if values.size()!=(2 as long) or values.containsKey(a)==false{return 0;}
if let found=values[a]{if found!=b{return 0;}}else{return 0;}return 42;
}
declare service Probe{fn main()->int{return randomMapProbe();}}
""");
probe("references","""
let a=new array<int>(1);a[0]=20;let b=new array<int>(1);b[0]=20;
let arrays=new map<array<int>,int>();arrays[a]=20;arrays[b]=22;a[0]=42;
if arrays.size()!=(2 as long){return 0;}
let f:Fn(int)->int=fn[](x:int)->int{return x;};let g:Fn(int)->int=fn[](x:int)->int{return x;};
let functions=new map<Fn(int)->int,int>();functions[f]=20;functions[g]=22;
if functions.size()!=(2 as long) or (arrays[a] else 0)!=20{return 0;}
return (functions[f] else 0)+(functions[g] else 0);
""");
}
@Test void contentReplacementPreservesTheOriginalRepresentativeAndSnapshot()throws Exception {
compile("content","""
declare struct Item(pub id:int,pub mut score:int);
declare service Policy{}
implements Identity<Item> for Policy using p{
fn hash(v:Item)->long{return v.id as long;}
fn equals(a:Item,b:Item)->bool{return a.id==b.id;}
}
declare service Probe{fn main()->int{
let a=new Item(7,20);let equal=new Item(7,22);let values=new map<Item,Item>(Policy);
values[a]=a;let before=values.cursor();
let old=values.put(new keyval<Item,Item>(equal,equal));
if let item=old{if item!=a{return 0;}}else{return 0;}
if values.size()!=(1 as long){return 0;}
if let entry=values.cursor().current(){if entry.key()!=a or entry.value()!=equal{return 0;}}else{return 0;}
if let entry=before.current(){if entry.key()!=a or entry.value()!=a{return 0;}}else{return 0;}
a.score=42;if let entry=before.current(){if entry.value().score!=42{return 0;}}else{return 0;}
values.remove(equal);values[equal]=equal;
if let entry=values.cursor().current(){if entry.key()!=equal{return 0;}}else{return 0;}
let one=new keyval<Item,Item>(a,equal);let two=new keyval<Item,Item>(a,equal);
let associations=new set<keyval<Item,Item>>();associations.add(one);associations.add(two);
if associations.size()!=(2 as long){return 0;}return 42;
}}
""");
}
@Test void collisionCountersCoverRehashAndChainRemoval()throws Exception {
compile("collisions","""
declare struct Policy(pub mut hashes:int,pub mut comparisons:int);
implements Identity<int> for Policy using p{
fn hash(v:int)->long{p.hashes=p.hashes+1;return -9223372036854775808;}
fn equals(a:int,b:int)->bool{p.comparisons=p.comparisons+1;return a==b;}
}
declare service Probe{fn main()->int{
let policy=new Policy(0,0);let values=new map<int,int>(policy);
for i:int from 0 until 6{values[i]=i;}
if policy.hashes!=6 or policy.comparisons!=15{return 0;}
values[6]=6;if policy.hashes!=7 or policy.comparisons!=21{return 0;}
let capture=values.cursor();if policy.hashes!=7 or policy.comparisons!=21{return 0;}
let total:int=0;
while true{if let entry=capture.current(){total=total+entry.value();}else{break;}if capture.hasNext(){capture.next();}else{break;}}
if total!=21{return 0;}
values[6]=42;if values.size()!=(7 as long) or (values[6] else 0)!=42{return 0;}
for i:int from 7 until 40{values[i]=i;}
for i:int from 0 until 40{if values.containsKey(i)==false{return 0;}}
values.remove(20);values.remove(39);values.remove(0);
if values.containsKey(20) or values.containsKey(39) or values.containsKey(0){return 0;}
for i:int from 0 until 40{values.remove(i);}
if values.isEmpty()==false{return 0;}return 42;
}}
""");
probe("arithmetic","""
let maximum:long=4294967295;let sizeMaximum:long=9223372036854775807;
if _hashCapacity(0,1)!=(8 as long) or _hashCapacity(8,6)!=(8 as long){return 0;}
if _hashCapacity(8,7)!=(16 as long) or _hashCapacity(maximum-1,maximum)!=maximum{return 0;}
if _hashCapacity(maximum,maximum+1)!=maximum or _hashNextSize(sizeMaximum-1)!=sizeMaximum{return 0;}
if _hashBucket(-9223372036854775808,maximum)<(0 as long) or _hashBucket(-1,8)!=(7 as long){return 0;}return 42;
""");
probe("fault-overflow","_hashNextSize(9223372036854775807);return 0;");
}
@Test void groupedKeysValuesAndOptionalCarriersPreserveFullPayloads()throws Exception {
compile("tuple","""
declare service Policy{}
implements Identity<(a:int,b:int)> for Policy using p{
fn hash(v:(a:int,b:int))->long{return -1;}
fn equals(a:(a:int,b:int),b:(a:int,b:int))->bool{return a.a==b.a&&a.b==b.b;}
}
declare service Probe{fn main()->int{
let m=new map<(a:int,b:int),optional (left:int,right:int)>(Policy);
let key=(a:20,b:22);m[key]=some((left:20,right:22));
for i:int from 0 until 20{m[(a:i,b:0)]=none;}
let walk=m.cursor();m.clear();let total:int=0;
while true{if let entry=walk.current(){if let payload=entry.value(){total=total+payload.left+payload.right;}}else{break;}if walk.hasNext(){walk.next();}else{break;}}
return total;
}}
""");
compile("native","""
[BuiltinType(name="vec2",version=1)]declare builtin type Vector(pub x:float,pub y:float){}
declare service Policy{}
implements Identity<Vector> for Policy using p{
fn hash(v:Vector)->long{return -1;}
fn equals(a:Vector,b:Vector)->bool{return a.x==b.x&&a.y==b.y;}
}
fn nativeProbe()->int{
let values=new map<Vector,Vector>(Policy);let k=new Vector(1.0,2.0);values[k]=new Vector(20.0,22.0);
if let previous=values.put(new keyval<Vector,Vector>(new Vector(1.0,2.0),new Vector(21.0,21.0))){if previous.x!=20.0 or previous.y!=22.0{return 0;}}else{return 0;}
let capture=values.cursor();values.clear();if let e=capture.current(){if e.key().x!=1.0 or e.key().y!=2.0{return 0;}return (e.value().x+e.value().y) as int;}return 0;
}
declare service Probe{fn main()->int{return nativeProbe();}}
""");
compile("pixel","""
[BuiltinType(name="color",version=1)]declare builtin type Color(pub raw:long){}
[BuiltinConst(target="color",name="red",version=1)]declare const RED:Color;
[BuiltinType(name="pixel",version=1)]declare builtin type Pixel(pub x:long,pub y:long,pub color:Color){}
declare service Policy{}
implements Identity<Pixel> for Policy using p{
fn hash(v:Pixel)->long{return -1;}
fn equals(a:Pixel,b:Pixel)->bool{return a.x==b.x&&a.y==b.y&&a.color==b.color;}
}
fn pixelProbe()->int{
let values=new map<Pixel,Pixel>(Policy);let k=new Pixel(1,2,RED);values[k]=new Pixel(20,22,RED);
let capture=values.cursor();values.clear();if let e=capture.current(){if e.key().x!=(1 as long) or e.key().y!=(2 as long) or e.value().color!=RED{return 0;}return (e.value().x+e.value().y) as int;}return 0;
}
declare service Probe{fn main()->int{return pixelProbe();}}
""");
}
@Test void cursorKeepsTheSharedFullStateTableAndIndependentAssociations()throws Exception {
probe("cursor-empty","""
let values=new map<int,int>();let capture=values.cursor();
for i:int from 0 until 3{if capture.hasNext() or capture.current().hasSome(){return 0;}capture.next();}return 42;
""");
probe("cursor-single","""
let values=new map<int,int>();values[0]=42;let capture=values.cursor();values[0]=0;values.clear();
for i:int from 0 until 3{if capture.hasNext(){return 0;}if let e=capture.current(){if e.key()!=0 or e.value()!=42{return 0;}}else{return 0;}capture.next();}return 42;
""");
probe("snapshot","""
let values=new map<int,int>();values[0]=20;values[1]=22;let capture=values.cursor();
values[0]=0;values.remove(1);for i:int from 2 until 40{values[i]=i;}values.clear();
let sum:int=0;let count:int=0;
while true{if let e=capture.current(){sum=sum+e.value();count=count+1;}else{break;}if capture.hasNext(){capture.next();}else{break;}}
if count!=2{return 0;}return sum;
""");
}
@Test void receiverAndArgumentsAreEvaluatedOnceInSourceOrder()throws Exception {
compile("evaluation","""
declare struct Effects(pub mut trace:int,pub m:map<str,int>){
fn receiver()->map<str,int>{this.trace=this.trace*10+1;return this.m;}
fn key()->str{this.trace=this.trace*10+2;return "a";}
fn value()->int{this.trace=this.trace*10+3;return 42;}
}
fn insert(values:map<str,int>,key:str,value:int){values[key]=value;}
declare service Probe{fn main()->int{
let m=new map<str,int>();let e=new Effects(0,m);e.receiver()[e.key()]=e.value();
if e.trace!=123{return 0;}e.trace=0;let found=e.receiver()[e.key()];if e.trace!=12{return 0;}
e.trace=0;insert apply (value:e.value(),key:e.key(),values:e.receiver());if e.trace!=321{return 0;}
e.trace=0;let removed=e.receiver().remove(e.key());if e.trace!=12{return 0;}return removed else 0;
}}
""");
}
@Test void callbacksRespectGuardAndReadOnlyPreparation()throws Exception {
for(int action=1;action<=7;action++){
String operation=switch(action){case 1->"let found=m[0];";case 2->"m[0]=42;";case 3->"m.containsKey(0);";case 4->"m.put(new keyval<int,int>(0,42));";case 5->"m.remove(0);";case 6->"m.clear();";default->"let failure=1/0;";};
compile("fault-callback-"+action,"""
declare struct Policy(pub mut owner:optional (map<int,int>));
implements Identity<int> for Policy using p{
fn hash(v:int)->long{if let m=p.owner{OPERATION}return 0;}
fn equals(a:int,b:int)->bool{return a==b;}
}
declare service Probe{fn main()->int{let p=new Policy(none);let m=new map<int,int>(p);p.owner=some(m);m[0]=42;return 0;}}
""".replace("OPERATION",operation));
compile("fault-equals-"+action,"""
declare struct Policy(pub mut owner:optional (map<int,int>),pub mut armed:bool);
implements Identity<int> for Policy using p{
fn hash(v:int)->long{return 0;}
fn equals(a:int,b:int)->bool{if p.armed{if let m=p.owner{OPERATION}}return a==b;}
}
declare service Probe{fn main()->int{let p=new Policy(none,false);let m=new map<int,int>(p);p.owner=some(m);m[0]=20;p.armed=true;m[1]=22;return 0;}}
""".replace("OPERATION",operation));
}
compile("callback-reads","""
declare struct Policy(pub mut owner:optional (map<int,int>),pub mut calls:int);
implements Identity<int> for Policy using p{
fn hash(v:int)->long{
if let m=p.owner{if m.size()!=(p.calls as long){let failure=1/0;}let c=m.cursor();if p.calls==0&&c.current().hasSome(){let failure=1/0;}if p.calls>0&&c.current().hasNone(){let failure=1/0;}}
p.calls=p.calls+1;return 0;
}
fn equals(a:int,b:int)->bool{return a==b;}
}
declare service Probe{fn main()->int{let p=new Policy(none,0);let m=new map<int,int>(p);p.owner=some(m);m[0]=20;m[1]=22;if p.calls!=2{return 0;}return 42;}}
""");
}
@Test void resourceFixturesExposeEachStructuralPhase()throws Exception {
for(var operation:java.util.Map.of(
"growth","values[42]=42;","add","values[42]=42;","replace","values[1]=42;",
"put","let old=values.put(new keyval<int,int>(1,42));","remove","let old=values.remove(1);",
"clear","values.clear();","cursor","let capture=values.cursor();","read","let found=values[1];").entrySet()){
compile("refusal-"+operation.getKey(),"""
fn mutationMarker(){let marker:int=314160;}
fn completedMarker(){let marker:int=314161;}
fn performSecond(values:map<int,int>){OPERATION}
fn perform(values:map<int,int>){performSecond(values);}
declare service Probe{fn main()->int{let values=new map<int,int>();for i:int from 0 until COUNT{values[i]=i;}mutationMarker();perform(values);completedMarker();return 42;}}
""".replace("OPERATION",operation.getValue()).replace("COUNT",operation.getKey().equals("growth")?"6":"5"));
}
String sdk=PbsSetTest.sdk();int offset=sdk.indexOf("[SdkMap]");
String injected=sdk.substring(0,offset)+sdk.substring(offset).replace("this.buckets = published;","""
this.buckets = published;
if this.length == (6 as long) {let injectedQuotaProbe=new array<int>(1000000);}
""");
PbsListCursorTest.compileCollection("map","injected-refusal-growth","""
declare service Probe{fn main()->int{let values=new map<int,int>();for i:int from 0 until 6{values[i]=i;}values[42]=42;return 42;}}
""",injected);
}
@Test void realSafepointsObserveKeysValuesAssociationsAndSnapshots()throws Exception {
compile("gc","""
declare struct Item(pub value:int);declare struct Garbage();
fn collect(){let marker:int=314159;}
fn makeCursor()->Cursor<keyval<Item,Item>>{
let values=new map<Item,Item>();for i:int from 0 until 1200{let key=new Item(i);let value=new Item(i);values[key]=value;}return values.cursor();
}
fn useCursor(){let cursor=makeCursor();collect();for i:int from 0 until 1199{cursor.next();}collect();for i:int from 0 until 1200{cursor.next();}collect();}
declare service Probe{fn main()->int{useCursor();for i:int from 0 until 1200{let x=new Garbage();}collect();return 42;}}
""");
compile("gc-collection","""
declare struct Item(pub value:int);declare struct Garbage();
fn collect(){let marker:int=314159;}
fn pressure(){for i:int from 0 until 1200{let x=new Garbage();}}
fn create()->map<Item,Item>{let m=new map<Item,Item>();for i:int from 0 until 64{m[new Item(i)]=new Item(i);}return m;}
fn replace(values:map<Item,Item>){let c=values.cursor();for i:int from 0 until 3{if let e=c.current(){values[e.key()]=new Item(42);}c.next();}}
fn discard(values:map<Item,Item>){let c=values.cursor();for i:int from 0 until 3{if let e=c.current(){values.remove(e.key());}c.next();}}
fn use(){let m=create();pressure();collect();replace(m);pressure();collect();discard(m);pressure();collect();m.clear();pressure();collect();}
declare service Probe{fn main()->int{use();pressure();collect();return 42;}}
""");
}
@Test void importsAndGenericReexportsUseRealSdkModules(@TempDir Path root)throws Exception {
Files.createDirectories(root.resolve("src/facade"));
Files.writeString(root.resolve("prometeu.json"),"""
{"name":"app","version":"1.0.0","language":"pbs","stdlib":"1","target":"Game","dependencies":[]}
""");
Files.writeString(root.resolve("src/mod.barrel"),"pub fn frame()->void;");
Files.writeString(root.resolve("src/facade/mod.barrel"),"pub struct Values<K,V>;pub struct Entry<K,V>;pub contract Walk<T>;");
Files.writeString(root.resolve("src/facade/main.pbs"),"import {map as Values,keyval as Entry,Cursor as Walk} from @sdk:collections;");
Files.writeString(root.resolve("src/main.pbs"),"""
import {Values,Entry,Walk} from @app:facade;
[Frame]fn frame()->void{
let values:Values<str,optional int>=new Values();values["left"]=some(20);
let old=values.put(new Entry<str,optional int>("right",some(22)));
if old.hasSome(){let failure=1/0;}
values["empty"]=none;let c:Walk<Entry<str,optional int>>=values.cursor();values.clear();
let sum:int=0;while true{if let e=c.current(){if let v=e.value(){sum=sum+v;}}else{break;}if c.hasNext(){c.next();}else{break;}}
if sum!=42{let failure=1/0;}
}
""");
var compiled=p.studio.compiler.workspaces.BuilderPipelineService.INSTANCE.compile(
p.studio.compiler.models.BuilderPipelineContext.fromConfig(new p.studio.compiler.messages.BuilderPipelineConfig(false,root.toString())),
p.studio.utilities.logs.LogAggregator.stdout());
assertFalse(compiled.diagnostics().stream().anyMatch(d->d.isError()),compiled.diagnostics().toString());
Files.write(Path.of(System.getProperty("pbs.registryConformanceDirectory")).resolve("pbs-map-imports.pbx"),compiled.bytecodeBytes());
}
}
@@ -44,13 +44,13 @@ class PbsSetTest {
""");
probe("arithmetic","""
let maximum:long=4294967295;let sizeMaximum:long=9223372036854775807;
if _setCapacity(0,1)!=(8 as long) or _setCapacity(8,6)!=(8 as long) {return 0;}
if _setCapacity(8,7)!=(16 as long) or _setCapacity(16,13)!=(32 as long) {return 0;}
if _setCapacity(maximum-1,maximum)!=maximum {return 0;}
if _setCapacity(maximum,maximum+1)!=maximum {return 0;}
if _setNextSize(sizeMaximum-1)!=sizeMaximum {return 0;}
if _hashCapacity(0,1)!=(8 as long) or _hashCapacity(8,6)!=(8 as long) {return 0;}
if _hashCapacity(8,7)!=(16 as long) or _hashCapacity(16,13)!=(32 as long) {return 0;}
if _hashCapacity(maximum-1,maximum)!=maximum {return 0;}
if _hashCapacity(maximum,maximum+1)!=maximum {return 0;}
if _hashNextSize(sizeMaximum-1)!=sizeMaximum {return 0;}
let minimum:long=-9223372036854775808;
if _setBucket(minimum,maximum)<(0 as long) or _setBucket(-1,8)!=(7 as long) {return 0;}
if _hashBucket(minimum,maximum)<(0 as long) or _hashBucket(-1,8)!=(7 as long) {return 0;}
return 42;
""");
}
@@ -254,7 +254,7 @@ class PbsSetTest {
}}
""");
for(int mode=1;mode<=5;mode++)compile("fault-callback-"+mode,policy+"declare service Probe {fn main()->int {let policy=new Policy(none,"+mode+",0);let values=new set<int>(policy);let alias=values;policy.target=some(alias);values.add(42);return 0;}}");
probe("fault-overflow","_setNextSize(9223372036854775807);return 0;");
probe("fault-overflow","_hashNextSize(9223372036854775807);return 0;");
}
@Test void arraysFunctionsAndRandomKeepReferenceDefaults()throws Exception {
compile("references","""