Lines Matching refs:Instruction

77 		m_context << Instruction::SWAP1 << u256(0x20);  in copyArrayToStorage()
78 m_context << Instruction::ADD << Instruction::SWAP1; in copyArrayToStorage()
94 _context << Instruction::DUP3; in copyArrayToStorage()
102 _context << Instruction::DUP3 << Instruction::DUP3 << Instruction::SSTORE; in copyArrayToStorage()
109 << Instruction::POP << Instruction::POP in copyArrayToStorage()
110 << Instruction::POP << Instruction::POP; in copyArrayToStorage()
115 _context << Instruction::SWAP1; in copyArrayToStorage()
119 _context << Instruction::SWAP1; in copyArrayToStorage()
121 _context << Instruction::DUP2 << Instruction::ADD; in copyArrayToStorage()
123 _context << Instruction::SWAP3; in copyArrayToStorage()
132 _context << Instruction::DUP3; in copyArrayToStorage()
135 _context << u256(0) << Instruction::DUP6 << Instruction::SSTORE; in copyArrayToStorage()
141 _context << Instruction::DUP3 << u256(31) << Instruction::LT; in copyArrayToStorage()
148 _context << Instruction::DUP1 << Instruction::SLOAD; in copyArrayToStorage()
149 _context << Instruction::DUP6 << Instruction::SSTORE; in copyArrayToStorage()
153 _context << Instruction::DUP1; in copyArrayToStorage()
157 _context << u256(0xff) << Instruction::NOT << Instruction::AND; in copyArrayToStorage()
159 _context << Instruction::DUP4 << Instruction::DUP1 << Instruction::ADD; in copyArrayToStorage()
161 _context << Instruction::OR << Instruction::DUP6 << Instruction::SSTORE; in copyArrayToStorage()
167 _context << Instruction::DUP3 << Instruction::DUP1 << Instruction::ADD; in copyArrayToStorage()
168 _context << u256(1) << Instruction::ADD; in copyArrayToStorage()
169 _context << Instruction::DUP6 << Instruction::SSTORE; in copyArrayToStorage()
173 _context << Instruction::DUP3 << Instruction::ISZERO; in copyArrayToStorage()
179 _context << Instruction::SWAP2; in copyArrayToStorage()
181 _context << Instruction::DUP3 << Instruction::ADD; in copyArrayToStorage()
193 << Instruction::GT << Instruction::ISZERO; in copyArrayToStorage()
208 _context << Instruction::DUP3; in copyArrayToStorage()
210 _context << Instruction::MLOAD; in copyArrayToStorage()
211 _context << Instruction::DUP3; in copyArrayToStorage()
213 _context << Instruction::POP; in copyArrayToStorage()
219 << Instruction::DUP3 << Instruction::SLOAD in copyArrayToStorage()
220 << Instruction::DUP3 << Instruction::SSTORE; in copyArrayToStorage()
232 _context << Instruction::DUP2; in copyArrayToStorage()
269 << Instruction::ADD in copyArrayToStorage()
279 << Instruction::ADD in copyArrayToStorage()
287 _context << dupInstruction(byteOffsetSize) << Instruction::ISZERO; in copyArrayToStorage()
295 _context << Instruction::POP; // might pop the source, but then target is popped next in copyArrayToStorage()
298 _context << Instruction::POP; in copyArrayToStorage()
303 _context << Instruction::POP << Instruction::SWAP1 << Instruction::POP; in copyArrayToStorage()
309 _context << Instruction::POP; in copyArrayToStorage()
338 m_context << Instruction::POP << Instruction::POP; in copyArrayToMemory()
347 m_context << u256(0) << Instruction::SWAP3; in copyArrayToMemory()
351 m_context << Instruction::DUP2 << Instruction::DUP5; in copyArrayToMemory()
352 m_context << Instruction::LT << Instruction::ISZERO; in copyArrayToMemory()
354 m_context << Instruction::DUP3 << Instruction::DUP5; in copyArrayToMemory()
361 m_context << Instruction::SWAP3 << u256(1) << Instruction::ADD; in copyArrayToMemory()
362 m_context << Instruction::SWAP3; in copyArrayToMemory()
365 m_context << Instruction::SWAP3; in copyArrayToMemory()
375 m_context << Instruction::SWAP1 << u256(32) << Instruction::ADD; in copyArrayToMemory()
376 m_context << Instruction::SWAP1; in copyArrayToMemory()
381 m_context << Instruction::DUP1 << Instruction::DUP4 << Instruction::DUP4; in copyArrayToMemory()
390 m_context << Instruction::SWAP1 << Instruction::POP; in copyArrayToMemory()
398 m_context << Instruction::SWAP1 << Instruction::DUP2 << Instruction::ADD; in copyArrayToMemory()
400 m_context << Instruction::SWAP1 << u256(31) << Instruction::AND; in copyArrayToMemory()
405 m_context << Instruction::DUP1 << Instruction::ISZERO; in copyArrayToMemory()
410 m_context << Instruction::DUP1 << Instruction::DUP3; in copyArrayToMemory()
411 m_context << Instruction::SUB; in copyArrayToMemory()
413 m_context << Instruction::DUP1 << Instruction::MLOAD; in copyArrayToMemory()
416 m_context << Instruction::DUP4 << u256(32) << Instruction::SUB; in copyArrayToMemory()
418 m_context << u256(0x100) << Instruction::EXP << Instruction::SUB; in copyArrayToMemory()
419 m_context << Instruction::NOT << Instruction::AND; in copyArrayToMemory()
421 m_context << Instruction::DUP2 << Instruction::MSTORE; in copyArrayToMemory()
423 m_context << u256(32) << Instruction::ADD; in copyArrayToMemory()
425 m_context << Instruction::SWAP2 << Instruction::POP; in copyArrayToMemory()
430 m_context << Instruction::POP; in copyArrayToMemory()
434 m_context << Instruction::ADD; in copyArrayToMemory()
446 m_context << Instruction::DUP1 << Instruction::ISZERO; in copyArrayToMemory()
452 m_context << Instruction::DUP1 << u256(31) << Instruction::LT; in copyArrayToMemory()
455 m_context << u256(0x100) << Instruction::DUP1; in copyArrayToMemory()
456 m_context << Instruction::DUP4 << Instruction::SLOAD; in copyArrayToMemory()
457 m_context << Instruction::DIV << Instruction::MUL; in copyArrayToMemory()
458 m_context << Instruction::DUP4 << Instruction::MSTORE; in copyArrayToMemory()
461 m_context << Instruction::SWAP2; in copyArrayToMemory()
465 m_context << Instruction::DUP3; in copyArrayToMemory()
466 m_context << Instruction::ADD; in copyArrayToMemory()
467 m_context << Instruction::SWAP2; in copyArrayToMemory()
473 m_context << _sourceType.baseType()->memoryHeadSize() << Instruction::MUL; in copyArrayToMemory()
475 m_context << Instruction::DUP3 << Instruction::ADD << Instruction::SWAP2; in copyArrayToMemory()
479 m_context << Instruction::SWAP1; in copyArrayToMemory()
481 m_context << Instruction::SWAP1; in copyArrayToMemory()
487 m_context << u256(0) << Instruction::SWAP1; in copyArrayToMemory()
495 m_context << Instruction::DUP2 << Instruction::SLOAD; in copyArrayToMemory()
496 m_context << Instruction::DUP2 << Instruction::MSTORE; in copyArrayToMemory()
498 m_context << Instruction::SWAP1 << u256(1) << Instruction::ADD; in copyArrayToMemory()
500 m_context << Instruction::SWAP1 << u256(32) << Instruction::ADD; in copyArrayToMemory()
506 m_context << Instruction::DUP3 << Instruction::DUP3; in copyArrayToMemory()
508 m_context << Instruction::DUP2 << u256(0); in copyArrayToMemory()
519 m_context << Instruction::SWAP1; in copyArrayToMemory()
520 m_context << storageSize << Instruction::ADD; in copyArrayToMemory()
521 m_context << Instruction::SWAP1; in copyArrayToMemory()
525 m_context << Instruction::DUP1 << dupInstruction(haveByteOffset ? 5 : 4); in copyArrayToMemory()
526 m_context << Instruction::GT; in copyArrayToMemory()
530 m_context << Instruction::SWAP1 << Instruction::POP; in copyArrayToMemory()
541 m_context << Instruction::DUP3 << Instruction::SWAP1 << Instruction::SUB; in copyArrayToMemory()
542 m_context << u256(31) << Instruction::AND; in copyArrayToMemory()
543 m_context << Instruction::DUP3 << Instruction::ADD; in copyArrayToMemory()
544 m_context << Instruction::SWAP2; in copyArrayToMemory()
546 m_context << loopEnd << Instruction::POP << Instruction::POP; in copyArrayToMemory()
570 _context << Instruction::POP; // remove byte offset in clearArray()
574 _context << Instruction::POP; in clearArray()
581 << u256(0) << Instruction::DUP2 << Instruction::SSTORE in clearArray()
582 << u256(1) << Instruction::ADD; in clearArray()
583 _context << u256(0) << Instruction::SWAP1 << Instruction::SSTORE; in clearArray()
594 << Instruction::POP in clearArray()
595 << u256(_type.baseType()->storageSize()) << Instruction::ADD; in clearArray()
602 _context << Instruction::DUP1 << _type.length(); in clearArray()
604 _context << Instruction::ADD << Instruction::SWAP1; in clearArray()
609 _context << Instruction::POP; in clearArray()
624 m_context << u256(0) << Instruction::DUP3 << Instruction::SSTORE; in clearDynamicArray()
630 m_context << Instruction::DUP1 << u256(31) << Instruction::LT; in clearDynamicArray()
632 m_context << Instruction::POP; in clearDynamicArray()
640 m_context << Instruction::SWAP1; in clearDynamicArray()
643 m_context << Instruction::SWAP1 << Instruction::DUP2 << Instruction::ADD in clearDynamicArray()
644 << Instruction::SWAP1; in clearDynamicArray()
652 m_context << Instruction::POP; in clearDynamicArray()
685 _context << Instruction::DUP3 << Instruction::SLOAD; in resizeDynamicArray()
689 _context << Instruction::DUP2 << u256(31) << Instruction::LT; in resizeDynamicArray()
691 _context << Instruction::DUP3 << u256(31) << Instruction::LT; in resizeDynamicArray()
699 _context << Instruction::DUP3 << u256(8) << Instruction::MUL; in resizeDynamicArray()
700 _context << u256(0x100) << Instruction::SUB; in resizeDynamicArray()
701 _context << u256(2) << Instruction::EXP; in resizeDynamicArray()
703 _context << Instruction::DUP1 << Instruction::SWAP2; in resizeDynamicArray()
704 _context << Instruction::DIV << Instruction::MUL; in resizeDynamicArray()
706 _context << Instruction::DUP3 << Instruction::DUP1 << Instruction::ADD; in resizeDynamicArray()
707 _context << Instruction::OR; in resizeDynamicArray()
709 _context << Instruction::DUP4 << Instruction::SSTORE; in resizeDynamicArray()
720 _context << u256(0xff) << Instruction::NOT << Instruction::AND; in resizeDynamicArray()
722 _context << Instruction::DUP4; in resizeDynamicArray()
724 _context << Instruction::SSTORE; in resizeDynamicArray()
727 _context << Instruction::DUP2 << Instruction::DUP1 << Instruction::ADD; in resizeDynamicArray()
728 _context << u256(1) << Instruction::ADD; in resizeDynamicArray()
730 _context << Instruction::DUP4 << Instruction::SSTORE; in resizeDynamicArray()
737 _context << Instruction::DUP3 << u256(31) << Instruction::LT; in resizeDynamicArray()
746 _context << Instruction::POP << Instruction::DUP3; in resizeDynamicArray()
748 _context << Instruction::DUP1 << Instruction::SLOAD << Instruction::SWAP1; in resizeDynamicArray()
750 _context << Instruction::DUP3; in resizeDynamicArray()
752 _context << Instruction::DUP2 << Instruction::ADD << Instruction::SWAP1; in resizeDynamicArray()
755 _context << Instruction::POP; in resizeDynamicArray()
762 _context << Instruction::POP; in resizeDynamicArray()
768 _context << Instruction::DUP2; in resizeDynamicArray()
771 _context << Instruction::DUP1 << Instruction::ADD << u256(1) << Instruction::ADD; in resizeDynamicArray()
772 _context << Instruction::DUP4 << Instruction::SSTORE; in resizeDynamicArray()
774 _context << Instruction::DUP2 << Instruction::DUP2 in resizeDynamicArray()
775 << Instruction::GT << Instruction::ISZERO; in resizeDynamicArray()
781 _context << Instruction::DUP2; in resizeDynamicArray()
785 _context << Instruction::DUP4; in resizeDynamicArray()
788 _context << Instruction::SWAP2 << Instruction::DUP3 << Instruction::ADD; in resizeDynamicArray()
790 _context << Instruction::SWAP2 << Instruction::ADD; in resizeDynamicArray()
799 _context << Instruction::POP << Instruction::POP << Instruction::POP; in resizeDynamicArray()
821 m_context << Instruction::DUP1 << Instruction::SLOAD << Instruction::DUP1; in incrementDynamicArraySize()
839 m_context << Instruction::POP << Instruction::POP; in incrementDynamicArraySize()
858 m_context << Instruction::DUP1 << Instruction::SLOAD << Instruction::DUP1; in popStorageArrayElement()
907 m_context << Instruction::POP << Instruction::POP << Instruction::POP; in popStorageArrayElement()
914 m_context << Instruction::DUP1; in popStorageArrayElement()
916 m_context << Instruction::ISZERO; in popStorageArrayElement()
920 m_context << u256(1) << Instruction::SWAP1 << Instruction::SUB; in popStorageArrayElement()
925 m_context << Instruction::DUP2 << Instruction::DUP2; in popStorageArrayElement()
933 m_context << Instruction::SWAP1 << Instruction::SSTORE; in popStorageArrayElement()
949 _context << Instruction::POP; in clearStorageLoop()
958 Instruction::DUP1 << in clearStorageLoop()
959 Instruction::DUP3 << in clearStorageLoop()
960 Instruction::GT << in clearStorageLoop()
961 Instruction::ISZERO; in clearStorageLoop()
967 _context << Instruction::POP; in clearStorageLoop()
969 _context << _type->storageSize() << Instruction::ADD; in clearStorageLoop()
973 _context << Instruction::POP; in clearStorageLoop()
988 m_context << Instruction::POP << u256(1); in convertLengthToSize()
993 << u256(itemsPerSlot - 1) << Instruction::ADD in convertLengthToSize()
994 << u256(itemsPerSlot) << Instruction::SWAP1 << Instruction::DIV; in convertLengthToSize()
998 m_context << _arrayType.baseType()->storageSize() << Instruction::MUL; in convertLengthToSize()
1008 m_context << Instruction::MUL; in convertLengthToSize()
1011 m_context << u256(31) << Instruction::ADD in convertLengthToSize()
1012 << u256(32) << Instruction::DUP1 in convertLengthToSize()
1013 << Instruction::SWAP2 << Instruction::DIV << Instruction::MUL; in convertLengthToSize()
1030 m_context << Instruction::MLOAD; in retrieveLength()
1033 m_context << Instruction::SLOAD; in retrieveLength()
1052 m_context << Instruction::DUP2 << Instruction::LT << Instruction::ISZERO; in accessIndex()
1058 m_context << Instruction::SWAP1 << Instruction::POP; in accessIndex()
1066 m_context << u256(_arrayType.memoryHeadSize()) << Instruction::MUL; in accessIndex()
1068 m_context << u256(32) << Instruction::ADD; in accessIndex()
1070 m_context << Instruction::DUP2; in accessIndex()
1071 m_context << Instruction::ADD; in accessIndex()
1077 m_context << Instruction::MUL; in accessIndex()
1081 m_context << Instruction::DUP2; in accessIndex()
1082 m_context << Instruction::ADD; in accessIndex()
1087 m_context << Instruction::DUP2; in accessIndex()
1089 m_context << Instruction::SWAP1; in accessIndex()
1096 m_context << Instruction::SWAP1; in accessIndex()
1097 m_context << Instruction::DUP2 << Instruction::SLOAD; in accessIndex()
1098 m_context << u256(1) << Instruction::AND << Instruction::ISZERO; in accessIndex()
1101 m_context << Instruction::SWAP1; in accessIndex()
1105 m_context << Instruction::SWAP1; in accessIndex()
1114 m_context << u256(itemsPerSlot) << Instruction::SWAP2; in accessIndex()
1117 << Instruction::DUP3 << Instruction::DUP3 in accessIndex()
1118 << Instruction::DIV << Instruction::ADD in accessIndex()
1120 << Instruction::SWAP2 << Instruction::SWAP1 in accessIndex()
1121 << Instruction::MOD; in accessIndex()
1123 m_context << u256(byteSize) << Instruction::MUL; in accessIndex()
1128 m_context << _arrayType.baseType()->storageSize() << Instruction::MUL; in accessIndex()
1129 m_context << Instruction::ADD << u256(0); in accessIndex()
1194 m_context << u256(_byteSize) << Instruction::ADD; in incrementByteOffset()
1200 << Instruction::ADD << Instruction::DIV; in incrementByteOffset()
1205 << Instruction::ADD << swapInstruction(_storageOffsetPosition); in incrementByteOffset()
1208 m_context << u256(1) << Instruction::SUB; in incrementByteOffset()
1211 m_context << Instruction::MUL; in incrementByteOffset()
1214 << dupInstruction(_byteOffsetPosition + 1) << Instruction::MUL in incrementByteOffset()
1215 << swapInstruction(_byteOffsetPosition) << Instruction::POP; in incrementByteOffset()