From 7871e4eef058fba998e2c9819e85b1b2240883af Mon Sep 17 00:00:00 2001 From: "lightclient@protonmail.com" Date: Sun, 26 Sep 2021 18:29:39 +0200 Subject: [PATCH] simplify the constructor --- src/ctor.etk | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/ctor.etk b/src/ctor.etk index 61c58b8..a1d672a 100644 --- a/src/ctor.etk +++ b/src/ctor.etk @@ -5,17 +5,14 @@ push4 10000 # [balance, 0] caller # [caller, balance, 0] sstore # [0] -push1 start # [start, 0] -dup1 # [start, start, 0] -codesize # [codesize, start, start, 0] -sub # [length, start, 0] -swap2 # [0, start, length] -swap1 # [start, 0, length] -dup3 # [length, start, 0, length] -swap1 # [start, length, 0, length] -dup3 # [0, start, length, 0, length] +%push(end - start) # [length, 0] +swap1 # [0, length] +dup2 # [length, 0, length] +push1 start # [start, length, 0, length] +dup3 # [0, start, length, 0, length] codecopy # [0, length] return # [] start: %include("jump_table.etk") +end: