[libsolidity] TypeProvider: adds explicit uint256() accessor and removes default params in integerType(...).

This commit is contained in:
Christian Parpart
2019-04-16 18:28:40 +02:00
committed by chriseth
parent 59d4f54729
commit 58a45f2cb6
13 changed files with 57 additions and 54 deletions
+3 -3
View File
@@ -311,7 +311,7 @@ string ABIFunctions::abiEncodingFunction(
case DataLocation::CallData:
if (
fromArray.isByteArray() ||
*fromArray.baseType() == *TypeProvider::integerType() ||
*fromArray.baseType() == *TypeProvider::uint256() ||
*fromArray.baseType() == FixedBytesType(32)
)
return abiEncodingFunctionCalldataArrayWithoutCleanup(fromArray, *toArray, _options);
@@ -369,7 +369,7 @@ string ABIFunctions::abiEncodingFunction(
// possible for library calls where we just forward the storage reference
solAssert(_options.encodeAsLibraryTypes, "");
solAssert(_options.padded && !_options.dynamicInplace, "Non-padded / inplace encoding for library call requested.");
solAssert(to == *TypeProvider::integerType(), "");
solAssert(to == *TypeProvider::uint256(), "");
templ("cleanupConvert", "value");
}
else
@@ -445,7 +445,7 @@ string ABIFunctions::abiEncodingFunctionCalldataArrayWithoutCleanup(
solAssert(fromArrayType.location() == DataLocation::CallData, "");
solAssert(
fromArrayType.isByteArray() ||
*fromArrayType.baseType() == *TypeProvider::integerType() ||
*fromArrayType.baseType() == *TypeProvider::uint256() ||
*fromArrayType.baseType() == FixedBytesType(32),
"");
solAssert(fromArrayType.calldataStride() == toArrayType.memoryStride(), "");