Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov committed Jan 3, 2025
1 parent 7635e85 commit 16c9544
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions system-contracts/contracts/EvmEmulator.yul
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ object "EvmEmulator" {
swapActivePointerWithBytecodePointer()
opcode := shr(248, activePointerLoad(ip))
swapActivePointerWithBytecodePointer()
// STOP else
}

// It is the responsibility of the caller to ensure that start and length is correct
Expand All @@ -337,7 +336,7 @@ object "EvmEmulator" {
}

function swapActivePointerWithBytecodePointer() {
verbatim_2i_0o("active_ptr_swap", 0, 4)
verbatim_2i_0o("active_ptr_swap", 0, 2)
}

function activePointerLoad(pos) -> res {
Expand Down Expand Up @@ -2122,7 +2121,7 @@ object "EvmEmulator" {
let counter
counter, sp, stackHead := popStackItem(sp, stackHead)

// Counter certainly can't be bigger than uint64.
// Counter certainly can't be bigger than uint32.
if gt(counter, MAX_UINT32()) {
panic()
}
Expand Down Expand Up @@ -2152,7 +2151,7 @@ object "EvmEmulator" {
continue
}

// Counter certainly can't be bigger than uint64.
// Counter certainly can't be bigger than uint32.
if gt(counter, MAX_UINT32()) {
panic()
}
Expand Down Expand Up @@ -3242,7 +3241,6 @@ object "EvmEmulator" {
swapActivePointerWithBytecodePointer()
opcode := shr(248, activePointerLoad(ip))
swapActivePointerWithBytecodePointer()
// STOP else
}

// It is the responsibility of the caller to ensure that start and length is correct
Expand All @@ -3268,7 +3266,7 @@ object "EvmEmulator" {
}

function swapActivePointerWithBytecodePointer() {
verbatim_2i_0o("active_ptr_swap", 0, 4)
verbatim_2i_0o("active_ptr_swap", 0, 2)
}

function activePointerLoad(pos) -> res {
Expand Down Expand Up @@ -5041,7 +5039,7 @@ object "EvmEmulator" {
let counter
counter, sp, stackHead := popStackItem(sp, stackHead)

// Counter certainly can't be bigger than uint64.
// Counter certainly can't be bigger than uint32.
if gt(counter, MAX_UINT32()) {
panic()
}
Expand Down Expand Up @@ -5071,7 +5069,7 @@ object "EvmEmulator" {
continue
}

// Counter certainly can't be bigger than uint64.
// Counter certainly can't be bigger than uint32.
if gt(counter, MAX_UINT32()) {
panic()
}
Expand Down
4 changes: 2 additions & 2 deletions system-contracts/evm-emulator/EvmEmulatorLoop.template.yul
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ for { } true { } {
let counter
counter, sp, stackHead := popStackItem(sp, stackHead)

// Counter certainly can't be bigger than uint64.
// Counter certainly can't be bigger than uint32.
if gt(counter, MAX_UINT32()) {
panic()
}
Expand Down Expand Up @@ -804,7 +804,7 @@ for { } true { } {
continue
}

// Counter certainly can't be bigger than uint64.
// Counter certainly can't be bigger than uint32.
if gt(counter, MAX_UINT32()) {
panic()
}
Expand Down

0 comments on commit 16c9544

Please sign in to comment.