Skip to content

Commit

Permalink
fixup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Jul 16, 2023
1 parent 7ff644e commit 856c2a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vyper/codegen/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ def make_byte_array_copier(dst, src):
len_ = get_bytearray_length(src)
ret.append(STORE(dst, len_))

# store the 1 word of data
# store the single data word.
dst_data_ptr = bytes_data_ptr(dst)
src_data_ptr = bytes_data_ptr(src)
ret.append(STORE(dst_data_ptr, LOAD(src_data_ptr)))
return b1.resolve(ret)

# batch copy the length word + data using copy_bytes.
# batch copy the bytearray (including length word) using copy_bytes
len_ = add_ofst(get_bytearray_length(src), 32)
max_bytes = src.typ.maxlen + 32
ret = copy_bytes(dst, src, len_, max_bytes)
Expand Down Expand Up @@ -230,7 +230,7 @@ def _dynarray_make_setter(dst, src):
n_bytes = add_ofst(_mul(count, element_size), 32)
max_bytes = 32 + src.typ.count * element_size

# copy the entire dynarray, including length word
# batch copy the entire dynarray, including length word
ret.append(copy_bytes(dst, src, n_bytes, max_bytes))

return b1.resolve(b2.resolve(ret))
Expand Down

0 comments on commit 856c2a6

Please sign in to comment.