From 856c2a691fa091eaa01901660b7f074f262e44ff Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Sun, 16 Jul 2023 16:03:31 -0400 Subject: [PATCH] fixup comments --- vyper/codegen/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vyper/codegen/core.py b/vyper/codegen/core.py index 95a2a23e73..f47f88ac85 100644 --- a/vyper/codegen/core.py +++ b/vyper/codegen/core.py @@ -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) @@ -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))