joker: update to 0.12.3.

This commit is contained in:
Dominic Monroe 2019-05-05 08:44:06 +01:00 committed by Helmut Pozimski
parent a29749e2b7
commit 1bb4ae5916
2 changed files with 2 additions and 63 deletions

View file

@ -1,61 +0,0 @@
diff --git core/array_map.go core/array_map.go
index 3d9b95d..6e03cfa 100644
--- core/array_map.go
+++ core/array_map.go
@@ -21,7 +21,7 @@ type (
)
var (
- HASHMAP_THRESHOLD int = 16
+ HASHMAP_THRESHOLD int64 = 16
)
func EmptyArrayMap() *ArrayMap {
@@ -169,7 +169,7 @@ func (m *ArrayMap) Assoc(key Object, value Object) Associative {
res.arr[i+1] = value
return res
}
- if len(m.arr) >= HASHMAP_THRESHOLD {
+ if int64(len(m.arr)) >= HASHMAP_THRESHOLD {
return NewHashMap(m.arr...).Assoc(key, value)
}
res := m.Clone()
diff --git core/eval.go core/eval.go
index 42b7ff2..49ade93 100644
--- core/eval.go
+++ core/eval.go
@@ -204,7 +204,7 @@ func (expr *VectorExpr) Eval(env *LocalEnv) Object {
}
func (expr *MapExpr) Eval(env *LocalEnv) Object {
- if len(expr.keys) > HASHMAP_THRESHOLD/2 {
+ if int64(len(expr.keys)) > HASHMAP_THRESHOLD/2 {
res := EmptyHashMap
for i := range expr.keys {
key := Eval(expr.keys[i], env)
diff --git core/read.go core/read.go
index 199fd72..1a03ca8 100644
--- core/read.go
+++ core/read.go
@@ -604,7 +604,7 @@ func readMapWithNamespace(reader *Reader, nsname string) Object {
if len(objs)%2 != 0 {
panic(MakeReadError(reader, "Map literal must contain an even number of forms"))
}
- if len(objs) > HASHMAP_THRESHOLD {
+ if int64(len(objs)) >= HASHMAP_THRESHOLD {
hashMap := NewHashMap()
for i := 0; i < len(objs); i += 2 {
key := resolveKey(objs[i], nsname)
diff --git main.go main.go
index 126f221..bfd1b84 100644
--- main.go
+++ main.go
@@ -437,7 +437,7 @@ func parseArgs(args []string) {
if thresh < 0 {
HASHMAP_THRESHOLD = math.MaxInt64
} else {
- HASHMAP_THRESHOLD = thresh
+ HASHMAP_THRESHOLD = int64(thresh)
}
} else {
missing = true

View file

@ -1,6 +1,6 @@
# Template file for 'joker'
pkgname=joker
version=0.12.2
version=0.12.3
revision=1
build_style=go
go_import_path=github.com/candid82/joker
@ -10,7 +10,7 @@ maintainer="Dominic Monroe <monroef4@googlemail.com>"
license="EPL-1.0"
homepage="https://joker-lang.org/"
distfiles="https://github.com/candid82/joker/archive/v${version}.tar.gz"
checksum=aa50503dfc767a74e6c1b85dd80113561f9459d4ab04dbe785617190bafe3c43
checksum=74c67995be74c13d50b31d790113880d2d7b41d9013dddb68c91b04580b34564
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" joker"