Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c308e2b
bump stanzapm to 0.19.0
jwatson0 Feb 6, 2025
ae78ab0
ci: point to stanzapm pipelines
jwatson0 Feb 6, 2025
7f2a205
ci: point to stanzapm pipelines (2)
jwatson0 Feb 6, 2025
9c1cbe8
ci: point to stanzapm pipelines (3)
jwatson0 Feb 7, 2025
7d20cb4
Merge pull request #1 from JITx-Inc/jw/stanzapm0190
jwatson0 Feb 7, 2025
b17face
ci: build using stanzapm release
jwatson0 Feb 7, 2025
09bbc2a
Bump version to 0.19.1
jwatson0 Feb 7, 2025
b8812b5
optionally set max-heap-size in gigs using STANZA_MAX_HEAP_SIZE env v…
jackbackrack Mar 11, 2025
5301126
Reset version to 0.19.4-rc.0
jwatson0 Mar 11, 2025
90e2ca3
Reset version to 0.19.4-rc.0 (params)
jwatson0 Mar 11, 2025
d675285
Reset version to 0.19.4-rc.0 (again)
jwatson0 Mar 11, 2025
6d36e42
Reset version to 0.19.4-rc.0 (3)
jwatson0 Mar 11, 2025
6358ede
Reset version to 0.19.4-rc.0 (4)
jwatson0 Mar 11, 2025
3e9a114
Reset version to 0.19.4-rc.0 (5)
jwatson0 Mar 11, 2025
5ca58b4
Reset version to 0.19.4-rc.0 (6)
jwatson0 Mar 11, 2025
55e1c91
Merge pull request #5 from JITx-Inc/jb/set-max-heap-size-env-var
jwatson0 Mar 11, 2025
ff679f0
Bump version to 0.19.4
jwatson0 Mar 11, 2025
1f115e1
use raw array as array to make it concrete and rename array to arrayable
jackbackrack Mar 12, 2025
213c2e1
convert vector to defstruct with lostanza deftype and use intarray wh…
jackbackrack Mar 12, 2025
2558a37
define Vector and Queue using defstruct
jackbackrack Mar 13, 2025
1fa416f
converted all tables and sets to use defstruct
jackbackrack Mar 13, 2025
aa26038
speed up conversion to tuples and arrays
jackbackrack Mar 14, 2025
d2eb95c
use IntTable where you can and switch to Arrayable for abstract array
jackbackrack Mar 17, 2025
2025412
fix tiny buglets in tables/sets
jackbackrack Mar 19, 2025
ced5704
initialize to false before to-seq'ing for to-tuple and to-array and a…
jackbackrack Mar 19, 2025
2172b86
revert to-tuple and to-array because doesn't save that much and becom…
jackbackrack Mar 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/concourse-notify-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on: [ pull_request, workflow_dispatch ]
env:
HOST: https://ci.jitx.com
TEAM: main
PIPELINE: lbstanza
PIPELINE: stanzapm
INSTVARS: vars.branch="${{ github.base_ref }}"
TOKEN: ${{ secrets.CONCOURSE_WEBHOOK_TOKEN }}
jobs:
trigger-pr:
runs-on: ubuntu-latest
env:
RESOURCE: github--lbstanza--pr
RESOURCE: github--stanzapm--pr
steps:
- name: Trigger Concourse Pull Request
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/concourse-notify-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on: [ push, workflow_dispatch ]
env:
HOST: https://ci.jitx.com
TEAM: main
PIPELINE: lbstanza
PIPELINE: stanzapm
INSTVARS: vars.branch="${{ github.ref_name }}"
TOKEN: ${{ secrets.CONCOURSE_WEBHOOK_TOKEN }}
jobs:
trigger-push:
runs-on: ubuntu-latest
env:
RESOURCE: git--lbstanza
RESOURCE: git--stanzapm
steps:
- name: Trigger Concourse resource check
run: |
Expand Down
2 changes: 1 addition & 1 deletion ci/build-stanza-version.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
# like 1.23.45
#
# Use version 0.17.56 to compile 0.18.0
0.18.96
0.19.0
4 changes: 2 additions & 2 deletions ci/build-stanza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ USAGE="STANZA_CONFIG=/path $0"
echo " STANZA_CONFIG:" "${STANZA_CONFIG:?Usage: ${USAGE}}" # directory where .stanza config file will be stored, as in normal stanza behavior

# Defaulted env var inputs - can override if necessary
echo " REPODIR:" "${REPODIR:=lbstanza}"
echo " REPODIR:" "${REPODIR:=stanzapm}"
echo " CONAN_USER_HOME:" "${CONAN_USER_HOME:=${REPODIR}}"
echo " CREATE_ARCHIVE:" "${CREATE_ARCHIVE:=false}"
echo " CREATE_PACKAGE:" "${CREATE_PACKAGE:=false}"
Expand Down Expand Up @@ -79,7 +79,7 @@ esac


cd "${REPODIR}"
echo "Building lbstanza version ${VER} in ${PWD}"
echo "Building stanzapm version ${VER} in ${PWD}"

mkdir -p build
mkdir -p bin
Expand Down
2 changes: 1 addition & 1 deletion ci/calc-stanza-version-bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TOP="${PWD}"
>&2 echo " BRANCH:" "${BRANCH:?Usage: BRANCH=foo $0}"

# Defaulted env var inputs - can override if necessary
>&2 echo " REPODIR:" "${REPODIR:=lbstanza}"
>&2 echo " REPODIR:" "${REPODIR:=stanzapm}"
## By default, get the most recent previous tag on this branch from git
### note: if multiple tags exist on one commit, git doesn't always desecribe the most recent one
### ### maybe use: git tag --sort=committerdate --contains HEAD~ | tail -1
Expand Down
6 changes: 3 additions & 3 deletions ci/install-stanza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ TOP="${PWD}"
# the machine that you are building for (host)
# and the machine that GCC will produce code for (target).

USAGE="STANZA_BUILD_PLATFORM={linux|macos|windows} STANZA_BUILD_VER=0.17.56 STANZA_CONFIG=/path STANZA_INSTALL_DIR=/path $0"
STANZA_DOWNLOAD_BASEURL="https://github.com/StanzaOrg/lbstanza/releases/download"
USAGE="STANZA_BUILD_PLATFORM={linux|macos|windows} STANZA_BUILD_VER=0.19.0 STANZA_CONFIG=/path STANZA_INSTALL_DIR=/path $0"
STANZA_DOWNLOAD_BASEURL="https://github.com/jitx-inc/stanzapm/releases/download"


# Required env var inputs
Expand All @@ -27,7 +27,7 @@ BSVTXT="${THISDIR}/build-stanza-version.txt"
# extract the version from first non-comment line of the file
BSTZVER=$(grep -v ^\# "${BSVTXT}" | head -1 | awk '{ print $1}')
echo "Using existing stanza version $BSTZVER"
echo " STANZA_BUILD_VER:" "${STANZA_BUILD_VER:=${BSTZVER}}" # 0.17.56
echo " STANZA_BUILD_VER:" "${STANZA_BUILD_VER:=${BSTZVER}}" # 0.19.0
echo "STANZA_BUILD_PLATFORM:" "${STANZA_BUILD_PLATFORM:=$(uname -s)}" # linux|macos|Darwin|windows|MINGW64

# var input validation
Expand Down
2 changes: 1 addition & 1 deletion compiler/algorithms.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public defn strong-components<?T> (graph: Seqable<KeyValue<?T&Hashable&Equalable
;==================== BitArrays =============================
;============================================================

public lostanza deftype BitArray <: Array<True|False> :
public lostanza deftype BitArray <: Arrayable<True|False> :
words: long
length: long
var bits: long ...
Expand Down
8 changes: 4 additions & 4 deletions compiler/hash.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,16 @@ public defn PerfectHashTable<?T> (entries0:Collection<KeyValue<Int,?T>> & Length

;Hold buckets and sorted bucket indices
var buckets:Array<List<KeyValue<Int,T>>>
var bucket-indices:Array<Int>
var dtable:Array<Int>
var bucket-indices:IntArray
var dtable:IntArray
var etable:Array<KeyValue<Int,T>|False>

;Put all entries in buckets
defn put-in-buckets (d0:Int) :
;Initialize all tables
buckets = Array<List<KeyValue<Int,T>>>(n, List())
bucket-indices = to-array<Int>(0 to n)
dtable = Array<Int>(n, 0)
bucket-indices = to-intarray(0 to n)
dtable = IntArray(n, 0)
etable = Array<KeyValue<Int,T>|False>(n, false)

;Put in buckets
Expand Down
2 changes: 1 addition & 1 deletion compiler/params.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public defn compiler-flags () :
to-tuple(COMPILE-FLAGS)

;========= Stanza Configuration ========
public val STANZA-VERSION = [0 18 97]
public val STANZA-VERSION = [0 19 4]
public var STANZA-INSTALL-DIR:String = ""
public var OUTPUT-PLATFORM:Symbol = `platform
public var STANZA-PKG-DIRS:List<String> = List()
Expand Down
24 changes: 12 additions & 12 deletions compiler/reg-alloc.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ defn unused-regs (used:Seqable<Loc>, num:Int, backend:Backend) -> Vector<Reg> :

defn remove-critical-edges () :
;Count predecessors
val num-preds-table = Array<Int>(nblocks(),0)
val num-preds-table = IntArray(nblocks(),0)
for (b in BLOCKS, i in 0 to false) do :
for n in next(b) do :
num-preds-table[n] = 1 + num-preds-table[n]
Expand Down Expand Up @@ -1171,8 +1171,8 @@ defn liveness-analysis () :
;Propagate liveness
clear(IN-PORTS, nblocks(), List())
clear(OUT-PORTS, nblocks(), List())
val in-dists = Array<Int>(nblocks(), INT-MAX)
val out-dists = Array<Int>(nblocks(), INT-MAX)
val in-dists = IntArray(nblocks(), INT-MAX)
val out-dists = IntArray(nblocks(), INT-MAX)
val in-dirty = Vector<Int>()
val out-dirty = Vector<Int>()

Expand All @@ -1198,8 +1198,8 @@ defn liveness-analysis () :

;Mark that variable v is live-in to block b with distance d
lostanza defn mark-live-in (defs:ref<BitMatrix>,
in-dists:ref<Array<Int>>,
out-dists:ref<Array<Int>>,
in-dists:ref<IntArray>,
out-dists:ref<IntArray>,
in-dirty:ref<Vector<Int>>,
out-dirty:ref<Vector<Int>>,
b:ref<Int>,
Expand Down Expand Up @@ -1230,8 +1230,8 @@ lostanza defn mark-live-in (defs:ref<BitMatrix>,

;Mark that variable v is live-out from block b with distance d
lostanza defn mark-live-out (defs:ref<BitMatrix>,
in-dists:ref<Array<Int>>,
out-dists:ref<Array<Int>>,
in-dists:ref<IntArray>,
out-dists:ref<IntArray>,
in-dirty:ref<Vector<Int>>,
out-dirty:ref<Vector<Int>>,
b:ref<Int>,
Expand Down Expand Up @@ -2011,8 +2011,8 @@ defn stack-intervals () -> Seq<Interval> :
;========================
;==== Port Positions ====
;========================
val in-port-pos = Array<Int>(nblocks())
val out-port-pos = Array<Int>(nblocks())
val in-port-pos = IntArray(nblocks())
val out-port-pos = IntArray(nblocks())
val num-pos = let :
val pos-counter = Counter(0)
for (blk in BLOCKS, b in 0 to false) do :
Expand All @@ -2023,8 +2023,8 @@ defn stack-intervals () -> Seq<Interval> :
;===========================
;==== Interval Tracking ====
;===========================
val var-start = Array<Int>(nvars(), INT-MAX)
val var-end = Array<Int>(nvars(), INT-MIN)
val var-start = IntArray(nvars(), INT-MAX)
val var-end = IntArray(nvars(), INT-MIN)

defn note-usage (v:Int, i:Int) :
var-start[v] = min(i, var-start[v])
Expand Down Expand Up @@ -2414,7 +2414,7 @@ defn collapse-blocks () :
;======================
;==== Block Labels ====
;======================
val lbls = Array<Int>(nblocks())
val lbls = IntArray(nblocks())
lbls[0 to false] = repeatedly(unique-id{})

;===================
Expand Down
6 changes: 3 additions & 3 deletions compiler/set-simplifier.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,9 @@ defn dnf-form (term:Term) -> Term :
(t) : [t]

;Permutations
defn permutations (return:Array<Int> -> ?, lengths:Tuple<Int>) :
defn permutations (return:IntArray -> ?, lengths:Tuple<Int>) :
val dims = length(lengths)
val indices = Array<Int>(dims, 0)
val indices = IntArray(dims, 0)
let loop (d:Int = 0) :
if d < dims :
for i in 0 to lengths[d] do :
Expand All @@ -203,7 +203,7 @@ defn dnf-form (term:Term) -> Term :
return(indices)

;Retrieve the given indices in the given term tuple.
defn gather-intersection-vars (termss:Tuple<Tuple<Term>>, indices:Array<Int>) -> Seq<Term> :
defn gather-intersection-vars (termss:Tuple<Tuple<Term>>, indices:IntArray) -> Seq<Term> :
for (i in indices, terms in termss) seq-cat :
match(terms[i]) :
(t:Intersection) : /terms(t)
Expand Down
2 changes: 1 addition & 1 deletion compiler/stable-arrays.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ lostanza defmethod run (a:ref<Autofree>) -> ref<False> :
StablePrimArray in [StableByteArray StableIntArray StableLongArray StableFloatArray StableDoubleArray]
x0 in [0Y 0 0L 0.0f 0.0]) :

public lostanza deftype StablePrimArray <: Array<Prim> & Unique :
public lostanza deftype StablePrimArray <: Arrayable<Prim> & Unique :
length: long
data: ptr<prim>

Expand Down
2 changes: 1 addition & 1 deletion compiler/vm-table.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public lostanza defn load-data (vmt:ref<VMTable>, d:ref<VMData>) -> ref<False> :
public defn load-datas (vmt:VMTable, ds:Tuple<VMData>) :
do(load-data{vmt, _}, ds)

lostanza defn non-negative? (xs:ref<Array<Int>>, i:ref<Int>) -> long :
lostanza defn non-negative? (xs:ref<StableIntArray>, i:ref<Int>) -> long :
val l = length(xs).value
if i.value < l :
if get(xs,i).value >= 0 : return 1L
Expand Down
Loading
Loading