From afcf96444366fb4b7c83f938763013cbc360aade Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Fri, 13 Nov 2026 16:17:13 -0800 Subject: Array init syntax New array init syntax; used in a bunch of places. Allows e.g. read-only arrays with not-null entries. Fix bug x86 encoding of mem/cmp/fp compares --- chapter31/docs/examples/Dijkstra.smp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'chapter31/docs/examples/Dijkstra.smp') diff --git a/chapter31/docs/examples/Dijkstra.smp b/chapter31/docs/examples/Dijkstra.smp index 768bdd08..a8fcf3da 100644 --- a/chapter31/docs/examples/Dijkstra.smp +++ b/chapter31/docs/examples/Dijkstra.smp @@ -3,13 +3,10 @@ // https://sampleprograms.io/projects/dijkstra/ val shortestPath = { !sys.aryi64 matrix, int nodes, int src, int dst -> - i64 infinity = (1 << 63)-1; - var dist = new i64[nodes]; + i64 infinity = sys.integer.MAX_I64; var visited = new sys.adt.bitset(); - // All nodes are infinitely far from each other - for( int i=0; i i==src ? 0 : infinity; }; i64 result = -1; int count = 0; -- cgit v1.2.3