implement PLN-0033 vm string sharing hot path

This commit is contained in:
2026-04-20 08:45:34 +01:00
parent 8c5957a0a9
commit 09821cf9cc
10 changed files with 359 additions and 17 deletions
@@ -75,7 +75,7 @@ impl From<BytecodeModule> for ProgramImage {
ConstantPoolEntry::Int64(v) => Value::Int64(*v),
ConstantPoolEntry::Float64(v) => Value::Float(*v),
ConstantPoolEntry::Boolean(v) => Value::Boolean(*v),
ConstantPoolEntry::String(v) => Value::String(v.clone()),
ConstantPoolEntry::String(v) => Value::String(v.clone().into()),
ConstantPoolEntry::Int32(v) => Value::Int32(*v),
})
.collect();
@@ -99,7 +99,7 @@ impl From<ProgramImage> for BytecodeModule {
Value::Int64(v) => ConstantPoolEntry::Int64(*v),
Value::Float(v) => ConstantPoolEntry::Float64(*v),
Value::Boolean(v) => ConstantPoolEntry::Boolean(*v),
Value::String(v) => ConstantPoolEntry::String(v.clone()),
Value::String(v) => ConstantPoolEntry::String(v.to_string()),
Value::Int32(v) => ConstantPoolEntry::Int32(*v),
Value::HeapRef(_) => ConstantPoolEntry::Null,
})