diff --git a/ulm-semantics/main/encoding/encoder.md b/ulm-semantics/main/encoding/encoder.md index bc3ed22..2670d74 100644 --- a/ulm-semantics/main/encoding/encoder.md +++ b/ulm-semantics/main/encoding/encoder.md @@ -31,20 +31,20 @@ module ULM-ENCODING-HELPER // Encoding of individual types - rule convertToKBytes(i8(V) , "int8") => Int2Bytes(32, MInt2Signed(V), BE:Endianness) - rule convertToKBytes(u8(V) , "uint8") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) - rule convertToKBytes(i16(V), "int16") => Int2Bytes(32, MInt2Signed(V), BE:Endianness) - rule convertToKBytes(u16(V), "uint16") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) - rule convertToKBytes(i32(V), "int32") => Int2Bytes(32, MInt2Signed(V), BE:Endianness) - rule convertToKBytes(u32(V), "uint32") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) - rule convertToKBytes(i64(V), "int64") => Int2Bytes(32, MInt2Signed(V), BE:Endianness) - rule convertToKBytes(u64(V), "uint64") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) - rule convertToKBytes(u128(V), "uint128") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) - rule convertToKBytes(true, "bool") => Int2Bytes(32, 1, BE:Endianness) + rule convertToKBytes(i8(V) , "int8") => Int2Bytes(32, MInt2Signed(V), BE:Endianness) + rule convertToKBytes(u8(V) , "uint8") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) + rule convertToKBytes(i16(V), "int16") => Int2Bytes(32, MInt2Signed(V), BE:Endianness) + rule convertToKBytes(u16(V), "uint16") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) + rule convertToKBytes(i32(V), "int32") => Int2Bytes(32, MInt2Signed(V), BE:Endianness) + rule convertToKBytes(u32(V), "uint32") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) + rule convertToKBytes(i64(V), "int64") => Int2Bytes(32, MInt2Signed(V), BE:Endianness) + rule convertToKBytes(u64(V), "uint64") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) + rule convertToKBytes(u128(V), "uint128") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) + rule convertToKBytes(true, "bool") => Int2Bytes(32, 1, BE:Endianness) rule convertToKBytes(false, "bool") => Int2Bytes(32, 0, BE:Endianness) - rule convertToKBytes(u256(V), "uint256") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) - rule convertToKBytes(u160(V), "uint160") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) - rule convertToKBytes(u160(V), "address") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) + rule convertToKBytes(u256(V), "uint256") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) + rule convertToKBytes(u160(V), "uint160") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) + rule convertToKBytes(u160(V), "address") => Int2Bytes(32, MInt2Unsigned(V), BE:Endianness) endmodule @@ -173,7 +173,7 @@ module ULM-CALLDATA-ENCODER syntax PathInExpressionOrError ::= PathInExpression | SemanticsError syntax PathInExpressionOrError ::= debugType(Type) [function, total] - + rule debugType(u8 ) => :: debug :: debug_u8 rule debugType(u16 ) => :: debug :: debug_u16 rule debugType(u32 ) => :: debug :: debug_u32 diff --git a/ulm-semantics/main/preprocessing/storage.md b/ulm-semantics/main/preprocessing/storage.md index 87757ff..3c46f76 100644 --- a/ulm-semantics/main/preprocessing/storage.md +++ b/ulm-semantics/main/preprocessing/storage.md @@ -18,10 +18,9 @@ module ULM-PREPROCESSING-STORAGE ) => ulmAddStorageMethodBody (... methodName: Method - , storageName: StorageName , mapperValueType: MapperValue , appendParamsInstructions: - encodeStatements + codegenValuesEncoder ( buffer_id , ( ptrValue(null, StorageName) : str , paramsToEncodeValues(Params) @@ -42,7 +41,6 @@ module ULM-PREPROCESSING-STORAGE ulmAddStorageMethodBody (... methodName: Method:PathInExpression - , storageName: StorageName:String , mapperValueType: MapperValueType:Type , appendParamsInstructions: Append:NonEmptyStatements ) => .K diff --git a/ulm-semantics/main/preprocessing/syntax.md b/ulm-semantics/main/preprocessing/syntax.md index 5e80e05..294e4f0 100644 --- a/ulm-semantics/main/preprocessing/syntax.md +++ b/ulm-semantics/main/preprocessing/syntax.md @@ -43,7 +43,6 @@ module ULM-PREPROCESSING-SYNTAX-PRIVATE ) | ulmAddStorageMethodBody ( methodName: PathInExpression - , storageName: String , mapperValueType: Type , appendParamsInstructions: NonEmptyStatementsOrError ) diff --git a/ulm-semantics/test/execution.md b/ulm-semantics/test/execution.md index 6f6c0c6..c2c1255 100644 --- a/ulm-semantics/test/execution.md +++ b/ulm-semantics/test/execution.md @@ -101,7 +101,7 @@ module ULM-TEST-EXECUTION => concat ( let buffer_id = :: bytes_hooks :: empty( .CallParamsList ); .NonEmptyStatements - , encodeStatements(buffer_id, encodeArgsToEncodeValues(Args)) + , codegenValuesEncoder(buffer_id, encodeArgsToEncodeValues(Args)) ) rule encode_call_data C:EncodeCall @@ -227,7 +227,7 @@ module ULM-TEST-EXECUTION ( concat ( let buffer_id = :: bytes_hooks :: empty( .CallParamsList ); .NonEmptyStatements - , encodeStatements + , codegenValuesEncoder ( buffer_id , (StorageName : str , encodeArgsToEncodeValues(Args)) ) @@ -251,7 +251,7 @@ module ULM-TEST-EXECUTION ( concat ( let buffer_id = :: bytes_hooks :: empty( .CallParamsList ); .NonEmptyStatements - , encodeStatements + , codegenValuesEncoder ( buffer_id , encodeArgsToEncodeValues(Args) )