implement PLN-0033 vm string sharing hot path
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user