second-state / SOLL

SOLL is a new compiler for generate Ewasm from solidity and yul. See a demo here: https://asciinema.org/a/ezJqNLicn5fya02zwu4VXIo8a
https://www.secondstate.io/
378 stars 24 forks source link

Type cast confused in builtin functions #108

Open jacky860226 opened 3 years ago

jacky860226 commented 3 years ago

For example, in function CodeGenModule::emitCall:

https://github.com/second-state/SOLL/blob/master/lib/CodeGen/CodeGenModule.cpp#L2142

https://github.com/second-state/SOLL/blob/master/lib/CodeGen/CodeGenModule.cpp#L2156

Type of AddressPtr is determined by isEVM() or isEWASM().

hydai commented 3 years ago

This depends on the final EEI call. Actually, you can find that EVM external functions have totally different function types from EWASM ones. So we have to use different builtin functions to convert them into their own function types.