Copy byte array to storage.

This commit is contained in:
chriseth
2020-10-29 18:53:15 +01:00
parent 14d7ca49c0
commit 1066af3b98
10 changed files with 100 additions and 1 deletions
@@ -20,5 +20,7 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x20, 0x8, 0x40, 0x3, 0x9, 0xa, 0xb
@@ -7,5 +7,7 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x80, 0x21, 0x40, 0x7, "abcdefg" -> 0x21, 0x40, 0x7, "abcdefg"
@@ -14,5 +14,7 @@ contract c {
uint8(data[97]) == 97;
}
}
// ====
// compileViaYul: also
// ----
// test1() -> true
@@ -10,6 +10,8 @@ contract c {
bytes data;
}
// ====
// compileViaYul: also
// ----
// getLength() -> 0
// set(): 1, 2 -> true
@@ -6,5 +6,7 @@ contract C {
return s[0];
}
}
// ====
// compileViaYul: also
// ----
// f() -> "a"
@@ -5,5 +5,7 @@ contract C {
return s[0];
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x08, "abcdefgh" -> "a"
@@ -32,5 +32,7 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f(bytes): 0x20, 0x5, "abcde" -> 0
@@ -8,6 +8,8 @@ contract C {
bytes savedData;
}
// ====
// compileViaYul: also
// ----
// save() -> 24 # empty copy loop #
// save(): "abcdefg" -> 24