Commit Graph

22 Commits

Author SHA1 Message Date
Seungbae.yu 2697e44d81
all: change format `0x%x` to `%#x` (#25221) 2022-07-04 11:03:32 +03:00
Håvard Anda Estensen e644d45c14
all: use strings.EqualFold for string comparison (#24890) 2022-05-17 13:56:52 +02:00
s7v7nislands 330e53fbb9
core/asm: use strings.Builder and fix godoc issues (#24861) 2022-05-16 11:39:07 +02:00
zgfzgf 356bbe343a
core/asm: change order of items in stringtokenTypes (#24153)
This orders the items in slice definition same as the enum values.
2021-12-26 14:58:17 +01:00
Evolution404 b7a91663ab
core/asm: fix the bug of "00" prefix number (#22883) 2021-05-18 10:22:58 +02:00
Michael Forney 3a0480e07d core/asm: allow numbers in labels (#20362)
Numbers were already allowed when creating labels, just not when
referencing them.
2019-11-23 12:52:17 +01:00
Michael Forney b0b277525c core/asm: assembly parser label fixes (#20210)
* core/asm: Fix encoding of pushed labels

EVM uses big-endian byte-order, so to pad a label value to 4 bytes,
zeros must be added to the front, not the end.

* core/asm: Fix PC calculations when a label is pushed

Incrementing PC by 5 is only correct if the label appears after a jump,
in which case there is an implicit push. When it appears after an explicit
push, PC should only be incremented by 4.

* core/asm: Allow JUMP with no argument

This way, a label can be pushed explicitly, or loaded from memory to
implement a jump table.
2019-10-29 13:47:18 +01:00
Corey Lin 768b4c2e6b asm: remove unused parameter for function Lex (#18058) 2019-03-14 10:35:55 +01:00
Guillaume Ballet 97b2806686 core/asm: Use hexadecimal addresses in assembly dumps (#17870) 2018-10-09 10:27:07 +03:00
Caesar Chad ec192f18b4 core/asm: correct comments typo (#16974)
* core/asm/compiler: correct comments typo

core/asm/compiler: correct comments typo

* Correct comments typo
2018-06-14 16:24:35 +03:00
Caesar Chad f04c0e341e core/asm: correct comments typo (#16975)
core/asm/lexer: correct comments typo
2018-06-14 11:32:19 +03:00
dm4 c514fbccc0 core/asm: accept uppercase instructions (#16531) 2018-04-19 15:31:30 +02:00
dm4 49e38c970e core/asm: remove unused condition (#16487) 2018-04-18 01:08:31 +02:00
thomasmodeneis ba1030b6b8 build: enable goimports and varcheck linters (#16446) 2018-04-18 00:53:50 +02:00
hydai 7c131f4d6d core/asm: fixed typo (posititon -> position) (#16366) 2018-03-26 13:48:39 +03:00
hydai a063876749 core/asm: fixed typo (labal -> label) (#16313) 2018-03-14 11:59:06 +02:00
Mark Rushakoff 98ec5e5011 core/asm: rename isAlphaNumeric to isLetter (#16212)
The function would return false for numbers, so isLetter is a more
accurate description of the behavior.
2018-02-28 12:20:07 +02:00
Zach 3da1bf8ca1 all: use gometalinter.v2, fix new gosimple issues (#15650) 2017-12-12 19:05:47 +01:00
Fiisio 02b4d074f6 core/asm: use ContainsRune instead of IndexRune (#15098) 2017-09-07 23:11:48 +02:00
njupt-moon 53f3460ab5 core/asm: fix hex number lexing (#14861) 2017-07-31 13:02:36 +02:00
Jeffrey Wilcke 230cf2ec91 cmd/evm, core/asm: add EVM assembler (#3686)
The evm compile command implements a simple assembly language that compiles to
EVM bytecode.
2017-03-01 01:11:24 +01:00
Valentin Wüstholz 37511ec520 core, core/vm, cmd/disasm: unify procedures for disassembling evm code (#3530) 2017-02-27 12:21:19 +01:00