MCPcopy Create free account
hub / github.com/argotorg/solidity / rightShiftNumberOnStack

Method rightShiftNumberOnStack

libsolidity/codegen/CompilerUtils.cpp:1624–1632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1622}
1623
1624void CompilerUtils::rightShiftNumberOnStack(unsigned _bits)
1625{
1626 solAssert(_bits < 256);
1627 // NOTE: If we add signed right shift, SAR rounds differently than SDIV
1628 if (m_context.evmVersion().hasBitwiseShifting())
1629 m_context << _bits << Instruction::SHR;
1630 else
1631 m_context << (u256(1) << _bits) << Instruction::SWAP1 << Instruction::DIV;
1632}
1633
1634unsigned CompilerUtils::prepareMemoryStore(Type const& _type, bool _padToWords, bool _cleanup)
1635{

Callers 2

storeValueMethod · 0.80
visitMethod · 0.80

Calls 2

hasBitwiseShiftingMethod · 0.80
evmVersionMethod · 0.45

Tested by

no test coverage detected