aboutsummaryrefslogtreecommitdiffstats
path: root/LValue.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-05 22:41:39 +0800
committerchriseth <c@ethdev.com>2015-03-05 22:41:39 +0800
commit280df42463c61786dd2dac0106d3f23c1b3c4275 (patch)
tree483dd3f6bf6ca2a9a87504fcf3617b7b746230d9 /LValue.cpp
parentb84cf62d6bd3a9caa8a9a7f1dcd427418170aed9 (diff)
downloaddexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.tar.gz
dexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.tar.zst
dexon-solidity-280df42463c61786dd2dac0106d3f23c1b3c4275.zip
Styling
Diffstat (limited to 'LValue.cpp')
-rw-r--r--LValue.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/LValue.cpp b/LValue.cpp
index f5730020..7a81ff92 100644
--- a/LValue.cpp
+++ b/LValue.cpp
@@ -242,7 +242,7 @@ StorageByteArrayElement::StorageByteArrayElement(CompilerContext& _compilerConte
void StorageByteArrayElement::retrieveValue(SourceLocation const&, bool _remove) const
{
- // stack: ref bytenr
+ // stack: ref byte_number
if (_remove)
m_context << eth::Instruction::SWAP1 << eth::Instruction::SLOAD
<< eth::Instruction::SWAP1 << eth::Instruction::BYTE;
@@ -255,15 +255,15 @@ void StorageByteArrayElement::storeValue(Type const&, SourceLocation const&, boo
{
//@todo optimize this
- // stack: value ref bytenr
+ // stack: value ref byte_number
m_context << u256(31) << eth::Instruction::SUB << u256(0x100) << eth::Instruction::EXP;
- // stack: value ref (1<<(8*(31-bytenr)))
+ // stack: value ref (1<<(8*(31-byte_number)))
m_context << eth::Instruction::DUP2 << eth::Instruction::SLOAD;
- // stack: value ref (1<<(8*(31-bytenr))) old_full_value
+ // stack: value ref (1<<(8*(31-byte_number))) old_full_value
// clear byte in old value
m_context << eth::Instruction::DUP2 << u256(0xff) << eth::Instruction::MUL
<< eth::Instruction::NOT << eth::Instruction::AND;
- // stack: value ref (1<<(32-bytenr)) old_full_value_with_cleared_byte
+ // stack: value ref (1<<(32-byte_number)) old_full_value_with_cleared_byte
m_context << eth::Instruction::SWAP1 << eth::Instruction::DUP4 << eth::Instruction::MUL
<< eth::Instruction::OR;
// stack: value ref new_full_value
@@ -274,13 +274,13 @@ void StorageByteArrayElement::storeValue(Type const&, SourceLocation const&, boo
void StorageByteArrayElement::setToZero(SourceLocation const&, bool _removeReference) const
{
- // stack: ref bytenr
+ // stack: ref byte_number
if (!_removeReference)
m_context << eth::Instruction::SWAP1 << eth::Instruction::DUP2;
m_context << u256(31) << eth::Instruction::SUB << u256(0x100) << eth::Instruction::EXP;
- // stack: ref (1<<(8*(31-bytenr)))
+ // stack: ref (1<<(8*(31-byte_number)))
m_context << eth::Instruction::DUP2 << eth::Instruction::SLOAD;
- // stack: ref (1<<(8*(31-bytenr))) old_full_value
+ // stack: ref (1<<(8*(31-byte_number))) old_full_value
// clear byte in old value
m_context << eth::Instruction::SWAP1 << u256(0xff) << eth::Instruction::MUL << eth::Instruction::AND;
// stack: ref old_full_value_with_cleared_byte