mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Make data location explicit.
This commit is contained in:
		
							parent
							
								
									2761aed1d3
								
							
						
					
					
						commit
						4e2d4f02b0
					
				| @ -237,9 +237,9 @@ Type const* TypeProvider::fromElementaryTypeName(ElementaryTypeNameToken const& | ||||
| 	case Token::Bool: | ||||
| 		return boolType(); | ||||
| 	case Token::Bytes: | ||||
| 		return bytesType(); | ||||
| 		return bytesStorageType(); | ||||
| 	case Token::String: | ||||
| 		return stringType(); | ||||
| 		return stringStorageType(); | ||||
| 	default: | ||||
| 		solAssert( | ||||
| 			false, | ||||
| @ -293,7 +293,7 @@ TypePointer TypeProvider::fromElementaryTypeName(string const& _name) | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| ArrayType const* TypeProvider::bytesType() | ||||
| ArrayType const* TypeProvider::bytesStorageType() | ||||
| { | ||||
| 	if (!m_bytesStorageType) | ||||
| 		m_bytesStorageType = make_unique<ArrayType>(DataLocation::Storage, false); | ||||
| @ -307,7 +307,7 @@ ArrayType const* TypeProvider::bytesMemoryType() | ||||
| 	return m_bytesMemoryType.get(); | ||||
| } | ||||
| 
 | ||||
| ArrayType const* TypeProvider::stringType() | ||||
| ArrayType const* TypeProvider::stringStorageType() | ||||
| { | ||||
| 	if (!m_stringStorageType) | ||||
| 		m_stringStorageType = make_unique<ArrayType>(DataLocation::Storage, true); | ||||
| @ -469,14 +469,14 @@ ArrayType const* TypeProvider::arrayType(DataLocation _location, bool _isString) | ||||
| 	if (_isString) | ||||
| 	{ | ||||
| 		if (_location == DataLocation::Storage) | ||||
| 			return stringType(); | ||||
| 			return stringStorageType(); | ||||
| 		if (_location == DataLocation::Memory) | ||||
| 			return stringMemoryType(); | ||||
| 	} | ||||
| 	else | ||||
| 	{ | ||||
| 		if (_location == DataLocation::Storage) | ||||
| 			return bytesType(); | ||||
| 			return bytesStorageType(); | ||||
| 		if (_location == DataLocation::Memory) | ||||
| 			return bytesMemoryType(); | ||||
| 	} | ||||
|  | ||||
| @ -66,9 +66,9 @@ public: | ||||
| 	static FixedBytesType const* byteType() { return fixedBytesType(1); } | ||||
| 	static FixedBytesType const* fixedBytesType(unsigned m) { return m_bytesM.at(m - 1).get(); } | ||||
| 
 | ||||
| 	static ArrayType const* bytesType(); | ||||
| 	static ArrayType const* bytesStorageType(); | ||||
| 	static ArrayType const* bytesMemoryType(); | ||||
| 	static ArrayType const* stringType(); | ||||
| 	static ArrayType const* stringStorageType(); | ||||
| 	static ArrayType const* stringMemoryType(); | ||||
| 
 | ||||
| 	/// Constructor for a byte array ("bytes") and string.
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user