diff options
author | chriseth <chris@ethereum.org> | 2017-05-31 01:34:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-31 01:34:28 +0800 |
commit | d4a57d81ba7f2a9b5db57397d36f1a17adb4b142 (patch) | |
tree | 15d8048ad9ed48dc7d010e37fd2125df8d5db436 /libsolidity/codegen/ExpressionCompiler.cpp | |
parent | 254b55728f66ea164e9085700a294ac4837f2029 (diff) | |
parent | dcb7c51920a947e57371b7dc92417f47ee5cc65c (diff) | |
download | dexon-solidity-d4a57d81ba7f2a9b5db57397d36f1a17adb4b142.tar dexon-solidity-d4a57d81ba7f2a9b5db57397d36f1a17adb4b142.tar.gz dexon-solidity-d4a57d81ba7f2a9b5db57397d36f1a17adb4b142.tar.bz2 dexon-solidity-d4a57d81ba7f2a9b5db57397d36f1a17adb4b142.tar.lz dexon-solidity-d4a57d81ba7f2a9b5db57397d36f1a17adb4b142.tar.xz dexon-solidity-d4a57d81ba7f2a9b5db57397d36f1a17adb4b142.tar.zst dexon-solidity-d4a57d81ba7f2a9b5db57397d36f1a17adb4b142.zip |
Merge pull request #2317 from ethereum/keccak256
Use keccak256 in tests and replace the SHA3 instruction in assembly
Diffstat (limited to 'libsolidity/codegen/ExpressionCompiler.cpp')
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 0aa82ea8..25154bc0 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -110,7 +110,7 @@ void ExpressionCompiler::appendStateVariableAccessor(VariableDeclaration const& // move key to memory. utils().copyToStackTop(paramTypes.size() - i, 1); utils().storeInMemory(0); - m_context << u256(64) << u256(0) << Instruction::SHA3; + m_context << u256(64) << u256(0) << Instruction::KECCAK256; // push offset m_context << u256(0); returnType = mappingType->valueType(); @@ -674,7 +674,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) utils().fetchFreeMemoryPointer(); utils().encodeToMemory(argumentTypes, TypePointers(), function.padArguments(), true); utils().toSizeAfterFreeMemoryPointer(); - m_context << Instruction::SHA3; + m_context << Instruction::KECCAK256; break; } case FunctionType::Kind::Log0: @@ -721,7 +721,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) true ); utils().toSizeAfterFreeMemoryPointer(); - m_context << Instruction::SHA3; + m_context << Instruction::KECCAK256; } else utils().convertType( @@ -1214,7 +1214,7 @@ bool ExpressionCompiler::visit(IndexAccess const& _indexAccess) utils().storeInMemoryDynamic(IntegerType(256)); m_context << u256(0); } - m_context << Instruction::SHA3; + m_context << Instruction::KECCAK256; m_context << u256(0); setLValueToStorageItem(_indexAccess); } |