mirror of
https://github.com/fluencelabs/interface-types
synced 2025-07-07 10:31:44 +00:00
feat(interface-types) Rename write-utf8
to string-to-memory
.
This commit is contained in:
@ -267,9 +267,9 @@ where
|
||||
|
||||
Instruction::MemoryToString => 0x03_u8.to_bytes(writer)?,
|
||||
|
||||
Instruction::WriteUtf8 { allocator_name } => {
|
||||
Instruction::StringToMemory { allocator_index } => {
|
||||
0x04_u8.to_bytes(writer)?;
|
||||
allocator_name.to_bytes(writer)?;
|
||||
(*allocator_index as u64).to_bytes(writer)?;
|
||||
}
|
||||
|
||||
Instruction::I32ToS8 => 0x07_u8.to_bytes(writer)?,
|
||||
@ -557,9 +557,7 @@ mod tests {
|
||||
Instruction::Call { function_index: 1 },
|
||||
Instruction::CallExport { export_name: "abc" },
|
||||
Instruction::MemoryToString,
|
||||
Instruction::WriteUtf8 {
|
||||
allocator_name: "abc",
|
||||
},
|
||||
Instruction::StringToMemory { allocator_index: 1 },
|
||||
Instruction::I32ToS8,
|
||||
Instruction::I32ToS8X,
|
||||
Instruction::I32ToU8,
|
||||
@ -606,7 +604,7 @@ mod tests {
|
||||
0x01, 0x01, // Call { function_index: 1 }
|
||||
0x02, 0x03, 0x61, 0x62, 0x63, // CallExport { export_name: "abc" }
|
||||
0x03, // MemoryToString
|
||||
0x04, 0x03, 0x61, 0x62, 0x63, // WriteUtf8 { allocator_name: "abc" }
|
||||
0x04, 0x01, // StringToMemory { allocator_index: 1 }
|
||||
0x07, // I32ToS8
|
||||
0x08, // I32ToS8X
|
||||
0x09, // I32ToU8
|
||||
|
Reference in New Issue
Block a user