You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.
In order to support arbitrary-sized arrays as arguments of the constructor, we have to know the bytecode size beforehand, so we can use it along with the CODESIZE opcode to parse the arguments bits.
Following an exchange with @JetJadeja on Twitter, a potential solution is to define a reserved keyword, which the compiler knows to replace with a PUSH operation of the bytecode size.
I have a working PoC here. We probably want to change the keyword as I am using scodesize__, along with OperationType.SCODESIZE and the replacement that is done at the end of the compile function.
The text was updated successfully, but these errors were encountered:
I think that __codesize is not supported yet by huffc? Plus, it only gives you the size of a macro, so we would need to call it for both MAIN and CONSTRUCTOR then add the two values (3 operations) vs just 1 if we inject the bytecode size directly.
In order to support arbitrary-sized arrays as arguments of the constructor, we have to know the bytecode size beforehand, so we can use it along with the
CODESIZE
opcode to parse the arguments bits.Following an exchange with @JetJadeja on Twitter, a potential solution is to define a reserved keyword, which the compiler knows to replace with a
PUSH
operation of the bytecode size.I have a working PoC here. We probably want to change the keyword as I am using
scodesize__
, along withOperationType.SCODESIZE
and the replacement that is done at the end of thecompile
function.The text was updated successfully, but these errors were encountered: