Abort early if there is nothing to encode or decode.

This commit is contained in:
chriseth committed 2017-06-30 14:16:16 +02:00
1 parent 735c977db1
commit 71d866cd7a
2 files changed
+9 -3

No files matched your search

+3
View File
@@ -180,6 +180,9 @@ void CompilerUtils::encodeToMemory(
t = t->mobileType()->interfaceType(_encodeAsLibraryTypes)->encodingType();
}
if (_givenTypes.empty())
return;
// Stack during operation:
// <v1> <v2> ... <vn> <mem_start> <dyn_head_1> ... <dyn_head_r> <end_of_mem>
// The values dyn_head_i are added during the first loop and they point to the head part