Compare commits

...
31 changed files with 4341 additions and 805 deletions

No files matched your search

+5
View File
@@ -1,5 +1,10 @@
# Lyng: ideal scripting for kotlin multiplatform # Lyng: ideal scripting for kotlin multiplatform
## Important: this is an obsolete, no-JIT version for security patches, etc. The mainline is in master branch.
-------------
__Please visit the project homepage: [https://lynglang.com](https://lynglang.com) and a [telegram channel](https://t.me/lynglang).__ __Please visit the project homepage: [https://lynglang.com](https://lynglang.com) and a [telegram channel](https://t.me/lynglang).__
__Main development site:__ [https://gitea.sergeych.net/SergeychWorks/lyng](https://gitea.sergeych.net/SergeychWorks/lyng) __Main development site:__ [https://gitea.sergeych.net/SergeychWorks/lyng](https://gitea.sergeych.net/SergeychWorks/lyng)
@@ -0,0 +1,28 @@
/*
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package net.sergeych.lyng
actual object Benchmarks {
actual val enabled: Boolean = run {
val p = System.getProperty("LYNG_BENCHMARKS")?.lowercase()
val e = System.getenv("BENCHMARKS")?.lowercase()
fun parse(v: String?): Boolean =
v == "true" || v == "1" || v == "yes"
parse(p) || parse(e)
}
}
@@ -37,7 +37,7 @@ data class ParsedArgument(
count++ count++
if (count > limit) break if (count > limit) break
} }
if (!hasSplatOrNamed && count == this.size) { if (!hasSplatOrNamed && count == this.size) {
val quick = when (count) { val quick = when (count) {
0 -> Arguments.EMPTY 0 -> Arguments.EMPTY
1 -> Arguments(listOf(this.elementAt(0).value.execute(scope)), tailBlockMode) 1 -> Arguments(listOf(this.elementAt(0).value.execute(scope)), tailBlockMode)
@@ -154,11 +154,11 @@ data class ParsedArgument(
else -> null else -> null
} }
if (quick != null) return quick if (quick != null) return quick
} }
} }
// General path: build positional list and named map, enforcing ordering rules // General path: build positional list and named map, enforcing ordering rules
val positional: MutableList<Obj> = mutableListOf() val positional: MutableList<Obj> = mutableListOf()
var named: MutableMap<String, Obj>? = null var named: MutableMap<String, Obj>? = null
var namedSeen = false var namedSeen = false
for ((idx, x) in this.withIndex()) { for ((idx, x) in this.withIndex()) {
@@ -254,4 +254,3 @@ data class ParsedArgument(
fun from(values: Collection<Obj>) = Arguments(values.toList()) fun from(values: Collection<Obj>) = Arguments(values.toList())
} }
} }
@@ -0,0 +1,22 @@
/*
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package net.sergeych.lyng
expect object Benchmarks {
val enabled: Boolean
}
File diff suppressed because it is too large. Load diff
@@ -392,6 +392,24 @@ open class Scope(
nameToSlot[name]?.let { slots[it] = record } nameToSlot[name]?.let { slots[it] = record }
} }
/**
* Apply a precomputed slot plan (name -> slot index) for this scope.
* This enables direct slot references to bypass name-based lookup.
*/
fun applySlotPlan(plan: Map<String, Int>) {
if (plan.isEmpty()) return
val maxIndex = plan.values.maxOrNull() ?: return
if (slots.size <= maxIndex) {
val targetSize = maxIndex + 1
while (slots.size < targetSize) {
slots.add(ObjRecord(ObjUnset, isMutable = true))
}
}
for ((name, idx) in plan) {
nameToSlot[name] = idx
}
}
/** /**
* Clear all references and maps to prevent memory leaks when pooled. * Clear all references and maps to prevent memory leaks when pooled.
*/ */
@@ -503,6 +521,7 @@ open class Scope(
if (this is ClosureScope) { if (this is ClosureScope) {
callScope.localBindings[name] = it callScope.localBindings[name] = it
} }
bumpClassLayoutIfNeeded(name, value, recordType)
it it
} ?: addItem(name, true, value, visibility, writeVisibility, recordType, isAbstract = isAbstract, isClosed = isClosed, isOverride = isOverride) } ?: addItem(name, true, value, visibility, writeVisibility, recordType, isAbstract = isAbstract, isClosed = isClosed, isOverride = isOverride)
@@ -529,6 +548,24 @@ open class Scope(
isTransient = isTransient isTransient = isTransient
) )
objects[name] = rec objects[name] = rec
bumpClassLayoutIfNeeded(name, value, recordType)
if (recordType == ObjRecord.Type.Field || recordType == ObjRecord.Type.ConstructorField) {
val inst = thisObj as? net.sergeych.lyng.obj.ObjInstance
if (inst != null) {
val slot = inst.objClass.fieldSlotForKey(name)
if (slot != null) inst.setFieldSlotRecord(slot.slot, rec)
}
}
if (value is Statement ||
recordType == ObjRecord.Type.Fun ||
recordType == ObjRecord.Type.Delegated ||
recordType == ObjRecord.Type.Property) {
val inst = thisObj as? net.sergeych.lyng.obj.ObjInstance
if (inst != null) {
val slot = inst.objClass.methodSlotForKey(name)
if (slot != null) inst.setMethodSlotRecord(slot.slot, rec)
}
}
// Index this binding within the current frame to help resolve locals across suspension // Index this binding within the current frame to help resolve locals across suspension
localBindings[name] = rec localBindings[name] = rec
// If we are a ClosureScope, mirror binding into the caller frame to keep it discoverable // If we are a ClosureScope, mirror binding into the caller frame to keep it discoverable
@@ -558,6 +595,14 @@ open class Scope(
return rec return rec
} }
private fun bumpClassLayoutIfNeeded(name: String, value: Obj, recordType: ObjRecord.Type) {
val cls = thisObj as? net.sergeych.lyng.obj.ObjClass ?: return
if (cls.classScope !== this) return
if (!(value is Statement || recordType == ObjRecord.Type.Fun || recordType == ObjRecord.Type.Delegated)) return
if (cls.members.containsKey(name)) return
cls.layoutVersion += 1
}
fun getOrCreateNamespace(name: String): ObjClass { fun getOrCreateNamespace(name: String): ObjClass {
val ns = objects.getOrPut(name) { ObjRecord(ObjNamespace(name), isMutable = false) }.value val ns = objects.getOrPut(name) { ObjRecord(ObjNamespace(name), isMutable = false) }.value
return ns.objClass return ns.objClass
@@ -114,8 +114,7 @@ open class ObjClass(
val classId: Long = ClassIdGen.nextId() val classId: Long = ClassIdGen.nextId()
var layoutVersion: Int = 0 var layoutVersion: Int = 0
private val mangledNameCache = mutableMapOf<String, String>() fun mangledName(name: String): String = "$className::$name"
fun mangledName(name: String): String = mangledNameCache.getOrPut(name) { "$className::$name" }
/** /**
* Map of public member names to their effective storage keys in instanceScope.objects. * Map of public member names to their effective storage keys in instanceScope.objects.
@@ -128,7 +127,7 @@ open class ObjClass(
if (cls.className == "Obj") continue if (cls.className == "Obj") continue
for ((name, rec) in cls.members) { for ((name, rec) in cls.members) {
if (rec.visibility == Visibility.Public) { if (rec.visibility == Visibility.Public) {
val key = if (rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.Delegated) cls.mangledName(name) else name val key = if (rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField || rec.type == ObjRecord.Type.Delegated) cls.mangledName(name) else name
res[name] = key res[name] = key
} }
} }
@@ -267,6 +266,119 @@ open class ObjClass(
*/ */
internal val members = mutableMapOf<String, ObjRecord>() internal val members = mutableMapOf<String, ObjRecord>()
internal data class FieldSlot(val slot: Int, val record: ObjRecord)
internal data class ResolvedMember(val record: ObjRecord, val declaringClass: ObjClass)
internal data class MethodSlot(val slot: Int, val record: ObjRecord)
private var fieldSlotLayoutVersion: Int = -1
private var fieldSlotMap: Map<String, FieldSlot> = emptyMap()
private var fieldSlotCount: Int = 0
private var instanceMemberLayoutVersion: Int = -1
private var instanceMemberCache: Map<String, ResolvedMember> = emptyMap()
private var methodSlotLayoutVersion: Int = -1
private var methodSlotMap: Map<String, MethodSlot> = emptyMap()
private var methodSlotCount: Int = 0
private fun ensureFieldSlots(): Map<String, FieldSlot> {
if (fieldSlotLayoutVersion == layoutVersion) return fieldSlotMap
val res = mutableMapOf<String, FieldSlot>()
var idx = 0
for (cls in mro) {
for ((name, rec) in cls.members) {
if (rec.isAbstract) continue
if (rec.type != ObjRecord.Type.Field && rec.type != ObjRecord.Type.ConstructorField) continue
val key = cls.mangledName(name)
if (res.containsKey(key)) continue
res[key] = FieldSlot(idx, rec)
idx += 1
}
}
fieldSlotMap = res
fieldSlotCount = idx
fieldSlotLayoutVersion = layoutVersion
return fieldSlotMap
}
private fun ensureInstanceMemberCache(): Map<String, ResolvedMember> {
if (instanceMemberLayoutVersion == layoutVersion) return instanceMemberCache
val res = mutableMapOf<String, ResolvedMember>()
for (cls in mro) {
if (cls.className == "Obj") break
for ((name, rec) in cls.members) {
if (rec.isAbstract) continue
if (res.containsKey(name)) continue
val decl = rec.declaringClass ?: cls
res[name] = ResolvedMember(rec, decl)
}
cls.classScope?.objects?.forEach { (name, rec) ->
if (rec.isAbstract) return@forEach
if (res.containsKey(name)) return@forEach
val decl = rec.declaringClass ?: cls
res[name] = ResolvedMember(rec, decl)
}
}
instanceMemberCache = res
instanceMemberLayoutVersion = layoutVersion
return instanceMemberCache
}
private fun ensureMethodSlots(): Map<String, MethodSlot> {
if (methodSlotLayoutVersion == layoutVersion) return methodSlotMap
val res = mutableMapOf<String, MethodSlot>()
var idx = 0
for (cls in mro) {
if (cls.className == "Obj") break
for ((name, rec) in cls.members) {
if (rec.isAbstract) continue
if (rec.value !is Statement &&
rec.type != ObjRecord.Type.Delegated &&
rec.type != ObjRecord.Type.Fun &&
rec.type != ObjRecord.Type.Property) {
continue
}
val key = if (rec.visibility == Visibility.Private || rec.type == ObjRecord.Type.Delegated) cls.mangledName(name) else name
if (res.containsKey(key)) continue
res[key] = MethodSlot(idx, rec)
idx += 1
}
cls.classScope?.objects?.forEach { (name, rec) ->
if (rec.isAbstract) return@forEach
if (rec.value !is Statement &&
rec.type != ObjRecord.Type.Delegated &&
rec.type != ObjRecord.Type.Property) return@forEach
val key = if (rec.visibility == Visibility.Private || rec.type == ObjRecord.Type.Delegated) cls.mangledName(name) else name
if (res.containsKey(key)) return@forEach
res[key] = MethodSlot(idx, rec)
idx += 1
}
}
methodSlotMap = res
methodSlotCount = idx
methodSlotLayoutVersion = layoutVersion
return methodSlotMap
}
internal fun fieldSlotCount(): Int {
ensureFieldSlots()
return fieldSlotCount
}
internal fun fieldSlotForKey(key: String): FieldSlot? {
ensureFieldSlots()
return fieldSlotMap[key]
}
internal fun fieldSlotMap(): Map<String, FieldSlot> = ensureFieldSlots()
internal fun resolveInstanceMember(name: String): ResolvedMember? = ensureInstanceMemberCache()[name]
internal fun methodSlotCount(): Int {
ensureMethodSlots()
return methodSlotCount
}
internal fun methodSlotForKey(key: String): MethodSlot? {
ensureMethodSlots()
return methodSlotMap[key]
}
internal fun methodSlotMap(): Map<String, MethodSlot> = ensureMethodSlots()
override fun toString(): String = className override fun toString(): String = className
override suspend fun compareTo(scope: Scope, other: Obj): Int = if (other === this) 0 else -1 override suspend fun compareTo(scope: Scope, other: Obj): Int = if (other === this) 0 else -1
@@ -284,8 +396,8 @@ open class ObjClass(
for (cls in mro) { for (cls in mro) {
// 1) members-defined methods and fields // 1) members-defined methods and fields
for ((k, v) in cls.members) { for ((k, v) in cls.members) {
if (!v.isAbstract && (v.value is Statement || v.type == ObjRecord.Type.Delegated || v.type == ObjRecord.Type.Field)) { if (!v.isAbstract && (v.value is Statement || v.type == ObjRecord.Type.Delegated || v.type == ObjRecord.Type.Field || v.type == ObjRecord.Type.ConstructorField)) {
val key = if (v.visibility == Visibility.Private || v.type == ObjRecord.Type.Field || v.type == ObjRecord.Type.Delegated) cls.mangledName(k) else k val key = if (v.visibility == Visibility.Private || v.type == ObjRecord.Type.Field || v.type == ObjRecord.Type.ConstructorField || v.type == ObjRecord.Type.Delegated) cls.mangledName(k) else k
if (!res.containsKey(key)) { if (!res.containsKey(key)) {
res[key] = v res[key] = v
} }
@@ -327,12 +439,47 @@ open class ObjClass(
val stableParent = classScope ?: scope.parent val stableParent = classScope ?: scope.parent
instance.instanceScope = Scope(stableParent, scope.args, scope.pos, instance) instance.instanceScope = Scope(stableParent, scope.args, scope.pos, instance)
instance.instanceScope.currentClassCtx = null instance.instanceScope.currentClassCtx = null
val fieldSlots = fieldSlotMap()
if (fieldSlots.isNotEmpty()) {
instance.initFieldSlots(fieldSlotCount())
}
val methodSlots = methodSlotMap()
if (methodSlots.isNotEmpty()) {
instance.initMethodSlots(methodSlotCount())
}
// Expose instance methods (and other callable members) directly in the instance scope for fast lookup // Expose instance methods (and other callable members) directly in the instance scope for fast lookup
// This mirrors Obj.autoInstanceScope behavior for ad-hoc scopes and makes fb.method() resolution robust // This mirrors Obj.autoInstanceScope behavior for ad-hoc scopes and makes fb.method() resolution robust
instance.instanceScope.objects.putAll(templateMethods) instance.instanceScope.objects.putAll(templateMethods)
if (methodSlots.isNotEmpty()) {
for ((key, rec) in templateMethods) {
val slot = methodSlots[key]
if (slot != null) {
instance.setMethodSlotRecord(slot.slot, rec)
}
}
}
for (p in templateOthers) { for (p in templateOthers) {
instance.instanceScope.objects[p.first] = p.second.copy() val rec = p.second.copy()
instance.instanceScope.objects[p.first] = rec
val slot = fieldSlots[p.first]
if (slot != null) {
instance.setFieldSlotRecord(slot.slot, rec)
}
if (methodSlots.isNotEmpty()) {
val mSlot = methodSlots[p.first]
if (mSlot != null) {
instance.setMethodSlotRecord(mSlot.slot, rec)
}
}
}
if (methodSlots.isNotEmpty()) {
for ((_, mSlot) in methodSlots) {
val idx = mSlot.slot
if (idx >= 0 && idx < instance.methodSlots.size && instance.methodSlots[idx] == null) {
instance.setMethodSlotRecord(idx, mSlot.record)
}
}
} }
return instance return instance
} }
@@ -417,6 +564,10 @@ open class ObjClass(
if (rec != null) { if (rec != null) {
val mangled = c.mangledName(p.name) val mangled = c.mangledName(p.name)
instance.instanceScope.objects[mangled] = rec instance.instanceScope.objects[mangled] = rec
val slot = instance.objClass.fieldSlotForKey(mangled)
if (slot != null) {
instance.setFieldSlotRecord(slot.slot, rec)
}
} }
} }
} }
@@ -738,5 +889,3 @@ open class ObjClass(
scope.raiseNotImplemented() scope.raiseNotImplemented()
} }
@@ -30,6 +30,36 @@ import net.sergeych.lynon.LynonType
class ObjInstance(override val objClass: ObjClass) : Obj() { class ObjInstance(override val objClass: ObjClass) : Obj() {
internal lateinit var instanceScope: Scope internal lateinit var instanceScope: Scope
internal var fieldSlots: Array<ObjRecord?> = emptyArray()
internal var methodSlots: Array<ObjRecord?> = emptyArray()
internal fun initFieldSlots(size: Int) {
fieldSlots = arrayOfNulls(size)
}
internal fun setFieldSlotRecord(slot: Int, rec: ObjRecord) {
if (slot >= 0 && slot < fieldSlots.size) fieldSlots[slot] = rec
}
internal fun initMethodSlots(size: Int) {
methodSlots = arrayOfNulls(size)
}
internal fun setMethodSlotRecord(slot: Int, rec: ObjRecord) {
if (slot >= 0 && slot < methodSlots.size) methodSlots[slot] = rec
}
internal fun fieldRecordForKey(key: String): ObjRecord? {
val slot = objClass.fieldSlotForKey(key) ?: return null
val idx = slot.slot
return if (idx >= 0 && idx < fieldSlots.size) fieldSlots[idx] else null
}
internal fun methodRecordForKey(key: String): ObjRecord? {
val slot = objClass.methodSlotForKey(key) ?: return null
val idx = slot.slot
return if (idx >= 0 && idx < methodSlots.size) methodSlots[idx] else null
}
override suspend fun readField(scope: Scope, name: String): ObjRecord { override suspend fun readField(scope: Scope, name: String): ObjRecord {
val caller = scope.currentClassCtx val caller = scope.currentClassCtx
@@ -37,6 +67,16 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
// Fast path for public members when outside any class context // Fast path for public members when outside any class context
if (caller == null) { if (caller == null) {
objClass.publicMemberResolution[name]?.let { key -> objClass.publicMemberResolution[name]?.let { key ->
fieldRecordForKey(key)?.let { rec ->
if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && !rec.isAbstract)
return rec
}
methodRecordForKey(key)?.let { rec ->
if (!rec.isAbstract) {
val decl = rec.declaringClass ?: objClass.findDeclaringClassOf(name) ?: objClass
return resolveRecord(scope, rec, name, decl)
}
}
instanceScope.objects[key]?.let { rec -> instanceScope.objects[key]?.let { rec ->
// Directly return fields to bypass resolveRecord overhead // Directly return fields to bypass resolveRecord overhead
if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && !rec.isAbstract) if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && !rec.isAbstract)
@@ -56,6 +96,16 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
} }
// Check for private fields (stored in instanceScope) // Check for private fields (stored in instanceScope)
val mangled = c.mangledName(name) val mangled = c.mangledName(name)
fieldRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
return resolveRecord(scope, rec, name, c)
}
}
methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
return resolveRecord(scope, rec, name, c)
}
}
instanceScope.objects[mangled]?.let { rec -> instanceScope.objects[mangled]?.let { rec ->
if (rec.visibility == Visibility.Private) { if (rec.visibility == Visibility.Private) {
return resolveRecord(scope, rec, name, c) return resolveRecord(scope, rec, name, c)
@@ -67,6 +117,16 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
for (cls in objClass.mro) { for (cls in objClass.mro) {
if (cls.className == "Obj") break if (cls.className == "Obj") break
val mangled = cls.mangledName(name) val mangled = cls.mangledName(name)
fieldRecordForKey(mangled)?.let { rec ->
if (canAccessMember(rec.visibility, cls, caller, name)) {
return resolveRecord(scope, rec, name, cls)
}
}
methodRecordForKey(mangled)?.let { rec ->
if (canAccessMember(rec.visibility, cls, caller, name)) {
return resolveRecord(scope, rec, name, cls)
}
}
instanceScope.objects[mangled]?.let { rec -> instanceScope.objects[mangled]?.let { rec ->
if (canAccessMember(rec.visibility, cls, caller, name)) { if (canAccessMember(rec.visibility, cls, caller, name)) {
return resolveRecord(scope, rec, name, cls) return resolveRecord(scope, rec, name, cls)
@@ -81,6 +141,12 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
return resolveRecord(scope, rec, name, decl) return resolveRecord(scope, rec, name, decl)
} }
} }
methodRecordForKey(name)?.let { rec ->
val decl = rec.declaringClass ?: objClass.findDeclaringClassOf(name)
if (canAccessMember(rec.visibility, decl, caller, name)) {
return resolveRecord(scope, rec, name, decl)
}
}
// 3. Fall back to super (handles class members and extensions) // 3. Fall back to super (handles class members and extensions)
return super.readField(scope, name) return super.readField(scope, name)
@@ -109,8 +175,13 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
val d = decl ?: obj.declaringClass val d = decl ?: obj.declaringClass
if (d != null) { if (d != null) {
val mangled = d.mangledName(name) val mangled = d.mangledName(name)
instanceScope.objects[mangled]?.let { fieldRecordForKey(mangled)?.let {
targetRec = it targetRec = it
}
if (targetRec === obj) {
instanceScope.objects[mangled]?.let {
targetRec = it
}
} }
} }
if (targetRec === obj) { if (targetRec === obj) {
@@ -134,10 +205,29 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
// Fast path for public members when outside any class context // Fast path for public members when outside any class context
if (caller == null) { if (caller == null) {
objClass.publicMemberResolution[name]?.let { key -> objClass.publicMemberResolution[name]?.let { key ->
fieldRecordForKey(key)?.let { rec ->
if (rec.effectiveWriteVisibility == Visibility.Public) {
// Skip property/delegated overhead if it's a plain mutable field
if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && rec.isMutable && !rec.isAbstract) {
if (rec.value.assign(scope, newValue) == null)
rec.value = newValue
return
}
updateRecord(scope, rec, name, newValue, rec.declaringClass)
return
}
}
methodRecordForKey(key)?.let { rec ->
if (rec.effectiveWriteVisibility == Visibility.Public &&
(rec.type == ObjRecord.Type.Property || rec.type == ObjRecord.Type.Delegated)) {
updateRecord(scope, rec, name, newValue, rec.declaringClass)
return
}
}
instanceScope.objects[key]?.let { rec -> instanceScope.objects[key]?.let { rec ->
if (rec.effectiveWriteVisibility == Visibility.Public) { if (rec.effectiveWriteVisibility == Visibility.Public) {
// Skip property/delegated overhead if it's a plain mutable field // Skip property/delegated overhead if it's a plain mutable field
if (rec.type == ObjRecord.Type.Field && rec.isMutable && !rec.isAbstract) { if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && rec.isMutable && !rec.isAbstract) {
if (rec.value.assign(scope, newValue) == null) if (rec.value.assign(scope, newValue) == null)
rec.value = newValue rec.value = newValue
return return
@@ -160,6 +250,19 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
} }
// Check for private fields (stored in instanceScope) // Check for private fields (stored in instanceScope)
val mangled = c.mangledName(name) val mangled = c.mangledName(name)
fieldRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
updateRecord(scope, rec, name, newValue, c)
return
}
}
methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private &&
(rec.type == ObjRecord.Type.Property || rec.type == ObjRecord.Type.Delegated)) {
updateRecord(scope, rec, name, newValue, c)
return
}
}
instanceScope.objects[mangled]?.let { rec -> instanceScope.objects[mangled]?.let { rec ->
if (rec.visibility == Visibility.Private) { if (rec.visibility == Visibility.Private) {
updateRecord(scope, rec, name, newValue, c) updateRecord(scope, rec, name, newValue, c)
@@ -172,6 +275,19 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
for (cls in objClass.mro) { for (cls in objClass.mro) {
if (cls.className == "Obj") break if (cls.className == "Obj") break
val mangled = cls.mangledName(name) val mangled = cls.mangledName(name)
fieldRecordForKey(mangled)?.let { rec ->
if (canAccessMember(rec.effectiveWriteVisibility, cls, caller, name)) {
updateRecord(scope, rec, name, newValue, cls)
return
}
}
methodRecordForKey(mangled)?.let { rec ->
if (canAccessMember(rec.effectiveWriteVisibility, cls, caller, name) &&
(rec.type == ObjRecord.Type.Property || rec.type == ObjRecord.Type.Delegated)) {
updateRecord(scope, rec, name, newValue, cls)
return
}
}
instanceScope.objects[mangled]?.let { rec -> instanceScope.objects[mangled]?.let { rec ->
if (canAccessMember(rec.effectiveWriteVisibility, cls, caller, name)) { if (canAccessMember(rec.effectiveWriteVisibility, cls, caller, name)) {
updateRecord(scope, rec, name, newValue, cls) updateRecord(scope, rec, name, newValue, cls)
@@ -188,6 +304,14 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
return return
} }
} }
methodRecordForKey(name)?.let { rec ->
val decl = rec.declaringClass ?: objClass.findDeclaringClassOf(name)
if (canAccessMember(rec.effectiveWriteVisibility, decl, caller, name) &&
(rec.type == ObjRecord.Type.Property || rec.type == ObjRecord.Type.Delegated)) {
updateRecord(scope, rec, name, newValue, decl)
return
}
}
super.writeField(scope, name, newValue) super.writeField(scope, name, newValue)
} }
@@ -225,6 +349,16 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
// Fast path for public members when outside any class context // Fast path for public members when outside any class context
if (caller == null) { if (caller == null) {
objClass.publicMemberResolution[name]?.let { key -> objClass.publicMemberResolution[name]?.let { key ->
methodRecordForKey(key)?.let { rec ->
if (rec.visibility == Visibility.Public && !rec.isAbstract) {
val decl = rec.declaringClass
if (rec.type == ObjRecord.Type.Property) {
if (args.isEmpty()) return (rec.value as ObjProperty).callGetter(scope, this, decl)
} else if (rec.type == ObjRecord.Type.Fun) {
return rec.value.invoke(instanceScope, this, args, decl)
}
}
}
instanceScope.objects[key]?.let { rec -> instanceScope.objects[key]?.let { rec ->
if (rec.visibility == Visibility.Public && !rec.isAbstract) { if (rec.visibility == Visibility.Public && !rec.isAbstract) {
val decl = rec.declaringClass val decl = rec.declaringClass
@@ -241,6 +375,15 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
// 0. Prefer private member of current class context // 0. Prefer private member of current class context
caller?.let { c -> caller?.let { c ->
val mangled = c.mangledName(name) val mangled = c.mangledName(name)
methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private && !rec.isAbstract) {
if (rec.type == ObjRecord.Type.Property) {
if (args.isEmpty()) return (rec.value as ObjProperty).callGetter(scope, this, c)
} else if (rec.type == ObjRecord.Type.Fun) {
return rec.value.invoke(instanceScope, this, args, c)
}
}
}
instanceScope.objects[mangled]?.let { rec -> instanceScope.objects[mangled]?.let { rec ->
if (rec.visibility == Visibility.Private && !rec.isAbstract) { if (rec.visibility == Visibility.Private && !rec.isAbstract) {
if (rec.type == ObjRecord.Type.Property) { if (rec.type == ObjRecord.Type.Property) {
@@ -261,50 +404,58 @@ class ObjInstance(override val objClass: ObjClass) : Obj() {
} }
} }
// 1. Walk MRO to find member, handling delegation // Fast path for non-delegated instance methods in class context
for (cls in objClass.mro) { methodRecordForKey(name)?.let { rec ->
if (cls.className == "Obj") break if (!rec.isAbstract && rec.type == ObjRecord.Type.Fun) {
val rec = cls.members[name] ?: cls.classScope?.objects?.get(name) val decl = rec.declaringClass ?: objClass.findDeclaringClassOf(name) ?: objClass
if (rec != null && !rec.isAbstract) {
if (rec.type == ObjRecord.Type.Delegated) {
val storageName = cls.mangledName(name)
val del = instanceScope[storageName]?.delegate ?: rec.delegate
?: scope.raiseError("Internal error: delegated member $name has no delegate (tried $storageName)")
// For delegated member, try 'invoke' first if it's a function-like call
val allArgs = (listOf(this, ObjString(name)) + args.list).toTypedArray()
return del.invokeInstanceMethod(scope, "invoke", Arguments(*allArgs), onNotFoundResult = {
// Fallback: property delegation (getValue then call result)
val propVal = del.invokeInstanceMethod(scope, "getValue", Arguments(this, ObjString(name)))
propVal.invoke(scope, this, args, rec.declaringClass ?: cls)
})
}
val decl = rec.declaringClass ?: cls
val effectiveCaller = caller ?: if (scope.thisObj === this) objClass else null val effectiveCaller = caller ?: if (scope.thisObj === this) objClass else null
if (!canAccessMember(rec.visibility, decl, effectiveCaller, name)) if (canAccessMember(rec.visibility, decl, effectiveCaller, name)) {
scope.raiseError( return rec.value.invoke(instanceScope, this, args, decl)
ObjIllegalAccessException(
scope,
"can't invoke method $name (declared in ${decl.className})"
)
)
if (rec.type == ObjRecord.Type.Property) {
if (args.isEmpty()) return (rec.value as ObjProperty).callGetter(scope, this, decl)
} else if (rec.type == ObjRecord.Type.Fun) {
return rec.value.invoke(
instanceScope,
this,
args,
decl
)
} else if (rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField || rec.type == ObjRecord.Type.Argument) {
val resolved = readField(scope, name)
return resolved.value.invoke(scope, this, args, resolved.declaringClass)
} }
} }
} }
// 1. Resolve instance member via cached MRO lookup, handling delegation
objClass.resolveInstanceMember(name)?.let { resolvedMember ->
val rec = resolvedMember.record
val decl = resolvedMember.declaringClass
if (rec.type == ObjRecord.Type.Delegated) {
val storageName = decl.mangledName(name)
val del = instanceScope[storageName]?.delegate ?: rec.delegate
?: scope.raiseError("Internal error: delegated member $name has no delegate (tried $storageName)")
// For delegated member, try 'invoke' first if it's a function-like call
val allArgs = (listOf(this, ObjString(name)) + args.list).toTypedArray()
return del.invokeInstanceMethod(scope, "invoke", Arguments(*allArgs), onNotFoundResult = {
// Fallback: property delegation (getValue then call result)
val propVal = del.invokeInstanceMethod(scope, "getValue", Arguments(this, ObjString(name)))
propVal.invoke(scope, this, args, rec.declaringClass ?: decl)
})
}
val effectiveCaller = caller ?: if (scope.thisObj === this) objClass else null
if (!canAccessMember(rec.visibility, decl, effectiveCaller, name))
scope.raiseError(
ObjIllegalAccessException(
scope,
"can't invoke method $name (declared in ${decl.className})"
)
)
if (rec.type == ObjRecord.Type.Property) {
if (args.isEmpty()) return (rec.value as ObjProperty).callGetter(scope, this, decl)
} else if (rec.type == ObjRecord.Type.Fun) {
return rec.value.invoke(
instanceScope,
this,
args,
decl
)
} else if (rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField || rec.type == ObjRecord.Type.Argument) {
val resolved = readField(scope, name)
return resolved.value.invoke(scope, this, args, resolved.declaringClass)
}
}
// 2. Fall back to super (handles extensions and root fallback) // 2. Fall back to super (handles extensions and root fallback)
return super.invokeInstanceMethod(scope, name, args, onNotFoundResult) return super.invokeInstanceMethod(scope, name, args, onNotFoundResult)
} }
@@ -431,6 +582,14 @@ class ObjQualifiedView(val instance: ObjInstance, private val startClass: ObjCla
override suspend fun readField(scope: Scope, name: String): ObjRecord { override suspend fun readField(scope: Scope, name: String): ObjRecord {
// Qualified field access: prefer mangled storage for the qualified ancestor // Qualified field access: prefer mangled storage for the qualified ancestor
val mangled = "${startClass.className}::$name" val mangled = "${startClass.className}::$name"
instance.fieldRecordForKey(mangled)?.let { rec ->
// Visibility: declaring class is the qualified ancestor for mangled storage
val decl = rec.declaringClass ?: startClass
val caller = scope.currentClassCtx
if (!canAccessMember(rec.visibility, decl, caller, name))
scope.raiseError(ObjIllegalAccessException(scope, "can't access field $name (declared in ${decl.className})"))
return instance.resolveRecord(scope, rec, name, decl)
}
instance.instanceScope.objects[mangled]?.let { rec -> instance.instanceScope.objects[mangled]?.let { rec ->
// Visibility: declaring class is the qualified ancestor for mangled storage // Visibility: declaring class is the qualified ancestor for mangled storage
val decl = rec.declaringClass ?: startClass val decl = rec.declaringClass ?: startClass
@@ -467,6 +626,18 @@ class ObjQualifiedView(val instance: ObjInstance, private val startClass: ObjCla
override suspend fun writeField(scope: Scope, name: String, newValue: Obj) { override suspend fun writeField(scope: Scope, name: String, newValue: Obj) {
// Qualified write: target mangled storage for the ancestor // Qualified write: target mangled storage for the ancestor
val mangled = "${startClass.className}::$name" val mangled = "${startClass.className}::$name"
instance.fieldRecordForKey(mangled)?.let { f ->
val decl = f.declaringClass ?: startClass
val caller = scope.currentClassCtx
if (!canAccessMember(f.effectiveWriteVisibility, decl, caller, name))
ObjIllegalAccessException(
scope,
"can't assign to field $name (declared in ${decl.className})"
).raise()
if (!f.isMutable && f.value !== ObjUnset) ObjIllegalAssignmentException(scope, "can't reassign val $name").raise()
if (f.value.assign(scope, newValue) == null) f.value = newValue
return
}
instance.instanceScope.objects[mangled]?.let { f -> instance.instanceScope.objects[mangled]?.let { f ->
val decl = f.declaringClass ?: startClass val decl = f.declaringClass ?: startClass
val caller = scope.currentClassCtx val caller = scope.currentClassCtx
@@ -548,4 +719,4 @@ class ObjQualifiedView(val instance: ObjInstance, private val startClass: ObjCla
} }
override fun toString(): String = instance.toString() override fun toString(): String = instance.toString()
} }
@@ -55,7 +55,11 @@ class ObjInt(val value: Long, override val isConst: Boolean = false) : Obj(), Nu
override suspend fun compareTo(scope: Scope, other: Obj): Int { override suspend fun compareTo(scope: Scope, other: Obj): Int {
if (other !is Numeric) return -2 if (other !is Numeric) return -2
return value.compareTo(other.doubleValue) return if (other is ObjInt) {
value.compareTo(other.value)
} else {
doubleValue.compareTo(other.doubleValue)
}
} }
override fun toString(): String = value.toString() override fun toString(): String = value.toString()
@@ -159,13 +163,19 @@ class ObjInt(val value: Long, override val isConst: Boolean = false) : Obj(), Nu
} }
companion object { companion object {
private val cache = Array(256) { ObjInt((it - 128).toLong(), true) } internal const val CACHE_LOW: Long = -1024L
internal const val CACHE_HIGH: Long = 1023L
private val cache = Array((CACHE_HIGH - CACHE_LOW + 1).toInt()) {
ObjInt((it + CACHE_LOW).toLong(), true)
}
fun of(value: Long): ObjInt { fun of(value: Long): ObjInt {
return if (value in -128L..127L) cache[(value + 128).toInt()] return if (value in CACHE_LOW..CACHE_HIGH) cache[(value - CACHE_LOW).toInt()]
else ObjInt(value) else ObjInt(value)
} }
internal fun cacheArray(): Array<ObjInt> = cache
val Zero = of(0) val Zero = of(0)
val One = of(1) val One = of(1)
val type = object : ObjClass("Int") { val type = object : ObjClass("Int") {
@@ -192,4 +202,4 @@ class ObjInt(val value: Long, override val isConst: Boolean = false) : Obj(), Nu
} }
fun Int.toObj() = ObjInt.of(this.toLong()) fun Int.toObj() = ObjInt.of(this.toLong())
fun Long.toObj() = ObjInt.of(this) fun Long.toObj() = ObjInt.of(this)
@@ -96,6 +96,30 @@ class ObjRange(val start: Obj?, val end: Obj?, val isEndInclusive: Boolean) : Ob
if (other is ObjRange) if (other is ObjRange)
return containsRange(scope, other) return containsRange(scope, other)
if (net.sergeych.lyng.PerfFlags.PRIMITIVE_FASTOPS) {
if (start is ObjInt && end is ObjInt && other is ObjInt) {
val s = start.value
val e = end.value
val v = other.value
if (v < s) return false
return if (isEndInclusive) v <= e else v < e
}
if (start is ObjChar && end is ObjChar && other is ObjChar) {
val s = start.value
val e = end.value
val v = other.value
if (v < s) return false
return if (isEndInclusive) v <= e else v < e
}
if (start is ObjString && end is ObjString && other is ObjString) {
val s = start.value
val e = end.value
val v = other.value
if (v < s) return false
return if (isEndInclusive) v <= e else v < e
}
}
if (start == null && end == null) return true if (start == null && end == null) return true
if (start != null) { if (start != null) {
if (start.compareTo(scope, other) > 0) return false if (start.compareTo(scope, other) > 0) return false
@@ -241,4 +265,3 @@ class ObjRange(val start: Obj?, val end: Obj?, val isEndInclusive: Boolean) : Ob
} }
} }
} }
@@ -58,7 +58,7 @@ class ObjRangeIterator(val self: ObjRange) : Obj() {
start.value.code.toLong() + nextIndex++ start.value.code.toLong() + nextIndex++
else else
scope.raiseError("iterator error: unsupported range start") scope.raiseError("iterator error: unsupported range start")
if( isCharRange ) ObjChar(x.toInt().toChar()) else ObjInt(x) if (isCharRange) ObjChar(x.toInt().toChar()) else ObjInt.of(x)
} }
else { else {
scope.raiseError(ObjIterationFinishedException(scope)) scope.raiseError(ObjIterationFinishedException(scope))
@@ -83,13 +83,18 @@ class ObjRangeIterator(val self: ObjRange) : Obj() {
class ObjFastIntRangeIterator(private val start: Int, private val endExclusive: Int) : Obj() { class ObjFastIntRangeIterator(private val start: Int, private val endExclusive: Int) : Obj() {
private var cur: Int = start private var cur: Int = start
private val cacheLow = ObjInt.CACHE_LOW.toInt()
private val useCache = start >= cacheLow && endExclusive <= ObjInt.CACHE_HIGH.toInt() + 1
private val cache = if (useCache) ObjInt.cacheArray() else null
override val objClass: ObjClass get() = type override val objClass: ObjClass get() = type
fun hasNext(): Boolean = cur < endExclusive fun hasNext(): Boolean = cur < endExclusive
fun next(scope: Scope): Obj = fun next(scope: Scope): Obj =
if (cur < endExclusive) ObjInt(cur++.toLong()) if (cur < endExclusive) {
if (useCache && cache != null) cache[cur++ - cacheLow] else ObjInt(cur++.toLong())
}
else scope.raiseError(ObjIterationFinishedException(scope)) else scope.raiseError(ObjIterationFinishedException(scope))
companion object { companion object {
@@ -98,4 +103,4 @@ class ObjFastIntRangeIterator(private val start: Int, private val endExclusive:
addFn("next") { thisAs<ObjFastIntRangeIterator>().next(this) } addFn("next") { thisAs<ObjFastIntRangeIterator>().next(this) }
} }
} }
} }
@@ -152,6 +152,80 @@ class BinaryOpRef(private val op: BinOp, private val left: ObjRef, private val r
// Primitive fast paths for common cases (guarded by PerfFlags.PRIMITIVE_FASTOPS) // Primitive fast paths for common cases (guarded by PerfFlags.PRIMITIVE_FASTOPS)
if (PerfFlags.PRIMITIVE_FASTOPS) { if (PerfFlags.PRIMITIVE_FASTOPS) {
// Fast membership for common containers
if (op == BinOp.IN || op == BinOp.NOTIN) {
val inResult: Boolean? = when (b) {
is ObjList -> {
if (a is ObjInt) {
var i = 0
val sz = b.list.size
var found = false
while (i < sz) {
val v = b.list[i]
if (v is ObjInt && v.value == a.value) {
found = true
break
}
i++
}
found
} else {
b.list.contains(a)
}
}
is ObjSet -> b.set.contains(a)
is ObjMap -> b.map.containsKey(a)
is ObjRange -> {
when (a) {
is ObjInt -> {
val s = b.start as? ObjInt
val e = b.end as? ObjInt
val v = a.value
if (s == null && e == null) null
else {
if (s != null && v < s.value) false
else if (e != null) if (b.isEndInclusive) v <= e.value else v < e.value else true
}
}
is ObjChar -> {
val s = b.start as? ObjChar
val e = b.end as? ObjChar
val v = a.value
if (s == null && e == null) null
else {
if (s != null && v < s.value) false
else if (e != null) if (b.isEndInclusive) v <= e.value else v < e.value else true
}
}
is ObjString -> {
val s = b.start as? ObjString
val e = b.end as? ObjString
val v = a.value
if (s == null && e == null) null
else {
if (s != null && v < s.value) false
else if (e != null) if (b.isEndInclusive) v <= e.value else v < e.value else true
}
}
else -> null
}
}
is ObjString -> when (a) {
is ObjString -> b.value.contains(a.value)
is ObjChar -> b.value.contains(a.value)
else -> null
}
else -> null
}
if (inResult != null) {
if (PerfFlags.PIC_DEBUG_COUNTERS) PerfStats.primitiveFastOpsHit++
return if (op == BinOp.IN) {
if (inResult) ObjTrue else ObjFalse
} else {
if (inResult) ObjFalse else ObjTrue
}
}
}
// Fast boolean ops when both operands are ObjBool // Fast boolean ops when both operands are ObjBool
if (a is ObjBool && b is ObjBool) { if (a is ObjBool && b is ObjBool) {
val r: Obj? = when (op) { val r: Obj? = when (op) {
@@ -381,7 +455,7 @@ class CastRef(
} }
/** Qualified `this@Type`: resolves to a view of current `this` starting dispatch from the ancestor Type. */ /** Qualified `this@Type`: resolves to a view of current `this` starting dispatch from the ancestor Type. */
class QualifiedThisRef(private val typeName: String, private val atPos: Pos) : ObjRef { class QualifiedThisRef(val typeName: String, private val atPos: Pos) : ObjRef {
override suspend fun get(scope: Scope): ObjRecord { override suspend fun get(scope: Scope): ObjRecord {
val t = scope[typeName]?.value as? ObjClass val t = scope[typeName]?.value as? ObjClass
?: scope.raiseError("unknown type $typeName") ?: scope.raiseError("unknown type $typeName")
@@ -403,6 +477,188 @@ class QualifiedThisRef(private val typeName: String, private val atPos: Pos) : O
} }
} }
private suspend fun resolveQualifiedThisInstance(scope: Scope, typeName: String): Pair<ObjInstance, ObjClass> {
val t = scope[typeName]?.value as? ObjClass
?: scope.raiseError("unknown type $typeName")
var s: Scope? = scope
while (s != null) {
val inst = s.thisObj as? ObjInstance
if (inst != null && (inst.objClass === t || inst.objClass.allParentsSet.contains(t))) {
return inst to t
}
s = s.parent
}
scope.raiseClassCastError(
"No instance of type ${t.className} found in the scope chain"
)
}
/**
* Fast path for direct `this@Type.name` access using slot maps when possible.
*/
class QualifiedThisFieldSlotRef(
private val typeName: String,
val name: String,
private val isOptional: Boolean
) : ObjRef {
override suspend fun get(scope: Scope): ObjRecord {
val (inst, startClass) = resolveQualifiedThisInstance(scope, typeName)
if (isOptional && inst == ObjNull) return ObjNull.asMutable
if (startClass !== inst.objClass) {
return ObjQualifiedView(inst, startClass).readField(scope, name)
}
val caller = scope.currentClassCtx
if (caller != null) {
val mangled = caller.mangledName(name)
inst.fieldRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
return inst.resolveRecord(scope, rec, name, caller)
}
}
inst.methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
return inst.resolveRecord(scope, rec, name, caller)
}
}
}
val key = inst.objClass.publicMemberResolution[name] ?: name
inst.fieldRecordForKey(key)?.let { rec ->
if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && !rec.isAbstract)
return rec
}
inst.methodRecordForKey(key)?.let { rec ->
if (!rec.isAbstract) {
val decl = rec.declaringClass ?: inst.objClass.findDeclaringClassOf(name) ?: inst.objClass
return inst.resolveRecord(scope, rec, name, decl)
}
}
return inst.readField(scope, name)
}
override suspend fun setAt(pos: Pos, scope: Scope, newValue: Obj) {
val (inst, startClass) = resolveQualifiedThisInstance(scope, typeName)
if (isOptional && inst == ObjNull) return
if (startClass !== inst.objClass) {
ObjQualifiedView(inst, startClass).writeField(scope, name, newValue)
return
}
val caller = scope.currentClassCtx
if (caller != null) {
val mangled = caller.mangledName(name)
inst.fieldRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
writeDirectOrFallback(scope, inst, rec, name, newValue, caller)
return
}
}
inst.methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private &&
(rec.type == ObjRecord.Type.Property || rec.type == ObjRecord.Type.Delegated)) {
inst.writeField(scope, name, newValue)
return
}
}
}
val key = inst.objClass.publicMemberResolution[name] ?: name
inst.fieldRecordForKey(key)?.let { rec ->
val decl = rec.declaringClass ?: inst.objClass.findDeclaringClassOf(name)
if (canAccessMember(rec.effectiveWriteVisibility, decl, caller, name)) {
writeDirectOrFallback(scope, inst, rec, name, newValue, decl)
return
}
}
inst.methodRecordForKey(key)?.let { rec ->
if (rec.effectiveWriteVisibility == Visibility.Public &&
(rec.type == ObjRecord.Type.Property || rec.type == ObjRecord.Type.Delegated)) {
inst.writeField(scope, name, newValue)
return
}
}
inst.writeField(scope, name, newValue)
}
private suspend fun writeDirectOrFallback(
scope: Scope,
inst: ObjInstance,
rec: ObjRecord,
name: String,
newValue: Obj,
decl: ObjClass?
) {
if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && !rec.isAbstract) {
if (!rec.isMutable && rec.value !== ObjUnset) {
ObjIllegalAssignmentException(scope, "can't reassign val $name").raise()
}
if (rec.value.assign(scope, newValue) == null) rec.value = newValue
} else {
inst.writeField(scope, name, newValue)
}
}
}
/**
* Fast path for direct `this@Type.method(...)` calls using slots when the qualifier is the
* dynamic class. Otherwise falls back to a qualified view dispatch.
*/
class QualifiedThisMethodSlotCallRef(
private val typeName: String,
private val name: String,
private val args: List<ParsedArgument>,
private val tailBlock: Boolean,
private val isOptional: Boolean
) : ObjRef {
override suspend fun get(scope: Scope): ObjRecord = evalValue(scope).asReadonly
override suspend fun evalValue(scope: Scope): Obj {
val (inst, startClass) = resolveQualifiedThisInstance(scope, typeName)
if (isOptional && inst == ObjNull) return ObjNull
val callArgs = args.toArguments(scope, tailBlock)
if (startClass !== inst.objClass) {
return ObjQualifiedView(inst, startClass).invokeInstanceMethod(scope, name, callArgs, null)
}
val caller = scope.currentClassCtx
if (caller != null) {
val mangled = caller.mangledName(name)
inst.methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private && !rec.isAbstract) {
if (rec.type == ObjRecord.Type.Property) {
if (callArgs.isEmpty()) return (rec.value as ObjProperty).callGetter(scope, inst, caller)
} else if (rec.type == ObjRecord.Type.Fun) {
return rec.value.invoke(inst.instanceScope, inst, callArgs, caller)
}
}
}
}
val key = inst.objClass.publicMemberResolution[name] ?: name
inst.methodRecordForKey(key)?.let { rec ->
if (!rec.isAbstract) {
val decl = rec.declaringClass ?: inst.objClass.findDeclaringClassOf(name) ?: inst.objClass
val effectiveCaller = caller ?: if (scope.thisObj === inst) inst.objClass else null
if (!canAccessMember(rec.visibility, decl, effectiveCaller, name))
scope.raiseError(ObjIllegalAccessException(scope, "can't invoke method $name (declared in ${decl.className})"))
if (rec.type == ObjRecord.Type.Property) {
if (callArgs.isEmpty()) return (rec.value as ObjProperty).callGetter(scope, inst, decl)
} else if (rec.type == ObjRecord.Type.Fun) {
return rec.value.invoke(inst.instanceScope, inst, callArgs, decl)
}
}
}
return inst.invokeInstanceMethod(scope, name, callArgs)
}
}
/** Assignment compound op: target op= value */ /** Assignment compound op: target op= value */
class AssignOpRef( class AssignOpRef(
private val op: BinOp, private val op: BinOp,
@@ -422,7 +678,37 @@ class AssignOpRef(
else -> null else -> null
} }
if (inPlace != null) return inPlace.asReadonly if (inPlace != null) return inPlace.asReadonly
val result: Obj = when (op) { val fast: Obj? = if (PerfFlags.PRIMITIVE_FASTOPS) {
when {
x is ObjInt && y is ObjInt -> {
val xv = x.value
val yv = y.value
when (op) {
BinOp.PLUS -> ObjInt.of(xv + yv)
BinOp.MINUS -> ObjInt.of(xv - yv)
BinOp.STAR -> ObjInt.of(xv * yv)
BinOp.SLASH -> if (yv != 0L) ObjInt.of(xv / yv) else null
BinOp.PERCENT -> if (yv != 0L) ObjInt.of(xv % yv) else null
else -> null
}
}
(x is ObjInt || x is ObjReal) && (y is ObjInt || y is ObjReal) -> {
val xv = if (x is ObjInt) x.doubleValue else (x as ObjReal).value
val yv = if (y is ObjInt) y.doubleValue else (y as ObjReal).value
when (op) {
BinOp.PLUS -> ObjReal.of(xv + yv)
BinOp.MINUS -> ObjReal.of(xv - yv)
BinOp.STAR -> ObjReal.of(xv * yv)
BinOp.SLASH -> ObjReal.of(xv / yv)
BinOp.PERCENT -> ObjReal.of(xv % yv)
else -> null
}
}
x is ObjString && op == BinOp.PLUS -> ObjString(x.value + y.toString())
else -> null
}
} else null
val result: Obj = fast ?: when (op) {
BinOp.PLUS -> x.plus(scope, y) BinOp.PLUS -> x.plus(scope, y)
BinOp.MINUS -> x.minus(scope, y) BinOp.MINUS -> x.minus(scope, y)
BinOp.STAR -> x.mul(scope, y) BinOp.STAR -> x.mul(scope, y)
@@ -450,7 +736,15 @@ class IncDecRef(
// We now treat numbers as immutable and always perform write-back via setAt. // We now treat numbers as immutable and always perform write-back via setAt.
// This avoids issues where literals are shared and mutated in-place. // This avoids issues where literals are shared and mutated in-place.
// For post-inc: return ORIGINAL value; for pre-inc: return NEW value. // For post-inc: return ORIGINAL value; for pre-inc: return NEW value.
val result = if (isIncrement) v.plus(scope, one) else v.minus(scope, one) val result = if (PerfFlags.PRIMITIVE_FASTOPS) {
when (v) {
is ObjInt -> if (isIncrement) ObjInt.of(v.value + 1L) else ObjInt.of(v.value - 1L)
is ObjReal -> if (isIncrement) ObjReal.of(v.value + 1.0) else ObjReal.of(v.value - 1.0)
else -> if (isIncrement) v.plus(scope, one) else v.minus(scope, one)
}
} else {
if (isIncrement) v.plus(scope, one) else v.minus(scope, one)
}
target.setAt(atPos, scope, result) target.setAt(atPos, scope, result)
return (if (isPost) v else result).asReadonly return (if (isPost) v else result).asReadonly
} }
@@ -691,9 +985,20 @@ class FieldRef(
if (effectiveKey != null) { if (effectiveKey != null) {
rKey1 = key; rVer1 = ver; rGetter1 = { obj, sc -> rKey1 = key; rVer1 = ver; rGetter1 = { obj, sc ->
if (obj is ObjInstance && obj.objClass === cls) { if (obj is ObjInstance && obj.objClass === cls) {
val rec = obj.instanceScope.objects[effectiveKey] val slot = cls.fieldSlotForKey(effectiveKey)
if (rec != null && rec.type != ObjRecord.Type.Delegated) rec if (slot != null) {
else obj.readField(sc, name) val idx = slot.slot
val rec = if (idx >= 0 && idx < obj.fieldSlots.size) obj.fieldSlots[idx] else null
if (rec != null &&
(rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) &&
!rec.isAbstract) {
rec
} else obj.readField(sc, name)
} else {
val rec = obj.fieldRecordForKey(effectiveKey) ?: obj.instanceScope.objects[effectiveKey]
if (rec != null && rec.type != ObjRecord.Type.Delegated) rec
else obj.readField(sc, name)
}
} else obj.readField(sc, name) } else obj.readField(sc, name)
} }
} else { } else {
@@ -809,10 +1114,24 @@ class FieldRef(
if (effectiveKey != null) { if (effectiveKey != null) {
wKey1 = key; wVer1 = ver; wSetter1 = { obj, sc, nv -> wKey1 = key; wVer1 = ver; wSetter1 = { obj, sc, nv ->
if (obj is ObjInstance && obj.objClass === cls) { if (obj is ObjInstance && obj.objClass === cls) {
val rec = obj.instanceScope.objects[effectiveKey] val slot = cls.fieldSlotForKey(effectiveKey)
if (rec != null && rec.effectiveWriteVisibility == Visibility.Public && rec.isMutable && rec.type == ObjRecord.Type.Field) { if (slot != null) {
if (rec.value.assign(sc, nv) == null) rec.value = nv val idx = slot.slot
} else obj.writeField(sc, name, nv) val rec = if (idx >= 0 && idx < obj.fieldSlots.size) obj.fieldSlots[idx] else null
if (rec != null &&
rec.effectiveWriteVisibility == Visibility.Public &&
rec.isMutable &&
(rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) &&
!rec.isAbstract) {
if (rec.value.assign(sc, nv) == null) rec.value = nv
} else obj.writeField(sc, name, nv)
} else {
val rec = obj.fieldRecordForKey(effectiveKey) ?: obj.instanceScope.objects[effectiveKey]
if (rec != null && rec.effectiveWriteVisibility == Visibility.Public && rec.isMutable &&
(rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField)) {
if (rec.value.assign(sc, nv) == null) rec.value = nv
} else obj.writeField(sc, name, nv)
}
} else obj.writeField(sc, name, nv) } else obj.writeField(sc, name, nv)
} }
} else { } else {
@@ -890,6 +1209,113 @@ class FieldRef(
} }
} }
/**
* Fast path for direct `this.name` access using slot maps.
* Falls back to normal member resolution when needed.
*/
class ThisFieldSlotRef(
val name: String,
private val isOptional: Boolean
) : ObjRef {
override suspend fun get(scope: Scope): ObjRecord {
val th = scope.thisObj
if (th == ObjNull && isOptional) return ObjNull.asMutable
if (th !is ObjInstance) return th.readField(scope, name)
val caller = scope.currentClassCtx
if (caller != null) {
val mangled = caller.mangledName(name)
th.fieldRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
return th.resolveRecord(scope, rec, name, caller)
}
}
th.methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
return th.resolveRecord(scope, rec, name, caller)
}
}
}
val key = th.objClass.publicMemberResolution[name] ?: name
th.fieldRecordForKey(key)?.let { rec ->
if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && !rec.isAbstract)
return rec
}
th.methodRecordForKey(key)?.let { rec ->
if (!rec.isAbstract) {
val decl = rec.declaringClass ?: th.objClass.findDeclaringClassOf(name) ?: th.objClass
return th.resolveRecord(scope, rec, name, decl)
}
}
return th.readField(scope, name)
}
override suspend fun setAt(pos: Pos, scope: Scope, newValue: Obj) {
val th = scope.thisObj
if (th == ObjNull && isOptional) return
if (th !is ObjInstance) {
th.writeField(scope, name, newValue)
return
}
val caller = scope.currentClassCtx
if (caller != null) {
val mangled = caller.mangledName(name)
th.fieldRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
writeDirectOrFallback(scope, th, rec, name, newValue, caller)
return
}
}
th.methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private &&
(rec.type == ObjRecord.Type.Property || rec.type == ObjRecord.Type.Delegated)) {
th.writeField(scope, name, newValue)
return
}
}
}
val key = th.objClass.publicMemberResolution[name] ?: name
th.fieldRecordForKey(key)?.let { rec ->
val decl = rec.declaringClass ?: th.objClass.findDeclaringClassOf(name)
if (canAccessMember(rec.effectiveWriteVisibility, decl, caller, name)) {
writeDirectOrFallback(scope, th, rec, name, newValue, decl)
return
}
}
th.methodRecordForKey(key)?.let { rec ->
if (rec.effectiveWriteVisibility == Visibility.Public &&
(rec.type == ObjRecord.Type.Property || rec.type == ObjRecord.Type.Delegated)) {
th.writeField(scope, name, newValue)
return
}
}
th.writeField(scope, name, newValue)
}
private suspend fun writeDirectOrFallback(
scope: Scope,
inst: ObjInstance,
rec: ObjRecord,
name: String,
newValue: Obj,
decl: ObjClass?
) {
if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && !rec.isAbstract) {
if (!rec.isMutable && rec.value !== ObjUnset) {
ObjIllegalAssignmentException(scope, "can't reassign val $name").raise()
}
if (rec.value.assign(scope, newValue) == null) rec.value = newValue
} else {
inst.writeField(scope, name, newValue)
}
}
}
/** /**
* Reference to index access (a[i]) with optional chaining. * Reference to index access (a[i]) with optional chaining.
*/ */
@@ -1133,7 +1559,7 @@ class IndexRef(
/** /**
* R-value reference that wraps a Statement (used during migration for expressions parsed as Statement). * R-value reference that wraps a Statement (used during migration for expressions parsed as Statement).
*/ */
class StatementRef(private val statement: Statement) : ObjRef { class StatementRef(internal val statement: Statement) : ObjRef {
override suspend fun get(scope: Scope): ObjRecord = statement.execute(scope).asReadonly override suspend fun get(scope: Scope): ObjRecord = statement.execute(scope).asReadonly
} }
@@ -1336,36 +1762,50 @@ class MethodCallRef(
is ObjInstance -> { is ObjInstance -> {
// Prefer resolved class member to avoid per-call lookup on hit // Prefer resolved class member to avoid per-call lookup on hit
// BUT only if it's NOT a root object member (which can be shadowed by extensions) // BUT only if it's NOT a root object member (which can be shadowed by extensions)
var hierarchyMember: ObjRecord? = null
val cls0 = base.objClass val cls0 = base.objClass
val keyInScope = cls0.publicMemberResolution[name] val keyInScope = cls0.publicMemberResolution[name]
if (keyInScope != null) { val methodSlot = if (keyInScope != null) cls0.methodSlotForKey(keyInScope) else null
val rec = base.instanceScope.objects[keyInScope] val fastRec = if (methodSlot != null) {
if (rec != null && rec.type == ObjRecord.Type.Fun) { val idx = methodSlot.slot
hierarchyMember = rec if (idx >= 0 && idx < base.methodSlots.size) base.methodSlots[idx] else null
} } else if (keyInScope != null) {
} base.methodRecordForKey(keyInScope) ?: base.instanceScope.objects[keyInScope]
} else null
val resolved = if (fastRec != null) null else cls0.resolveInstanceMember(name)
if (hierarchyMember == null) { val targetRec = when {
for (cls in base.objClass.mro) { fastRec != null && fastRec.type == ObjRecord.Type.Fun -> fastRec
if (cls.className == "Obj") break resolved != null && resolved.record.type == ObjRecord.Type.Fun && !resolved.record.isAbstract -> resolved.record
val rec = cls.members[name] ?: cls.classScope?.objects?.get(name) else -> null
if (rec != null && !rec.isAbstract && rec.type != ObjRecord.Type.Field) { }
hierarchyMember = rec if (targetRec != null) {
break val visibility = targetRec.visibility
val decl = targetRec.declaringClass ?: (resolved?.declaringClass ?: cls0)
if (methodSlot != null && targetRec.type == ObjRecord.Type.Fun) {
val slotIndex = methodSlot.slot
mKey1 = key; mVer1 = ver; mInvoker1 = { obj, sc, a ->
val inst = obj as ObjInstance
if (inst.objClass === cls0) {
val rec = if (slotIndex >= 0 && slotIndex < inst.methodSlots.size) inst.methodSlots[slotIndex] else null
if (rec != null && rec.type == ObjRecord.Type.Fun && !rec.isAbstract) {
if (!visibility.isPublic && !canAccessMember(visibility, decl, sc.currentClassCtx, name))
sc.raiseError(ObjIllegalAccessException(sc, "can't invoke non-public method $name"))
rec.value.invoke(inst.instanceScope, inst, a, decl)
} else {
obj.invokeInstanceMethod(sc, name, a)
}
} else {
obj.invokeInstanceMethod(sc, name, a)
}
}
} else {
val callable = targetRec.value
mKey1 = key; mVer1 = ver; mInvoker1 = { obj, sc, a ->
val inst = obj as ObjInstance
if (!visibility.isPublic && !canAccessMember(visibility, decl, sc.currentClassCtx, name))
sc.raiseError(ObjIllegalAccessException(sc, "can't invoke non-public method $name"))
callable.invoke(inst.instanceScope, inst, a)
} }
}
}
if (hierarchyMember != null) {
val visibility = hierarchyMember.visibility
val callable = hierarchyMember.value
val decl = hierarchyMember.declaringClass ?: base.objClass
mKey1 = key; mVer1 = ver; mInvoker1 = { obj, sc, a ->
val inst = obj as ObjInstance
if (!visibility.isPublic && !canAccessMember(visibility, decl, sc.currentClassCtx, name))
sc.raiseError(ObjIllegalAccessException(sc, "can't invoke non-public method $name"))
callable.invoke(inst.instanceScope, inst, a)
} }
} else { } else {
// Fallback to name-based lookup per call (handles extensions and root members) // Fallback to name-based lookup per call (handles extensions and root members)
@@ -1399,6 +1839,57 @@ class MethodCallRef(
} }
} }
/**
* Fast path for direct `this.method(...)` calls using slot maps.
* Falls back to normal invoke semantics when needed.
*/
class ThisMethodSlotCallRef(
private val name: String,
private val args: List<ParsedArgument>,
private val tailBlock: Boolean,
private val isOptional: Boolean
) : ObjRef {
override suspend fun get(scope: Scope): ObjRecord = evalValue(scope).asReadonly
override suspend fun evalValue(scope: Scope): Obj {
val base = scope.thisObj
if (base == ObjNull && isOptional) return ObjNull
val callArgs = args.toArguments(scope, tailBlock)
if (base !is ObjInstance) return base.invokeInstanceMethod(scope, name, callArgs)
val caller = scope.currentClassCtx
if (caller != null) {
val mangled = caller.mangledName(name)
base.methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private && !rec.isAbstract) {
if (rec.type == ObjRecord.Type.Property) {
if (callArgs.isEmpty()) return (rec.value as ObjProperty).callGetter(scope, base, caller)
} else if (rec.type == ObjRecord.Type.Fun) {
return rec.value.invoke(base.instanceScope, base, callArgs, caller)
}
}
}
}
val key = base.objClass.publicMemberResolution[name] ?: name
base.methodRecordForKey(key)?.let { rec ->
if (!rec.isAbstract) {
val decl = rec.declaringClass ?: base.objClass.findDeclaringClassOf(name) ?: base.objClass
val effectiveCaller = caller ?: if (scope.thisObj === base) base.objClass else null
if (!canAccessMember(rec.visibility, decl, effectiveCaller, name))
scope.raiseError(ObjIllegalAccessException(scope, "can't invoke method $name (declared in ${decl.className})"))
if (rec.type == ObjRecord.Type.Property) {
if (callArgs.isEmpty()) return (rec.value as ObjProperty).callGetter(scope, base, decl)
} else if (rec.type == ObjRecord.Type.Fun) {
return rec.value.invoke(base.instanceScope, base, callArgs, decl)
}
}
}
return base.invokeInstanceMethod(scope, name, callArgs)
}
}
/** /**
* Reference to a local/visible variable by name (Phase A: scope lookup). * Reference to a local/visible variable by name (Phase A: scope lookup).
*/ */
@@ -1729,6 +2220,274 @@ class FastLocalVarRef(
} }
} }
/**
* Identifier reference in class context that prefers member slots on `this` after local lookup.
* Falls back to normal scope lookup for globals/outer scopes.
*/
class ImplicitThisMemberRef(
val name: String,
val atPos: Pos
) : ObjRef {
private fun resolveInstanceFieldRecord(th: ObjInstance, caller: ObjClass?): ObjRecord? {
if (caller == null) return null
for (cls in th.objClass.mro) {
if (cls.className == "Obj") break
val rec = cls.members[name] ?: continue
if (rec.isAbstract) continue
val decl = rec.declaringClass ?: cls
if (!canAccessMember(rec.visibility, decl, caller, name)) continue
val key = decl.mangledName(name)
th.fieldRecordForKey(key)?.let { return it }
th.instanceScope.objects[key]?.let { return it }
}
return null
}
override fun forEachVariable(block: (String) -> Unit) {
block(name)
}
override fun forEachVariableWithPos(block: (String, Pos) -> Unit) {
block(name, atPos)
}
override suspend fun get(scope: Scope): ObjRecord {
scope.pos = atPos
val caller = scope.currentClassCtx
val th = scope.thisObj
// 1) locals in the same `this` chain
var s: Scope? = scope
while (s != null && s.thisObj === th) {
scope.tryGetLocalRecord(s, name, caller)?.let { return it }
s = s.parent
}
// 2) member slots on this instance
if (th is ObjInstance) {
// private member access for current class context
caller?.let { c ->
val mangled = c.mangledName(name)
th.fieldRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
return th.resolveRecord(scope, rec, name, c)
}
}
th.methodRecordForKey(mangled)?.let { rec ->
if (rec.visibility == Visibility.Private) {
return th.resolveRecord(scope, rec, name, c)
}
}
}
resolveInstanceFieldRecord(th, caller)?.let { return it }
val key = th.objClass.publicMemberResolution[name] ?: name
th.fieldRecordForKey(key)?.let { rec ->
if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && !rec.isAbstract)
return rec
}
th.methodRecordForKey(key)?.let { rec ->
if (!rec.isAbstract) {
val decl = rec.declaringClass ?: th.objClass.findDeclaringClassOf(name) ?: th.objClass
return th.resolveRecord(scope, rec, name, decl)
}
}
}
// 3) fallback to normal scope resolution (globals/outer scopes)
scope[name]?.let { return it }
try {
return th.readField(scope, name)
} catch (e: ExecutionError) {
if ((e.message ?: "").contains("no such field: $name")) scope.raiseSymbolNotFound(name)
throw e
}
}
override suspend fun evalValue(scope: Scope): Obj {
val rec = get(scope)
return scope.resolve(rec, name)
}
override suspend fun setAt(pos: Pos, scope: Scope, newValue: Obj) {
scope.pos = atPos
val caller = scope.currentClassCtx
val th = scope.thisObj
// 1) locals in the same `this` chain
var s: Scope? = scope
while (s != null && s.thisObj === th) {
val rec = scope.tryGetLocalRecord(s, name, caller)
if (rec != null) {
scope.assign(rec, name, newValue)
return
}
s = s.parent
}
// 2) member slots on this instance
if (th is ObjInstance) {
val key = th.objClass.publicMemberResolution[name] ?: name
th.fieldRecordForKey(key)?.let { rec ->
val decl = rec.declaringClass ?: th.objClass.findDeclaringClassOf(name)
if (canAccessMember(rec.effectiveWriteVisibility, decl, caller, name)) {
if ((rec.type == ObjRecord.Type.Field || rec.type == ObjRecord.Type.ConstructorField) && !rec.isAbstract) {
if (!rec.isMutable && rec.value !== ObjUnset) {
ObjIllegalAssignmentException(scope, "can't reassign val $name").raise()
}
if (rec.value.assign(scope, newValue) == null) rec.value = newValue
} else {
th.writeField(scope, name, newValue)
}
return
}
}
th.methodRecordForKey(key)?.let { rec ->
if (rec.effectiveWriteVisibility == Visibility.Public &&
(rec.type == ObjRecord.Type.Property || rec.type == ObjRecord.Type.Delegated)) {
th.writeField(scope, name, newValue)
return
}
}
resolveInstanceFieldRecord(th, caller)?.let { rec ->
scope.assign(rec, name, newValue)
return
}
}
// 3) fallback to normal scope resolution
scope[name]?.let { stored ->
scope.assign(stored, name, newValue)
return
}
th.writeField(scope, name, newValue)
}
}
/**
* Fast path for implicit member calls in class bodies: `foo(...)` resolves locals first,
* then falls back to member lookup on `this`.
*/
class ImplicitThisMethodCallRef(
private val name: String,
private val args: List<ParsedArgument>,
private val tailBlock: Boolean,
private val isOptional: Boolean,
private val atPos: Pos
) : ObjRef {
private val memberRef = ImplicitThisMemberRef(name, atPos)
override suspend fun get(scope: Scope): ObjRecord = evalValue(scope).asReadonly
override suspend fun evalValue(scope: Scope): Obj {
scope.pos = atPos
val callee = memberRef.evalValue(scope)
if (callee == ObjNull && isOptional) return ObjNull
val callArgs = args.toArguments(scope, tailBlock)
val usePool = PerfFlags.SCOPE_POOL
return if (usePool) {
scope.withChildFrame(callArgs) { child ->
callee.callOn(child)
}
} else {
callee.callOn(scope.createChildScope(scope.pos, callArgs))
}
}
}
/**
* Direct local slot reference with known slot index and lexical depth.
* Depth=0 means current scope, depth=1 means parent scope, etc.
*/
class LocalSlotRef(
val name: String,
private val slot: Int,
private val depth: Int,
private val atPos: Pos,
) : ObjRef {
override fun forEachVariable(block: (String) -> Unit) {
block(name)
}
private val fallbackRef = LocalVarRef(name, atPos)
private var cachedFrameId: Long = 0L
private var cachedOwner: Scope? = null
private var cachedOwnerVerified: Boolean = false
private fun resolveOwner(scope: Scope): Scope? {
if (cachedOwner != null && cachedFrameId == scope.frameId && cachedOwnerVerified) {
val cached = cachedOwner!!
val candidate = if (depth == 0) scope else {
var s: Scope? = scope
var remaining = depth
while (s != null && remaining > 0) {
s = s.parent
remaining--
}
s
}
if (candidate === cached && candidate?.getSlotIndexOf(name) == slot) return cached
}
var s: Scope? = scope
var remaining = depth
while (s != null && remaining > 0) {
s = s.parent
remaining--
}
if (s == null || s.getSlotIndexOf(name) != slot) {
cachedOwner = null
cachedOwnerVerified = false
cachedFrameId = scope.frameId
return null
}
cachedOwner = s
cachedOwnerVerified = true
cachedFrameId = scope.frameId
return s
}
override suspend fun get(scope: Scope): ObjRecord {
scope.pos = atPos
val owner = resolveOwner(scope) ?: return fallbackRef.get(scope)
if (slot < 0 || slot >= owner.slotCount()) return fallbackRef.get(scope)
val rec = owner.getSlotRecord(slot)
if (rec.declaringClass != null && !canAccessMember(rec.visibility, rec.declaringClass, scope.currentClassCtx, name)) {
scope.raiseError(ObjIllegalAccessException(scope, "private field access"))
}
return rec
}
override suspend fun evalValue(scope: Scope): Obj {
scope.pos = atPos
val owner = resolveOwner(scope) ?: return fallbackRef.evalValue(scope)
if (slot < 0 || slot >= owner.slotCount()) return fallbackRef.evalValue(scope)
val rec = owner.getSlotRecord(slot)
if (rec.declaringClass != null && !canAccessMember(rec.visibility, rec.declaringClass, scope.currentClassCtx, name)) {
scope.raiseError(ObjIllegalAccessException(scope, "private field access"))
}
return scope.resolve(rec, name)
}
override suspend fun setAt(pos: Pos, scope: Scope, newValue: Obj) {
scope.pos = atPos
val owner = resolveOwner(scope) ?: run {
fallbackRef.setAt(pos, scope, newValue)
return
}
if (slot < 0 || slot >= owner.slotCount()) {
fallbackRef.setAt(pos, scope, newValue)
return
}
val rec = owner.getSlotRecord(slot)
if (rec.declaringClass != null && !canAccessMember(rec.visibility, rec.declaringClass, scope.currentClassCtx, name)) {
scope.raiseError(ObjIllegalAccessException(scope, "private field access"))
}
scope.assign(rec, name, newValue)
}
}
class ListLiteralRef(private val entries: List<ListEntry>) : ObjRef { class ListLiteralRef(private val entries: List<ListEntry>) : ObjRef {
override fun forEachVariable(block: (String) -> Unit) { override fun forEachVariable(block: (String) -> Unit) {
for (e in entries) { for (e in entries) {
@@ -1862,9 +2621,9 @@ class MapLiteralRef(private val entries: List<MapLiteralEntry>) : ObjRef {
* Range literal: left .. right or left ..< right. Right may be omitted in certain contexts. * Range literal: left .. right or left ..< right. Right may be omitted in certain contexts.
*/ */
class RangeRef( class RangeRef(
private val left: ObjRef?, internal val left: ObjRef?,
private val right: ObjRef?, internal val right: ObjRef?,
private val isEndInclusive: Boolean internal val isEndInclusive: Boolean
) : ObjRef { ) : ObjRef {
override suspend fun get(scope: Scope): ObjRecord { override suspend fun get(scope: Scope): ObjRecord {
return evalValue(scope).asReadonly return evalValue(scope).asReadonly
@@ -1910,7 +2669,15 @@ class AssignRef(
val v = value.evalValue(scope) val v = value.evalValue(scope)
// For properties, we should not call get() on target because it invokes the getter. // For properties, we should not call get() on target because it invokes the getter.
// Instead, we call setAt directly. // Instead, we call setAt directly.
if (target is FieldRef || target is IndexRef || target is LocalVarRef || target is FastLocalVarRef || target is BoundLocalVarRef) { if (target is FieldRef ||
target is IndexRef ||
target is LocalVarRef ||
target is FastLocalVarRef ||
target is BoundLocalVarRef ||
target is LocalSlotRef ||
target is ThisFieldSlotRef ||
target is QualifiedThisFieldSlotRef ||
target is ImplicitThisMemberRef) {
target.setAt(atPos, scope, v) target.setAt(atPos, scope, v)
} else { } else {
val rec = target.get(scope) val rec = target.get(scope)
@@ -1923,4 +2690,4 @@ class AssignRef(
} }
} }
// (duplicate LocalVarRef removed; the canonical implementation is defined earlier in this file) // (duplicate LocalVarRef removed; the canonical implementation is defined earlier in this file)
@@ -63,6 +63,13 @@ abstract class Statement(
} }
class ExpressionStatement(
val ref: net.sergeych.lyng.obj.ObjRef,
override val pos: Pos
) : Statement() {
override suspend fun execute(scope: Scope): Obj = ref.evalValue(scope)
}
fun Statement.raise(text: String): Nothing { fun Statement.raise(text: String): Nothing {
throw ScriptError(pos, text) throw ScriptError(pos, text)
} }
@@ -0,0 +1,51 @@
/*
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import kotlinx.coroutines.test.runTest
import net.sergeych.lyng.Benchmarks
import net.sergeych.lyng.eval
import net.sergeych.lyng.obj.ObjInt
import kotlin.time.TimeSource
import kotlin.test.Test
import kotlin.test.assertEquals
class NestedRangeBenchmarkTest {
@Test
fun benchmarkHappyNumbersNestedRanges() = runTest {
if (!Benchmarks.enabled) return@runTest
val script = """
fun naiveCountHappyNumbers() {
var count = 0
for( n1 in 0..9 )
for( n2 in 0..9 )
for( n3 in 0..9 )
for( n4 in 0..9 )
for( n5 in 0..9 )
for( n6 in 0..9 )
if( n1 + n2 + n3 == n4 + n5 + n6 ) count++
count
}
naiveCountHappyNumbers()
""".trimIndent()
val start = TimeSource.Monotonic.markNow()
val result = eval(script) as ObjInt
val elapsedMs = start.elapsedNow().inWholeMilliseconds
println("[DEBUG_LOG] [BENCH] nested-happy elapsed=${elapsedMs} ms")
assertEquals(55252L, result.value)
}
}
+15
View File
@@ -911,4 +911,19 @@ class OOTest {
assertEquals("{\"a\":\"foo\",\"b\":\"bar\"}",T("foo", "bar").toJsonString()) assertEquals("{\"a\":\"foo\",\"b\":\"bar\"}",T("foo", "bar").toJsonString())
""".trimIndent()) """.trimIndent())
} }
@Test
fun testAssignToUnqualifiedParams() = runTest {
eval("""
class T(x) {
fun setx(v) { x = v }
fun incr(v) { x += v }
}
val t = T(1)
t.setx(2)
assertEquals(2, t.x)
t.incr(3)
assertEquals(5, t.x)
""".trimIndent())
}
} }
@@ -5035,5 +5035,13 @@ class ScriptTest {
assertEquals(10.0, 15.5.clamp(0.0..10.0)) assertEquals(10.0, 15.5.clamp(0.0..10.0))
""".trimIndent()) """.trimIndent())
} }
@Test
fun testEmptySpreadList() = runTest {
eval("""
fun t(a, tags=[]) { [a, ...tags] }
assertEquals( [1], t(1) )
""".trimIndent())
}
} }
@@ -0,0 +1,99 @@
/*
* Copyright 2026 Sergey S. Chernov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import kotlinx.coroutines.test.runTest
import net.sergeych.lyng.eval
import kotlin.test.Test
class ValReassignRegressionTest {
@Test
fun reassign_ctor_param_field_should_work() = runTest {
eval(
"""
class Wallet(balance = 0) {
fun add(amount) {
balance += amount
}
fun transfer(amount) {
val balance = 0
add(amount)
}
fun get() { balance }
}
val w = Wallet()
w.transfer(1)
assertEquals(1, w.get())
""".trimIndent()
)
}
@Test
fun reassign_field_should_not_see_caller_locals() = runTest {
eval(
"""
class Wallet(balance = 0) {
fun add(amount) { balance += amount }
fun get() { balance }
}
fun doTransfer(w, amount) {
val balance = 0
w.add(amount)
}
val w = Wallet()
doTransfer(w, 2)
assertEquals(2, w.get())
""".trimIndent()
)
}
@Test
fun reassign_field_should_not_see_caller_param() = runTest {
eval(
"""
class Wallet(balance = 0) {
fun add(amount) { balance += amount }
fun get() { balance }
}
fun doTransfer(balance, w, amount) {
w.add(amount)
}
val w = Wallet()
doTransfer(0, w, 3)
assertEquals(3, w.get())
""".trimIndent()
)
}
@Test
fun reassign_field_should_not_see_block_local() = runTest {
eval(
"""
class Wallet(balance = 0) {
fun add(amount) { balance += amount }
fun get() { balance }
}
val w = Wallet()
run {
val balance = 0
w.add(4)
}
assertEquals(4, w.get())
""".trimIndent()
)
}
}
@@ -0,0 +1,22 @@
/*
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package net.sergeych.lyng
actual object Benchmarks {
actual val enabled: Boolean = false
}
@@ -0,0 +1,28 @@
/*
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package net.sergeych.lyng
actual object Benchmarks {
actual val enabled: Boolean = run {
val p = System.getProperty("LYNG_BENCHMARKS")?.lowercase()
val e = System.getenv("BENCHMARKS")?.lowercase()
fun parse(v: String?): Boolean =
v == "true" || v == "1" || v == "yes"
parse(p) || parse(e)
}
}
@@ -0,0 +1,33 @@
/*
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package net.sergeych.lyng
import kotlinx.cinterop.ExperimentalForeignApi
import kotlinx.cinterop.toKString
import platform.posix.getenv
@OptIn(ExperimentalForeignApi::class)
actual object Benchmarks {
actual val enabled: Boolean = run {
fun parse(v: String?): Boolean =
v == "true" || v == "1" || v == "yes"
val b = getenv("BENCHMARKS")?.toKString()?.lowercase()
val l = getenv("LYNG_BENCHMARKS")?.toKString()?.lowercase()
parse(b) || parse(l)
}
}
@@ -0,0 +1,22 @@
/*
* Copyright 2026 Sergey S. Chernov real.sergeych@gmail.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package net.sergeych.lyng
actual object Benchmarks {
actual val enabled: Boolean = false
}
+156
View File
@@ -0,0 +1,156 @@
Reusing configuration cache.
> Task :lynglib:jvmTestProcessResources NO-SOURCE
> Task :lyngio:jvmProcessResources NO-SOURCE
> Task :lynglib:kmpPartiallyResolvedDependenciesChecker
> Task :lyngio:processJvmMainResources SKIPPED
> Task :lynglib:processJvmTestResources SKIPPED
> Task :lynglib:jvmProcessResources NO-SOURCE
> Task :lynglib:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lyngio:kmpPartiallyResolvedDependenciesChecker
> Task :lynglib:processJvmMainResources SKIPPED
> Task :lyngio:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:generateLyngStdlib
> Task :lynglib:generateBuildKonfig
> Task :lynglib:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:228:25 'when' is exhaustive so 'else' is redundant here.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3044:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3076:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3109:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3317:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3713:42 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3724:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3783:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3894:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3950:66 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt:727:31 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:507:50 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:820:57 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:33:32 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:158:39 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:177:64 'val monthNumber: Int' is deprecated. Use the 'month' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:179:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:181:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:266:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:35:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:102:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:106:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:117:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:119:38 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:123:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:125:41 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:139:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:144:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:149:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:202:69 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:212:28 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:222:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:234:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:358:35 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:377:35 No cast needed.
> Task :lynglib:compileJvmMainJava NO-SOURCE
> Task :lynglib:jvmMainClasses
> Task :lynglib:jvmJar
> Task :lyngio:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:192:71 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:315:51 Redundant call of conversion method.
> Task :lyngio:compileJvmMainJava NO-SOURCE
> Task :lyngio:jvmMainClasses
> Task :lyngio:jvmJar
> Task :lynglib:compileTestKotlinJvm
> Task :lynglib:compileJvmTestJava NO-SOURCE
> Task :lynglib:jvmTestClasses
> Task :lynglib:jvmTest
ArithmeticBenchmarkTest[jvm] > benchmarkIntArithmeticAndComparisons[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=OFF]: 261.854157 ms
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=ON]: 143.359303 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=OFF]: 198.727671 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=ON]: 165.057842 ms
CallBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1212.62923 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1221.344844 ms
CallBenchmarkTest[jvm] > benchmarkSimpleFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=OFF]: 911.390453 ms
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=ON]: 864.74467 ms
CallMixedArityBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1258.596122 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1215.214754 ms
CallPoolingBenchmarkTest[jvm] > benchmarkScopePoolingOnFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=OFF]: 813.8911 ms
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=ON]: 840.201914 ms
CallSplatBenchmarkTest[jvm] > benchmarkCallsWithSplatArgs[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=OFF]: 721.329794 ms
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=ON]: 664.626564 ms
ConcurrencyCallBenchmarkTest[jvm] > benchmark_multithread_calls_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] ConcurrencyCallBenchmark workers=8 iters=15000 each: OFF=246.670 ms, ON=247.664 ms, speedup=1.00x
ExpressionBenchmarkTest[jvm] > benchmarkExpressionChains[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=OFF]: 358.568027 ms
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=ON]: 357.649314 ms
ExpressionBenchmarkTest[jvm] > benchmarkListIndexReads[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=OFF]: 210.029012 ms
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=ON]: 197.480796 ms
ExpressionBenchmarkTest[jvm] > benchmarkFieldReadPureReceiver[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=OFF]: 189.724828 ms
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=ON]: 171.944462 ms
ListOpsBenchmarkTest[jvm] > benchmarkSumInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=OFF]: 155.800531 ms
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=ON]: 159.326021 ms
ListOpsBenchmarkTest[jvm] > benchmarkContainsInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=OFF]: 493.764263 ms
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=ON]: 473.911057 ms
LocalVarBenchmarkTest[jvm] > benchmarkLocalReadsWrites_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] locals x400000 [PIC=OFF, FAST_LOCAL=OFF]: 414.496391 ms
[DEBUG_LOG] [BENCH] locals x400000 [PIC=ON, FAST_LOCAL=ON]: 379.154141 ms
MethodPoolingBenchmarkTest[jvm] > benchmarkInstanceMethodCallsWithPooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=OFF]: 395.901223 ms
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=ON]: 361.008923 ms
MixedBenchmarkTest[jvm] > benchmarkMixedWorkloadRvalFastpath[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=OFF]: 614.851677 ms
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=ON]: 606.423947 ms
PicBenchmarkTest[jvm] > benchmarkMethodPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Method PIC=OFF, POOL=OFF: 322.701469 ms
[DEBUG_LOG] [BENCH] Method PIC=ON, POOL=ON: 332.466691 ms
PicBenchmarkTest[jvm] > benchmarkFieldGetSetPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Field PIC=OFF: 125.613919 ms
[DEBUG_LOG] [BENCH] Field PIC=ON: 127.188579 ms
PicBenchmarkTest[jvm] > benchmarkLoopScopePooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Loop Pool=OFF: 271.994907 ms
[DEBUG_LOG] [BENCH] Loop Pool=ON: 269.043016 ms
RangeBenchmarkTest[jvm] > benchmarkIntRangeForIn[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=OFF]: 1224.41111 ms
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=ON]: 1159.586817 ms
RegexBenchmarkTest[jvm] > benchmarkDynamicPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=OFF]: 494.4744 ms
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=ON]: 420.160566 ms
RegexBenchmarkTest[jvm] > benchmarkLiteralPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=OFF]: 632.699991 ms
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=ON]: 558.980979 ms
BUILD SUCCESSFUL in 32s
10 actionable tasks: 10 executed
Configuration cache entry reused.
+157
View File
@@ -0,0 +1,157 @@
Reusing configuration cache.
> Task :lynglib:jvmTestProcessResources NO-SOURCE
> Task :lynglib:jvmProcessResources NO-SOURCE
> Task :lyngio:jvmProcessResources NO-SOURCE
> Task :lynglib:kmpPartiallyResolvedDependenciesChecker
> Task :lyngio:kmpPartiallyResolvedDependenciesChecker
> Task :lyngio:processJvmMainResources SKIPPED
> Task :lynglib:processJvmMainResources SKIPPED
> Task :lyngio:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:processJvmTestResources SKIPPED
> Task :lynglib:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:generateLyngStdlib
> Task :lynglib:generateBuildKonfig
> Task :lynglib:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Arguments.kt:171:13 Check for instance is always 'true'.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:228:25 'when' is exhaustive so 'else' is redundant here.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3044:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3076:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3109:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3317:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3713:42 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3724:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3783:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3894:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3950:66 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt:727:31 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:507:50 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:820:57 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:33:32 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:158:39 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:177:64 'val monthNumber: Int' is deprecated. Use the 'month' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:179:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:181:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:266:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:35:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:102:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:106:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:117:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:119:38 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:123:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:125:41 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:139:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:144:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:149:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:202:69 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:212:28 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:222:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:234:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:432:35 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:451:35 No cast needed.
> Task :lynglib:compileJvmMainJava NO-SOURCE
> Task :lynglib:jvmMainClasses
> Task :lynglib:jvmJar
> Task :lyngio:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:192:71 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:315:51 Redundant call of conversion method.
> Task :lyngio:compileJvmMainJava NO-SOURCE
> Task :lyngio:jvmMainClasses
> Task :lyngio:jvmJar
> Task :lynglib:compileTestKotlinJvm
> Task :lynglib:compileJvmTestJava NO-SOURCE
> Task :lynglib:jvmTestClasses
> Task :lynglib:jvmTest
ArithmeticBenchmarkTest[jvm] > benchmarkIntArithmeticAndComparisons[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=OFF]: 262.456983 ms
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=ON]: 143.016118 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=OFF]: 204.504575 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=ON]: 169.943911 ms
CallBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1249.839264 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1222.298584 ms
CallBenchmarkTest[jvm] > benchmarkSimpleFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=OFF]: 901.399509 ms
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=ON]: 862.404202 ms
CallMixedArityBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1288.885586 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1240.515769 ms
CallPoolingBenchmarkTest[jvm] > benchmarkScopePoolingOnFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=OFF]: 818.753611 ms
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=ON]: 846.609202 ms
CallSplatBenchmarkTest[jvm] > benchmarkCallsWithSplatArgs[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=OFF]: 673.750784 ms
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=ON]: 656.929851 ms
ConcurrencyCallBenchmarkTest[jvm] > benchmark_multithread_calls_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] ConcurrencyCallBenchmark workers=8 iters=15000 each: OFF=277.571 ms, ON=278.333 ms, speedup=1.00x
ExpressionBenchmarkTest[jvm] > benchmarkExpressionChains[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=OFF]: 352.770834 ms
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=ON]: 350.420946 ms
ExpressionBenchmarkTest[jvm] > benchmarkListIndexReads[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=OFF]: 203.043167 ms
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=ON]: 191.784157 ms
ExpressionBenchmarkTest[jvm] > benchmarkFieldReadPureReceiver[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=OFF]: 190.975557 ms
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=ON]: 173.62457 ms
ListOpsBenchmarkTest[jvm] > benchmarkSumInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=OFF]: 162.948512 ms
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=ON]: 161.115548 ms
ListOpsBenchmarkTest[jvm] > benchmarkContainsInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=OFF]: 481.70436 ms
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=ON]: 457.081838 ms
LocalVarBenchmarkTest[jvm] > benchmarkLocalReadsWrites_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] locals x400000 [PIC=OFF, FAST_LOCAL=OFF]: 416.136033 ms
[DEBUG_LOG] [BENCH] locals x400000 [PIC=ON, FAST_LOCAL=ON]: 377.996669 ms
MethodPoolingBenchmarkTest[jvm] > benchmarkInstanceMethodCallsWithPooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=OFF]: 415.789128 ms
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=ON]: 369.789878 ms
MixedBenchmarkTest[jvm] > benchmarkMixedWorkloadRvalFastpath[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=OFF]: 615.689206 ms
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=ON]: 604.213533 ms
PicBenchmarkTest[jvm] > benchmarkMethodPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Method PIC=OFF, POOL=OFF: 330.268329 ms
[DEBUG_LOG] [BENCH] Method PIC=ON, POOL=ON: 331.937563 ms
PicBenchmarkTest[jvm] > benchmarkFieldGetSetPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Field PIC=OFF: 130.221941 ms
[DEBUG_LOG] [BENCH] Field PIC=ON: 129.656747 ms
PicBenchmarkTest[jvm] > benchmarkLoopScopePooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Loop Pool=OFF: 280.648819 ms
[DEBUG_LOG] [BENCH] Loop Pool=ON: 276.585595 ms
RangeBenchmarkTest[jvm] > benchmarkIntRangeForIn[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=OFF]: 1244.04352 ms
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=ON]: 1181.395693 ms
RegexBenchmarkTest[jvm] > benchmarkDynamicPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=OFF]: 455.504952 ms
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=ON]: 388.443547 ms
RegexBenchmarkTest[jvm] > benchmarkLiteralPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=OFF]: 628.199793 ms
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=ON]: 574.342775 ms
BUILD SUCCESSFUL in 32s
10 actionable tasks: 10 executed
Configuration cache entry reused.
+156
View File
@@ -0,0 +1,156 @@
Reusing configuration cache.
> Task :lynglib:jvmProcessResources NO-SOURCE
> Task :lynglib:jvmTestProcessResources NO-SOURCE
> Task :lyngio:jvmProcessResources NO-SOURCE
> Task :lynglib:processJvmTestResources SKIPPED
> Task :lyngio:processJvmMainResources SKIPPED
> Task :lynglib:kmpPartiallyResolvedDependenciesChecker
> Task :lynglib:processJvmMainResources SKIPPED
> Task :lynglib:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lyngio:kmpPartiallyResolvedDependenciesChecker
> Task :lyngio:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:generateLyngStdlib
> Task :lynglib:generateBuildKonfig
> Task :lynglib:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:228:25 'when' is exhaustive so 'else' is redundant here.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3044:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3076:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3109:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3317:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3713:42 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3724:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3783:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3894:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3950:66 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt:727:31 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:507:50 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:820:57 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:33:32 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:158:39 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:177:64 'val monthNumber: Int' is deprecated. Use the 'month' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:179:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:181:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:266:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:35:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:102:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:106:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:117:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:119:38 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:123:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:125:41 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:139:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:144:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:149:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:202:69 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:212:28 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:222:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:234:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:432:35 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:451:35 No cast needed.
> Task :lynglib:compileJvmMainJava NO-SOURCE
> Task :lynglib:jvmMainClasses
> Task :lynglib:jvmJar
> Task :lyngio:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:192:71 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:315:51 Redundant call of conversion method.
> Task :lyngio:compileJvmMainJava NO-SOURCE
> Task :lyngio:jvmMainClasses
> Task :lyngio:jvmJar
> Task :lynglib:compileTestKotlinJvm
> Task :lynglib:compileJvmTestJava NO-SOURCE
> Task :lynglib:jvmTestClasses
> Task :lynglib:jvmTest
ArithmeticBenchmarkTest[jvm] > benchmarkIntArithmeticAndComparisons[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=OFF]: 261.781459 ms
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=ON]: 145.930937 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=OFF]: 198.865061 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=ON]: 166.602828 ms
CallBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1247.05106 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1281.54336 ms
CallBenchmarkTest[jvm] > benchmarkSimpleFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=OFF]: 883.211818 ms
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=ON]: 865.689378 ms
CallMixedArityBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1233.018601 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1481.964038 ms
CallPoolingBenchmarkTest[jvm] > benchmarkScopePoolingOnFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=OFF]: 888.881526 ms
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=ON]: 849.302933 ms
CallSplatBenchmarkTest[jvm] > benchmarkCallsWithSplatArgs[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=OFF]: 665.365 ms
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=ON]: 663.883057 ms
ConcurrencyCallBenchmarkTest[jvm] > benchmark_multithread_calls_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] ConcurrencyCallBenchmark workers=8 iters=15000 each: OFF=247.421 ms, ON=260.564 ms, speedup=0.95x
ExpressionBenchmarkTest[jvm] > benchmarkExpressionChains[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=OFF]: 353.794891 ms
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=ON]: 353.008114 ms
ExpressionBenchmarkTest[jvm] > benchmarkListIndexReads[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=OFF]: 202.620604 ms
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=ON]: 188.753098 ms
ExpressionBenchmarkTest[jvm] > benchmarkFieldReadPureReceiver[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=OFF]: 187.350501 ms
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=ON]: 172.926716 ms
ListOpsBenchmarkTest[jvm] > benchmarkSumInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=OFF]: 159.856375 ms
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=ON]: 173.291963 ms
ListOpsBenchmarkTest[jvm] > benchmarkContainsInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=OFF]: 484.924666 ms
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=ON]: 470.462696 ms
LocalVarBenchmarkTest[jvm] > benchmarkLocalReadsWrites_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] locals x400000 [PIC=OFF, FAST_LOCAL=OFF]: 418.550739 ms
[DEBUG_LOG] [BENCH] locals x400000 [PIC=ON, FAST_LOCAL=ON]: 377.176886 ms
MethodPoolingBenchmarkTest[jvm] > benchmarkInstanceMethodCallsWithPooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=OFF]: 398.385204 ms
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=ON]: 361.726326 ms
MixedBenchmarkTest[jvm] > benchmarkMixedWorkloadRvalFastpath[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=OFF]: 606.153624 ms
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=ON]: 602.269093 ms
PicBenchmarkTest[jvm] > benchmarkMethodPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Method PIC=OFF, POOL=OFF: 327.139818 ms
[DEBUG_LOG] [BENCH] Method PIC=ON, POOL=ON: 326.264549 ms
PicBenchmarkTest[jvm] > benchmarkFieldGetSetPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Field PIC=OFF: 127.960191 ms
[DEBUG_LOG] [BENCH] Field PIC=ON: 133.286108 ms
PicBenchmarkTest[jvm] > benchmarkLoopScopePooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Loop Pool=OFF: 289.541793 ms
[DEBUG_LOG] [BENCH] Loop Pool=ON: 272.736055 ms
RangeBenchmarkTest[jvm] > benchmarkIntRangeForIn[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=OFF]: 1238.097545 ms
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=ON]: 1189.624292 ms
RegexBenchmarkTest[jvm] > benchmarkDynamicPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=OFF]: 447.781066 ms
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=ON]: 373.556778 ms
RegexBenchmarkTest[jvm] > benchmarkLiteralPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=OFF]: 574.938314 ms
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=ON]: 537.896984 ms
BUILD SUCCESSFUL in 32s
10 actionable tasks: 10 executed
Configuration cache entry reused.
+156
View File
@@ -0,0 +1,156 @@
Reusing configuration cache.
> Task :lyngio:jvmProcessResources NO-SOURCE
> Task :lynglib:jvmProcessResources NO-SOURCE
> Task :lynglib:jvmTestProcessResources NO-SOURCE
> Task :lynglib:kmpPartiallyResolvedDependenciesChecker
> Task :lynglib:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lyngio:kmpPartiallyResolvedDependenciesChecker
> Task :lyngio:processJvmMainResources SKIPPED
> Task :lynglib:processJvmTestResources SKIPPED
> Task :lynglib:processJvmMainResources SKIPPED
> Task :lyngio:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:generateLyngStdlib
> Task :lynglib:generateBuildKonfig
> Task :lynglib:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:228:25 'when' is exhaustive so 'else' is redundant here.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3044:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3076:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3109:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3320:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3716:42 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3727:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3786:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3897:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3953:66 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt:727:31 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:507:50 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:820:57 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:33:32 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:158:39 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:177:64 'val monthNumber: Int' is deprecated. Use the 'month' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:179:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:181:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:266:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:35:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:102:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:106:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:117:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:119:38 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:123:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:125:41 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:139:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:144:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:149:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:202:69 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:212:28 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:222:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:234:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:432:35 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:451:35 No cast needed.
> Task :lynglib:compileJvmMainJava NO-SOURCE
> Task :lynglib:jvmMainClasses
> Task :lynglib:jvmJar
> Task :lyngio:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:192:71 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:315:51 Redundant call of conversion method.
> Task :lyngio:compileJvmMainJava NO-SOURCE
> Task :lyngio:jvmMainClasses
> Task :lyngio:jvmJar
> Task :lynglib:compileTestKotlinJvm
> Task :lynglib:compileJvmTestJava NO-SOURCE
> Task :lynglib:jvmTestClasses
> Task :lynglib:jvmTest
ArithmeticBenchmarkTest[jvm] > benchmarkIntArithmeticAndComparisons[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=OFF]: 253.651654 ms
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=ON]: 146.390764 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=OFF]: 197.226054 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=ON]: 168.955589 ms
CallBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1256.240598 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1270.063908 ms
CallBenchmarkTest[jvm] > benchmarkSimpleFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=OFF]: 896.05655 ms
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=ON]: 908.729676 ms
CallMixedArityBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1275.701226 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1262.923161 ms
CallPoolingBenchmarkTest[jvm] > benchmarkScopePoolingOnFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=OFF]: 904.80078 ms
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=ON]: 843.661706 ms
CallSplatBenchmarkTest[jvm] > benchmarkCallsWithSplatArgs[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=OFF]: 693.294337 ms
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=ON]: 655.907501 ms
ConcurrencyCallBenchmarkTest[jvm] > benchmark_multithread_calls_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] ConcurrencyCallBenchmark workers=8 iters=15000 each: OFF=246.831 ms, ON=249.673 ms, speedup=0.99x
ExpressionBenchmarkTest[jvm] > benchmarkExpressionChains[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=OFF]: 363.565902 ms
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=ON]: 357.239034 ms
ExpressionBenchmarkTest[jvm] > benchmarkListIndexReads[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=OFF]: 205.439227 ms
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=ON]: 192.811329 ms
ExpressionBenchmarkTest[jvm] > benchmarkFieldReadPureReceiver[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=OFF]: 190.153039 ms
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=ON]: 171.03625 ms
ListOpsBenchmarkTest[jvm] > benchmarkSumInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=OFF]: 171.823152 ms
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=ON]: 172.076498 ms
ListOpsBenchmarkTest[jvm] > benchmarkContainsInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=OFF]: 470.255577 ms
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=ON]: 452.226068 ms
LocalVarBenchmarkTest[jvm] > benchmarkLocalReadsWrites_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] locals x400000 [PIC=OFF, FAST_LOCAL=OFF]: 425.250966 ms
[DEBUG_LOG] [BENCH] locals x400000 [PIC=ON, FAST_LOCAL=ON]: 372.065608 ms
MethodPoolingBenchmarkTest[jvm] > benchmarkInstanceMethodCallsWithPooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=OFF]: 425.557633 ms
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=ON]: 398.662616 ms
MixedBenchmarkTest[jvm] > benchmarkMixedWorkloadRvalFastpath[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=OFF]: 670.172011 ms
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=ON]: 654.491316 ms
PicBenchmarkTest[jvm] > benchmarkMethodPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Method PIC=OFF, POOL=OFF: 368.642342 ms
[DEBUG_LOG] [BENCH] Method PIC=ON, POOL=ON: 371.610689 ms
PicBenchmarkTest[jvm] > benchmarkFieldGetSetPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Field PIC=OFF: 132.834786 ms
[DEBUG_LOG] [BENCH] Field PIC=ON: 128.264586 ms
PicBenchmarkTest[jvm] > benchmarkLoopScopePooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Loop Pool=OFF: 271.281035 ms
[DEBUG_LOG] [BENCH] Loop Pool=ON: 265.903301 ms
RangeBenchmarkTest[jvm] > benchmarkIntRangeForIn[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=OFF]: 1239.838114 ms
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=ON]: 1170.640179 ms
RegexBenchmarkTest[jvm] > benchmarkDynamicPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=OFF]: 440.47053 ms
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=ON]: 372.095174 ms
RegexBenchmarkTest[jvm] > benchmarkLiteralPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=OFF]: 611.454512 ms
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=ON]: 553.868896 ms
BUILD SUCCESSFUL in 32s
10 actionable tasks: 10 executed
Configuration cache entry reused.
+156
View File
@@ -0,0 +1,156 @@
Reusing configuration cache.
> Task :lyngio:jvmProcessResources NO-SOURCE
> Task :lynglib:jvmProcessResources NO-SOURCE
> Task :lynglib:jvmTestProcessResources NO-SOURCE
> Task :lynglib:processJvmMainResources SKIPPED
> Task :lyngio:processJvmMainResources SKIPPED
> Task :lynglib:processJvmTestResources SKIPPED
> Task :lynglib:kmpPartiallyResolvedDependenciesChecker
> Task :lyngio:kmpPartiallyResolvedDependenciesChecker
> Task :lynglib:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lyngio:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:generateLyngStdlib
> Task :lynglib:generateBuildKonfig
> Task :lynglib:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:228:25 'when' is exhaustive so 'else' is redundant here.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3096:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3128:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3161:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3372:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3768:42 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3779:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3838:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3949:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:4005:66 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt:727:31 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:507:50 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:820:57 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:33:32 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:158:39 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:177:64 'val monthNumber: Int' is deprecated. Use the 'month' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:179:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:181:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:266:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:35:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:102:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:106:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:117:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:119:38 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:123:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:125:41 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:139:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:144:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:149:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:202:69 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:212:28 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:222:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:234:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:432:35 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:451:35 No cast needed.
> Task :lynglib:compileJvmMainJava NO-SOURCE
> Task :lynglib:jvmMainClasses
> Task :lynglib:jvmJar
> Task :lyngio:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:192:71 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:315:51 Redundant call of conversion method.
> Task :lyngio:compileJvmMainJava NO-SOURCE
> Task :lyngio:jvmMainClasses
> Task :lyngio:jvmJar
> Task :lynglib:compileTestKotlinJvm
> Task :lynglib:compileJvmTestJava NO-SOURCE
> Task :lynglib:jvmTestClasses
> Task :lynglib:jvmTest
ArithmeticBenchmarkTest[jvm] > benchmarkIntArithmeticAndComparisons[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=OFF]: 268.708055 ms
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=ON]: 146.48493 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=OFF]: 200.079276 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=ON]: 163.315912 ms
CallBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1553.293592 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1473.171537 ms
CallBenchmarkTest[jvm] > benchmarkSimpleFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=OFF]: 1069.276106 ms
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=ON]: 938.902009 ms
CallMixedArityBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1272.837347 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1232.000995 ms
CallPoolingBenchmarkTest[jvm] > benchmarkScopePoolingOnFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=OFF]: 821.533602 ms
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=ON]: 845.562175 ms
CallSplatBenchmarkTest[jvm] > benchmarkCallsWithSplatArgs[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=OFF]: 713.778041 ms
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=ON]: 658.92245 ms
ConcurrencyCallBenchmarkTest[jvm] > benchmark_multithread_calls_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] ConcurrencyCallBenchmark workers=8 iters=15000 each: OFF=258.841 ms, ON=260.836 ms, speedup=0.99x
ExpressionBenchmarkTest[jvm] > benchmarkExpressionChains[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=OFF]: 359.929596 ms
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=ON]: 355.440048 ms
ExpressionBenchmarkTest[jvm] > benchmarkListIndexReads[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=OFF]: 201.239366 ms
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=ON]: 193.027976 ms
ExpressionBenchmarkTest[jvm] > benchmarkFieldReadPureReceiver[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=OFF]: 193.231822 ms
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=ON]: 169.126707 ms
ListOpsBenchmarkTest[jvm] > benchmarkSumInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=OFF]: 152.807956 ms
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=ON]: 155.12379 ms
ListOpsBenchmarkTest[jvm] > benchmarkContainsInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=OFF]: 487.13174 ms
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=ON]: 458.34973 ms
LocalVarBenchmarkTest[jvm] > benchmarkLocalReadsWrites_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] locals x400000 [PIC=OFF, FAST_LOCAL=OFF]: 420.451323 ms
[DEBUG_LOG] [BENCH] locals x400000 [PIC=ON, FAST_LOCAL=ON]: 380.196618 ms
MethodPoolingBenchmarkTest[jvm] > benchmarkInstanceMethodCallsWithPooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=OFF]: 407.040834 ms
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=ON]: 376.63534 ms
MixedBenchmarkTest[jvm] > benchmarkMixedWorkloadRvalFastpath[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=OFF]: 651.947325 ms
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=ON]: 665.276754 ms
PicBenchmarkTest[jvm] > benchmarkMethodPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Method PIC=OFF, POOL=OFF: 343.185945 ms
[DEBUG_LOG] [BENCH] Method PIC=ON, POOL=ON: 333.229274 ms
PicBenchmarkTest[jvm] > benchmarkFieldGetSetPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Field PIC=OFF: 128.027033 ms
[DEBUG_LOG] [BENCH] Field PIC=ON: 128.223778 ms
PicBenchmarkTest[jvm] > benchmarkLoopScopePooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Loop Pool=OFF: 272.765371 ms
[DEBUG_LOG] [BENCH] Loop Pool=ON: 267.282587 ms
RangeBenchmarkTest[jvm] > benchmarkIntRangeForIn[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=OFF]: 1222.526972 ms
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=ON]: 1156.325094 ms
RegexBenchmarkTest[jvm] > benchmarkDynamicPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=OFF]: 454.25713 ms
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=ON]: 435.042988 ms
RegexBenchmarkTest[jvm] > benchmarkLiteralPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=OFF]: 646.493027 ms
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=ON]: 581.51493 ms
BUILD SUCCESSFUL in 33s
10 actionable tasks: 10 executed
Configuration cache entry reused.
+157
View File
@@ -0,0 +1,157 @@
Reusing configuration cache.
> Task :lyngio:jvmProcessResources NO-SOURCE
> Task :lynglib:jvmProcessResources NO-SOURCE
> Task :lynglib:jvmTestProcessResources NO-SOURCE
> Task :lynglib:processJvmMainResources SKIPPED
> Task :lyngio:processJvmMainResources SKIPPED
> Task :lyngio:kmpPartiallyResolvedDependenciesChecker
> Task :lynglib:kmpPartiallyResolvedDependenciesChecker
> Task :lynglib:processJvmTestResources SKIPPED
> Task :lynglib:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lyngio:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:generateLyngStdlib
> Task :lynglib:generateBuildKonfig
> Task :lynglib:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:228:25 'when' is exhaustive so 'else' is redundant here.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3044:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3076:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3109:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3317:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3713:42 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3724:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3783:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3894:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3950:66 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt:727:31 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:507:50 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:820:57 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:33:32 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:158:39 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:177:64 'val monthNumber: Int' is deprecated. Use the 'month' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:179:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:181:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:266:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:35:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:102:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:106:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:117:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:119:38 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:123:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:125:41 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:139:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:144:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:149:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:202:69 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:212:28 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:222:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:234:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInt.kt:169:37 Redundant call of conversion method.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:432:35 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:451:35 No cast needed.
> Task :lynglib:compileJvmMainJava NO-SOURCE
> Task :lynglib:jvmMainClasses
> Task :lynglib:jvmJar
> Task :lyngio:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:192:71 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:315:51 Redundant call of conversion method.
> Task :lyngio:compileJvmMainJava NO-SOURCE
> Task :lyngio:jvmMainClasses
> Task :lyngio:jvmJar
> Task :lynglib:compileTestKotlinJvm
> Task :lynglib:compileJvmTestJava NO-SOURCE
> Task :lynglib:jvmTestClasses
> Task :lynglib:jvmTest
ArithmeticBenchmarkTest[jvm] > benchmarkIntArithmeticAndComparisons[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=OFF]: 261.750618 ms
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=ON]: 146.453823 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=OFF]: 195.212879 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=ON]: 162.023578 ms
CallBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1500.893007 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1470.571042 ms
CallBenchmarkTest[jvm] > benchmarkSimpleFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=OFF]: 1069.296265 ms
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=ON]: 979.876815 ms
CallMixedArityBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1282.033869 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1219.102212 ms
CallPoolingBenchmarkTest[jvm] > benchmarkScopePoolingOnFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=OFF]: 817.077586 ms
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=ON]: 836.022994 ms
CallSplatBenchmarkTest[jvm] > benchmarkCallsWithSplatArgs[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=OFF]: 694.858051 ms
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=ON]: 657.045255 ms
ConcurrencyCallBenchmarkTest[jvm] > benchmark_multithread_calls_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] ConcurrencyCallBenchmark workers=8 iters=15000 each: OFF=257.782 ms, ON=248.041 ms, speedup=1.04x
ExpressionBenchmarkTest[jvm] > benchmarkExpressionChains[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=OFF]: 352.616677 ms
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=ON]: 342.878941 ms
ExpressionBenchmarkTest[jvm] > benchmarkListIndexReads[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=OFF]: 199.536636 ms
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=ON]: 184.094618 ms
ExpressionBenchmarkTest[jvm] > benchmarkFieldReadPureReceiver[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=OFF]: 192.697462 ms
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=ON]: 169.343891 ms
ListOpsBenchmarkTest[jvm] > benchmarkSumInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=OFF]: 172.952628 ms
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=ON]: 175.110539 ms
ListOpsBenchmarkTest[jvm] > benchmarkContainsInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=OFF]: 474.235439 ms
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=ON]: 447.779765 ms
LocalVarBenchmarkTest[jvm] > benchmarkLocalReadsWrites_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] locals x400000 [PIC=OFF, FAST_LOCAL=OFF]: 416.685434 ms
[DEBUG_LOG] [BENCH] locals x400000 [PIC=ON, FAST_LOCAL=ON]: 385.882443 ms
MethodPoolingBenchmarkTest[jvm] > benchmarkInstanceMethodCallsWithPooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=OFF]: 404.699708 ms
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=ON]: 363.070008 ms
MixedBenchmarkTest[jvm] > benchmarkMixedWorkloadRvalFastpath[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=OFF]: 624.839841 ms
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=ON]: 615.958067 ms
PicBenchmarkTest[jvm] > benchmarkMethodPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Method PIC=OFF, POOL=OFF: 329.06723 ms
[DEBUG_LOG] [BENCH] Method PIC=ON, POOL=ON: 345.786502 ms
PicBenchmarkTest[jvm] > benchmarkFieldGetSetPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Field PIC=OFF: 127.328515 ms
[DEBUG_LOG] [BENCH] Field PIC=ON: 128.997015 ms
PicBenchmarkTest[jvm] > benchmarkLoopScopePooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Loop Pool=OFF: 275.285879 ms
[DEBUG_LOG] [BENCH] Loop Pool=ON: 272.488545 ms
RangeBenchmarkTest[jvm] > benchmarkIntRangeForIn[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=OFF]: 1007.052847 ms
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=ON]: 942.271572 ms
RegexBenchmarkTest[jvm] > benchmarkDynamicPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=OFF]: 501.928282 ms
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=ON]: 431.511816 ms
RegexBenchmarkTest[jvm] > benchmarkLiteralPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=OFF]: 713.844255 ms
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=ON]: 670.054138 ms
BUILD SUCCESSFUL in 32s
10 actionable tasks: 10 executed
Configuration cache entry reused.
+157
View File
@@ -0,0 +1,157 @@
Reusing configuration cache.
> Task :lynglib:jvmProcessResources NO-SOURCE
> Task :lynglib:jvmTestProcessResources NO-SOURCE
> Task :lynglib:processJvmMainResources SKIPPED
> Task :lynglib:kmpPartiallyResolvedDependenciesChecker
> Task :lynglib:processJvmTestResources SKIPPED
> Task :lyngio:jvmProcessResources NO-SOURCE
> Task :lynglib:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lyngio:processJvmMainResources SKIPPED
> Task :lyngio:kmpPartiallyResolvedDependenciesChecker
> Task :lyngio:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:generateLyngStdlib
> Task :lynglib:generateBuildKonfig
> Task :lynglib:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:228:25 'when' is exhaustive so 'else' is redundant here.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3077:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3109:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3142:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3350:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3746:42 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3757:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3816:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3927:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3983:66 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt:727:31 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:507:50 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:820:57 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:33:32 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:158:39 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:177:64 'val monthNumber: Int' is deprecated. Use the 'month' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:179:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:181:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:266:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:35:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:102:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:106:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:117:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:119:38 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:123:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:125:41 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:139:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:144:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:149:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:202:69 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:212:28 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:222:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:234:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInt.kt:169:37 Redundant call of conversion method.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:432:35 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:451:35 No cast needed.
> Task :lynglib:compileJvmMainJava NO-SOURCE
> Task :lynglib:jvmMainClasses
> Task :lynglib:jvmJar
> Task :lyngio:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:192:71 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:315:51 Redundant call of conversion method.
> Task :lyngio:compileJvmMainJava NO-SOURCE
> Task :lyngio:jvmMainClasses
> Task :lyngio:jvmJar
> Task :lynglib:compileTestKotlinJvm
> Task :lynglib:compileJvmTestJava NO-SOURCE
> Task :lynglib:jvmTestClasses
> Task :lynglib:jvmTest
ArithmeticBenchmarkTest[jvm] > benchmarkIntArithmeticAndComparisons[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=OFF]: 255.650854 ms
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=ON]: 145.478367 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=OFF]: 194.190057 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=ON]: 161.917102 ms
CallBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1553.057072 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1240.793002 ms
CallBenchmarkTest[jvm] > benchmarkSimpleFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=OFF]: 944.216355 ms
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=ON]: 1009.585989 ms
CallMixedArityBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1539.226472 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1454.032021 ms
CallPoolingBenchmarkTest[jvm] > benchmarkScopePoolingOnFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=OFF]: 977.674848 ms
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=ON]: 990.058604 ms
CallSplatBenchmarkTest[jvm] > benchmarkCallsWithSplatArgs[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=OFF]: 853.990613 ms
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=ON]: 786.133583 ms
ConcurrencyCallBenchmarkTest[jvm] > benchmark_multithread_calls_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] ConcurrencyCallBenchmark workers=8 iters=15000 each: OFF=268.317 ms, ON=280.306 ms, speedup=0.96x
ExpressionBenchmarkTest[jvm] > benchmarkExpressionChains[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=OFF]: 373.337982 ms
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=ON]: 363.041028 ms
ExpressionBenchmarkTest[jvm] > benchmarkListIndexReads[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=OFF]: 203.456039 ms
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=ON]: 189.400538 ms
ExpressionBenchmarkTest[jvm] > benchmarkFieldReadPureReceiver[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=OFF]: 191.685426 ms
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=ON]: 172.746472 ms
ListOpsBenchmarkTest[jvm] > benchmarkSumInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=OFF]: 172.601148 ms
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=ON]: 175.298872 ms
ListOpsBenchmarkTest[jvm] > benchmarkContainsInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=OFF]: 480.488372 ms
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=ON]: 449.23481 ms
LocalVarBenchmarkTest[jvm] > benchmarkLocalReadsWrites_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] locals x400000 [PIC=OFF, FAST_LOCAL=OFF]: 428.089067 ms
[DEBUG_LOG] [BENCH] locals x400000 [PIC=ON, FAST_LOCAL=ON]: 392.908699 ms
MethodPoolingBenchmarkTest[jvm] > benchmarkInstanceMethodCallsWithPooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=OFF]: 409.659747 ms
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=ON]: 367.216414 ms
MixedBenchmarkTest[jvm] > benchmarkMixedWorkloadRvalFastpath[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=OFF]: 608.613603 ms
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=ON]: 626.039278 ms
PicBenchmarkTest[jvm] > benchmarkMethodPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Method PIC=OFF, POOL=OFF: 325.012701 ms
[DEBUG_LOG] [BENCH] Method PIC=ON, POOL=ON: 321.701777 ms
PicBenchmarkTest[jvm] > benchmarkFieldGetSetPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Field PIC=OFF: 127.06677 ms
[DEBUG_LOG] [BENCH] Field PIC=ON: 129.773497 ms
PicBenchmarkTest[jvm] > benchmarkLoopScopePooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Loop Pool=OFF: 279.046361 ms
[DEBUG_LOG] [BENCH] Loop Pool=ON: 271.50303 ms
RangeBenchmarkTest[jvm] > benchmarkIntRangeForIn[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=OFF]: 1022.352328 ms
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=ON]: 964.474767 ms
RegexBenchmarkTest[jvm] > benchmarkDynamicPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=OFF]: 496.707269 ms
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=ON]: 442.890336 ms
RegexBenchmarkTest[jvm] > benchmarkLiteralPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=OFF]: 695.24589 ms
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=ON]: 579.05104 ms
BUILD SUCCESSFUL in 34s
10 actionable tasks: 10 executed
Configuration cache entry reused.
+157
View File
@@ -0,0 +1,157 @@
Reusing configuration cache.
> Task :lynglib:jvmProcessResources NO-SOURCE
> Task :lyngio:kmpPartiallyResolvedDependenciesChecker
> Task :lyngio:jvmProcessResources NO-SOURCE
> Task :lynglib:kmpPartiallyResolvedDependenciesChecker
> Task :lynglib:processJvmMainResources SKIPPED
> Task :lynglib:jvmTestProcessResources NO-SOURCE
> Task :lyngio:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lyngio:processJvmMainResources SKIPPED
> Task :lynglib:processJvmTestResources SKIPPED
> Task :lynglib:generateLyngStdlib
> Task :lynglib:generateBuildKonfig
> Task :lynglib:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:228:25 'when' is exhaustive so 'else' is redundant here.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3077:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3109:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3142:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3350:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3746:42 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3757:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3816:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3927:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3983:66 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt:727:31 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:507:50 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:820:57 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:33:32 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:158:39 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:177:64 'val monthNumber: Int' is deprecated. Use the 'month' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:179:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:181:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:266:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:35:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:102:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:106:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:117:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:119:38 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:123:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:125:41 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:139:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:144:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:149:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:202:69 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:212:28 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:222:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:234:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInt.kt:169:37 Redundant call of conversion method.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:432:35 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:451:35 No cast needed.
> Task :lynglib:compileJvmMainJava NO-SOURCE
> Task :lynglib:jvmMainClasses
> Task :lynglib:jvmJar
> Task :lyngio:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:192:71 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:315:51 Redundant call of conversion method.
> Task :lyngio:compileJvmMainJava NO-SOURCE
> Task :lyngio:jvmMainClasses
> Task :lyngio:jvmJar
> Task :lynglib:compileTestKotlinJvm
> Task :lynglib:compileJvmTestJava NO-SOURCE
> Task :lynglib:jvmTestClasses
> Task :lynglib:jvmTest
ArithmeticBenchmarkTest[jvm] > benchmarkIntArithmeticAndComparisons[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=OFF]: 255.197357 ms
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=ON]: 145.587919 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=OFF]: 192.491336 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=ON]: 162.773639 ms
CallBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1527.164983 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1468.249877 ms
CallBenchmarkTest[jvm] > benchmarkSimpleFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=OFF]: 1067.915333 ms
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=ON]: 1006.785753 ms
CallMixedArityBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1525.341699 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1272.182191 ms
CallPoolingBenchmarkTest[jvm] > benchmarkScopePoolingOnFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=OFF]: 820.632254 ms
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=ON]: 840.236564 ms
CallSplatBenchmarkTest[jvm] > benchmarkCallsWithSplatArgs[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=OFF]: 688.095527 ms
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=ON]: 655.496511 ms
ConcurrencyCallBenchmarkTest[jvm] > benchmark_multithread_calls_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] ConcurrencyCallBenchmark workers=8 iters=15000 each: OFF=257.927 ms, ON=256.999 ms, speedup=1.00x
ExpressionBenchmarkTest[jvm] > benchmarkExpressionChains[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=OFF]: 354.975875 ms
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=ON]: 345.167837 ms
ExpressionBenchmarkTest[jvm] > benchmarkListIndexReads[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=OFF]: 202.94016 ms
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=ON]: 189.847027 ms
ExpressionBenchmarkTest[jvm] > benchmarkFieldReadPureReceiver[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=OFF]: 194.183153 ms
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=ON]: 166.705436 ms
ListOpsBenchmarkTest[jvm] > benchmarkSumInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=OFF]: 158.344393 ms
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=ON]: 171.7144 ms
ListOpsBenchmarkTest[jvm] > benchmarkContainsInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=OFF]: 485.762962 ms
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=ON]: 451.642059 ms
LocalVarBenchmarkTest[jvm] > benchmarkLocalReadsWrites_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] locals x400000 [PIC=OFF, FAST_LOCAL=OFF]: 422.33805 ms
[DEBUG_LOG] [BENCH] locals x400000 [PIC=ON, FAST_LOCAL=ON]: 381.000391 ms
MethodPoolingBenchmarkTest[jvm] > benchmarkInstanceMethodCallsWithPooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=OFF]: 421.92221 ms
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=ON]: 374.912331 ms
MixedBenchmarkTest[jvm] > benchmarkMixedWorkloadRvalFastpath[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=OFF]: 619.019405 ms
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=ON]: 607.095909 ms
PicBenchmarkTest[jvm] > benchmarkMethodPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Method PIC=OFF, POOL=OFF: 344.680073 ms
[DEBUG_LOG] [BENCH] Method PIC=ON, POOL=ON: 370.68396 ms
PicBenchmarkTest[jvm] > benchmarkFieldGetSetPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Field PIC=OFF: 123.837196 ms
[DEBUG_LOG] [BENCH] Field PIC=ON: 127.987498 ms
PicBenchmarkTest[jvm] > benchmarkLoopScopePooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Loop Pool=OFF: 275.825602 ms
[DEBUG_LOG] [BENCH] Loop Pool=ON: 272.281156 ms
RangeBenchmarkTest[jvm] > benchmarkIntRangeForIn[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=OFF]: 1004.34663 ms
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=ON]: 950.919274 ms
RegexBenchmarkTest[jvm] > benchmarkDynamicPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=OFF]: 467.891003 ms
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=ON]: 380.721475 ms
RegexBenchmarkTest[jvm] > benchmarkLiteralPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=OFF]: 608.237558 ms
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=ON]: 611.825714 ms
BUILD SUCCESSFUL in 33s
10 actionable tasks: 10 executed
Configuration cache entry reused.
+156
View File
@@ -0,0 +1,156 @@
Reusing configuration cache.
> Task :lynglib:jvmProcessResources NO-SOURCE
> Task :lyngio:jvmProcessResources NO-SOURCE
> Task :lynglib:jvmTestProcessResources NO-SOURCE
> Task :lynglib:kmpPartiallyResolvedDependenciesChecker
> Task :lyngio:kmpPartiallyResolvedDependenciesChecker
> Task :lynglib:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lyngio:processJvmMainResources SKIPPED
> Task :lynglib:processJvmMainResources SKIPPED
> Task :lynglib:processJvmTestResources SKIPPED
> Task :lyngio:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :lynglib:generateLyngStdlib
> Task :lynglib:generateBuildKonfig
> Task :lynglib:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:228:25 'when' is exhaustive so 'else' is redundant here.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3044:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3076:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3109:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3317:46 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3713:42 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3724:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3783:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3894:62 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Compiler.kt:3950:66 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/Scope.kt:727:31 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:507:50 The corresponding parameter in the supertype 'Statement' is named 'scope'. This may cause problems when calling this function with named arguments.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/Obj.kt:820:57 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:33:32 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:158:39 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:177:64 'val monthNumber: Int' is deprecated. Use the 'month' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:179:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:181:64 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjDateTime.kt:266:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:35:31 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:102:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:106:24 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:117:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:119:38 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:123:29 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:125:41 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:139:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:144:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:149:25 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:202:69 'val dayOfMonth: Int' is deprecated. Use the 'day' property instead.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:212:28 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:222:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInstant.kt:234:21 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:432:35 No cast needed.
w: file:///home/sergeych/dev/ling_lib/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt:451:35 No cast needed.
> Task :lynglib:compileJvmMainJava NO-SOURCE
> Task :lynglib:jvmMainClasses
> Task :lynglib:jvmJar
> Task :lyngio:compileKotlinJvm
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:192:71 'typealias Instant = Instant' is deprecated. This type is deprecated in favor of `kotlin.time.Instant`.
w: file:///home/sergeych/dev/ling_lib/lyngio/src/commonMain/kotlin/net/sergeych/lyng/io/fs/LyngFsModule.kt:315:51 Redundant call of conversion method.
> Task :lyngio:compileJvmMainJava NO-SOURCE
> Task :lyngio:jvmMainClasses
> Task :lyngio:jvmJar
> Task :lynglib:compileTestKotlinJvm
> Task :lynglib:compileJvmTestJava NO-SOURCE
> Task :lynglib:jvmTestClasses
> Task :lynglib:jvmTest
ArithmeticBenchmarkTest[jvm] > benchmarkIntArithmeticAndComparisons[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=OFF]: 257.626421 ms
[DEBUG_LOG] [BENCH] int-sum x400000 [PRIMITIVE_FASTOPS=ON]: 145.74696 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=OFF]: 185.585751 ms
[DEBUG_LOG] [BENCH] int-cmp x400000 [PRIMITIVE_FASTOPS=ON]: 163.520035 ms
CallBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1505.046393 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1314.629855 ms
CallBenchmarkTest[jvm] > benchmarkSimpleFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=OFF]: 894.419862 ms
[DEBUG_LOG] [BENCH] calls x300000 [ARG_BUILDER=ON]: 872.837744 ms
CallMixedArityBenchmarkTest[jvm] > benchmarkMixedArityCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=OFF]: 1240.254948 ms
[DEBUG_LOG] [BENCH] mixed-arity x200000 [ARG_BUILDER=ON]: 1212.818849 ms
CallPoolingBenchmarkTest[jvm] > benchmarkScopePoolingOnFunctionCalls[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=OFF]: 809.588732 ms
[DEBUG_LOG] [BENCH] call-pooling x300000 [SCOPE_POOL=ON]: 925.016684 ms
CallSplatBenchmarkTest[jvm] > benchmarkCallsWithSplatArgs[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=OFF]: 721.186901 ms
[DEBUG_LOG] [BENCH] splat-calls x120000 [ARG_BUILDER=ON]: 637.576161 ms
ConcurrencyCallBenchmarkTest[jvm] > benchmark_multithread_calls_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] ConcurrencyCallBenchmark workers=8 iters=15000 each: OFF=262.726 ms, ON=255.278 ms, speedup=1.03x
ExpressionBenchmarkTest[jvm] > benchmarkExpressionChains[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=OFF]: 362.438514 ms
[DEBUG_LOG] [BENCH] expr-chain x350000 [RVAL_FASTPATH=ON]: 340.324569 ms
ExpressionBenchmarkTest[jvm] > benchmarkListIndexReads[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=OFF]: 195.843032 ms
[DEBUG_LOG] [BENCH] list-index x350000 [RVAL_FASTPATH=ON]: 186.899727 ms
ExpressionBenchmarkTest[jvm] > benchmarkFieldReadPureReceiver[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=OFF]: 184.415897 ms
[DEBUG_LOG] [BENCH] field-read x300000 [RVAL_FASTPATH=ON]: 167.959195 ms
ListOpsBenchmarkTest[jvm] > benchmarkSumInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=OFF]: 162.448057 ms
[DEBUG_LOG] [BENCH] list-sum x200000 [PRIMITIVE_FASTOPS=ON]: 159.74125 ms
ListOpsBenchmarkTest[jvm] > benchmarkContainsInts[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=OFF]: 481.042413 ms
[DEBUG_LOG] [BENCH] list-contains x1000000 [PRIMITIVE_FASTOPS=ON]: 455.885378 ms
LocalVarBenchmarkTest[jvm] > benchmarkLocalReadsWrites_off_on[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] locals x400000 [PIC=OFF, FAST_LOCAL=OFF]: 409.51578 ms
[DEBUG_LOG] [BENCH] locals x400000 [PIC=ON, FAST_LOCAL=ON]: 372.056401 ms
MethodPoolingBenchmarkTest[jvm] > benchmarkInstanceMethodCallsWithPooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=OFF]: 388.436636 ms
[DEBUG_LOG] [BENCH] method-loop x300000 [SCOPE_POOL=ON]: 361.562638 ms
MixedBenchmarkTest[jvm] > benchmarkMixedWorkloadRvalFastpath[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=OFF]: 631.060283 ms
[DEBUG_LOG] [BENCH] mixed x250000 [RVAL_FASTPATH=ON]: 596.452285 ms
PicBenchmarkTest[jvm] > benchmarkMethodPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Method PIC=OFF, POOL=OFF: 325.619575 ms
[DEBUG_LOG] [BENCH] Method PIC=ON, POOL=ON: 323.664554 ms
PicBenchmarkTest[jvm] > benchmarkFieldGetSetPic[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Field PIC=OFF: 130.20855 ms
[DEBUG_LOG] [BENCH] Field PIC=ON: 125.922059 ms
PicBenchmarkTest[jvm] > benchmarkLoopScopePooling[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] Loop Pool=OFF: 265.902703 ms
[DEBUG_LOG] [BENCH] Loop Pool=ON: 264.289188 ms
RangeBenchmarkTest[jvm] > benchmarkIntRangeForIn[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=OFF]: 1218.053408 ms
[DEBUG_LOG] [BENCH] range-for-in x5000 (inner 0..999) [PRIMITIVE_FASTOPS=ON]: 1156.935646 ms
RegexBenchmarkTest[jvm] > benchmarkDynamicPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=OFF]: 433.071618 ms
[DEBUG_LOG] [BENCH] regex-dynamic x300000 [REGEX_CACHE=ON]: 371.30824 ms
RegexBenchmarkTest[jvm] > benchmarkLiteralPatternMatches[jvm] STANDARD_OUT
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=OFF]: 570.399724 ms
[DEBUG_LOG] [BENCH] regex-literal x500000 [REGEX_CACHE=ON]: 533.532049 ms
BUILD SUCCESSFUL in 33s
10 actionable tasks: 10 executed
Configuration cache entry reused.
+246
View File
@@ -0,0 +1,246 @@
diff --git a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInt.kt b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInt.kt
index 0671102..d4cb6ba 100644
--- a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInt.kt
+++ b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjInt.kt
@@ -55,7 +55,11 @@ class ObjInt(val value: Long, override val isConst: Boolean = false) : Obj(), Nu
override suspend fun compareTo(scope: Scope, other: Obj): Int {
if (other !is Numeric) return -2
- return value.compareTo(other.doubleValue)
+ return if (other is ObjInt) {
+ value.compareTo(other.value)
+ } else {
+ doubleValue.compareTo(other.doubleValue)
+ }
}
override fun toString(): String = value.toString()
@@ -192,4 +196,4 @@ class ObjInt(val value: Long, override val isConst: Boolean = false) : Obj(), Nu
}
fun Int.toObj() = ObjInt.of(this.toLong())
-fun Long.toObj() = ObjInt.of(this)
\ No newline at end of file
+fun Long.toObj() = ObjInt.of(this)
diff --git a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRange.kt b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRange.kt
index 0c631d0..dc61c66 100644
--- a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRange.kt
+++ b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRange.kt
@@ -96,6 +96,30 @@ class ObjRange(val start: Obj?, val end: Obj?, val isEndInclusive: Boolean) : Ob
if (other is ObjRange)
return containsRange(scope, other)
+ if (net.sergeych.lyng.PerfFlags.PRIMITIVE_FASTOPS) {
+ if (start is ObjInt && end is ObjInt && other is ObjInt) {
+ val s = start.value
+ val e = end.value
+ val v = other.value
+ if (v < s) return false
+ return if (isEndInclusive) v <= e else v < e
+ }
+ if (start is ObjChar && end is ObjChar && other is ObjChar) {
+ val s = start.value
+ val e = end.value
+ val v = other.value
+ if (v < s) return false
+ return if (isEndInclusive) v <= e else v < e
+ }
+ if (start is ObjString && end is ObjString && other is ObjString) {
+ val s = start.value
+ val e = end.value
+ val v = other.value
+ if (v < s) return false
+ return if (isEndInclusive) v <= e else v < e
+ }
+ }
+
if (start == null && end == null) return true
if (start != null) {
if (start.compareTo(scope, other) > 0) return false
@@ -241,4 +265,3 @@ class ObjRange(val start: Obj?, val end: Obj?, val isEndInclusive: Boolean) : Ob
}
}
}
-
diff --git a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt
index 2dd0ae6..76e56d4 100644
--- a/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt
+++ b/lynglib/src/commonMain/kotlin/net/sergeych/lyng/obj/ObjRef.kt
@@ -152,6 +152,90 @@ class BinaryOpRef(private val op: BinOp, private val left: ObjRef, private val r
// Primitive fast paths for common cases (guarded by PerfFlags.PRIMITIVE_FASTOPS)
if (PerfFlags.PRIMITIVE_FASTOPS) {
+ // Fast range equality: avoid compareTo/equals for ObjRange when possible
+ if ((op == BinOp.EQ || op == BinOp.NEQ) && a is ObjRange && b is ObjRange) {
+ val eq = (a.start == b.start && a.end == b.end)
+ if (PerfFlags.PIC_DEBUG_COUNTERS) PerfStats.primitiveFastOpsHit++
+ return if (op == BinOp.EQ) {
+ if (eq) ObjTrue else ObjFalse
+ } else {
+ if (eq) ObjFalse else ObjTrue
+ }
+ }
+ // Fast membership for common containers
+ if (op == BinOp.IN || op == BinOp.NOTIN) {
+ val inResult: Boolean? = when (b) {
+ is ObjList -> {
+ if (a is ObjInt) {
+ var i = 0
+ val sz = b.list.size
+ var found = false
+ while (i < sz) {
+ val v = b.list[i]
+ if (v is ObjInt && v.value == a.value) {
+ found = true
+ break
+ }
+ i++
+ }
+ found
+ } else {
+ b.list.contains(a)
+ }
+ }
+ is ObjSet -> b.set.contains(a)
+ is ObjMap -> b.map.containsKey(a)
+ is ObjRange -> {
+ when (a) {
+ is ObjInt -> {
+ val s = b.start as? ObjInt
+ val e = b.end as? ObjInt
+ val v = a.value
+ if (s == null && e == null) null
+ else {
+ if (s != null && v < s.value) false
+ else if (e != null) if (b.isEndInclusive) v <= e.value else v < e.value else true
+ }
+ }
+ is ObjChar -> {
+ val s = b.start as? ObjChar
+ val e = b.end as? ObjChar
+ val v = a.value
+ if (s == null && e == null) null
+ else {
+ if (s != null && v < s.value) false
+ else if (e != null) if (b.isEndInclusive) v <= e.value else v < e.value else true
+ }
+ }
+ is ObjString -> {
+ val s = b.start as? ObjString
+ val e = b.end as? ObjString
+ val v = a.value
+ if (s == null && e == null) null
+ else {
+ if (s != null && v < s.value) false
+ else if (e != null) if (b.isEndInclusive) v <= e.value else v < e.value else true
+ }
+ }
+ else -> null
+ }
+ }
+ is ObjString -> when (a) {
+ is ObjString -> b.value.contains(a.value)
+ is ObjChar -> b.value.contains(a.value)
+ else -> null
+ }
+ else -> null
+ }
+ if (inResult != null) {
+ if (PerfFlags.PIC_DEBUG_COUNTERS) PerfStats.primitiveFastOpsHit++
+ return if (op == BinOp.IN) {
+ if (inResult) ObjTrue else ObjFalse
+ } else {
+ if (inResult) ObjFalse else ObjTrue
+ }
+ }
+ }
// Fast boolean ops when both operands are ObjBool
if (a is ObjBool && b is ObjBool) {
val r: Obj? = when (op) {
@@ -604,7 +688,37 @@ class AssignOpRef(
else -> null
}
if (inPlace != null) return inPlace.asReadonly
- val result: Obj = when (op) {
+ val fast: Obj? = if (PerfFlags.PRIMITIVE_FASTOPS) {
+ when {
+ x is ObjInt && y is ObjInt -> {
+ val xv = x.value
+ val yv = y.value
+ when (op) {
+ BinOp.PLUS -> ObjInt.of(xv + yv)
+ BinOp.MINUS -> ObjInt.of(xv - yv)
+ BinOp.STAR -> ObjInt.of(xv * yv)
+ BinOp.SLASH -> if (yv != 0L) ObjInt.of(xv / yv) else null
+ BinOp.PERCENT -> if (yv != 0L) ObjInt.of(xv % yv) else null
+ else -> null
+ }
+ }
+ (x is ObjInt || x is ObjReal) && (y is ObjInt || y is ObjReal) -> {
+ val xv = if (x is ObjInt) x.doubleValue else (x as ObjReal).value
+ val yv = if (y is ObjInt) y.doubleValue else (y as ObjReal).value
+ when (op) {
+ BinOp.PLUS -> ObjReal.of(xv + yv)
+ BinOp.MINUS -> ObjReal.of(xv - yv)
+ BinOp.STAR -> ObjReal.of(xv * yv)
+ BinOp.SLASH -> ObjReal.of(xv / yv)
+ BinOp.PERCENT -> ObjReal.of(xv % yv)
+ else -> null
+ }
+ }
+ x is ObjString && op == BinOp.PLUS -> ObjString(x.value + y.toString())
+ else -> null
+ }
+ } else null
+ val result: Obj = fast ?: when (op) {
BinOp.PLUS -> x.plus(scope, y)
BinOp.MINUS -> x.minus(scope, y)
BinOp.STAR -> x.mul(scope, y)
@@ -632,7 +746,15 @@ class IncDecRef(
// We now treat numbers as immutable and always perform write-back via setAt.
// This avoids issues where literals are shared and mutated in-place.
// For post-inc: return ORIGINAL value; for pre-inc: return NEW value.
- val result = if (isIncrement) v.plus(scope, one) else v.minus(scope, one)
+ val result = if (PerfFlags.PRIMITIVE_FASTOPS) {
+ when (v) {
+ is ObjInt -> if (isIncrement) ObjInt.of(v.value + 1L) else ObjInt.of(v.value - 1L)
+ is ObjReal -> if (isIncrement) ObjReal.of(v.value + 1.0) else ObjReal.of(v.value - 1.0)
+ else -> if (isIncrement) v.plus(scope, one) else v.minus(scope, one)
+ }
+ } else {
+ if (isIncrement) v.plus(scope, one) else v.minus(scope, one)
+ }
target.setAt(atPos, scope, result)
return (if (isPost) v else result).asReadonly
}
@@ -1246,8 +1368,8 @@ class IndexRef(
val i = idx.toInt()
return ObjChar(base.value[i]).asMutable
}
- // Map[String] fast path (common case); return ObjNull if absent
- if (base is ObjMap && idx is ObjString) {
+ // Map[String/Int/Char] fast path (common cases); return ObjNull if absent
+ if (base is ObjMap && (idx is ObjString || idx is ObjInt || idx is ObjChar)) {
val v = base.map[idx] ?: ObjNull
return v.asMutable
}
@@ -1321,8 +1443,8 @@ class IndexRef(
val i = idx.toInt()
return ObjChar(base.value[i])
}
- // Map[String] fast path
- if (base is ObjMap && idx is ObjString) {
+ // Map[String/Int/Char] fast path
+ if (base is ObjMap && (idx is ObjString || idx is ObjInt || idx is ObjChar)) {
return base.map[idx] ?: ObjNull
}
if (PerfFlags.INDEX_PIC) {
@@ -1393,7 +1515,7 @@ class IndexRef(
return
}
// Direct write fast path for ObjMap + ObjString
- if (base is ObjMap && idx is ObjString) {
+ if (base is ObjMap && (idx is ObjString || idx is ObjInt || idx is ObjChar)) {
base.map[idx] = newValue
return
}