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
The following Fe expressions should be mapped to Yul, like so:
Fe
Yul
a + b
add(a', b')
a - b
sub(a', b')
a * b
mul(a', b')
a / b
div(a', b')
Where a and b are vyp::Exprs and a' and b' are yul::Expressions.
todo:
call a new function expr_bin_operationhere that returns an ExtExpression.
add a match statement to expr_bin_operation that matches the Add, Sub, Mult, and Div operations and calls more new functions expr_add, expr_sub, expr_mult, and expr_div. (mark all other branches as unimplemented)
match both the left and right ExtExpression types (i.e. (Base::U256, Base::U256)) in each of the expr_ functions and return a new ExtExpression of type U256 with an expression containing the correct arithmetic function.
add a test contract with a function that takes two params, adds them together, and returns the result.
Note: the Base::U256 enum value should contain a U256 struct with arithmetic functions attached to it. However, this is not necessary at the moment.
The following Fe expressions should be mapped to Yul, like so:
a + b
add(a', b')
a - b
sub(a', b')
a * b
mul(a', b')
a / b
div(a', b')
Where a and b are
vyp::Expr
s and a' and b' areyul::Expression
s.todo:
expr_bin_operation
here that returns anExtExpression
.expr_bin_operation
that matches theAdd
,Sub
,Mult
, andDiv
operations and calls more new functionsexpr_add
,expr_sub
,expr_mult
, andexpr_div
. (mark all other branches as unimplemented)ExtExpression
types (i.e.(Base::U256, Base::U256)
) in each of theexpr_
functions and return a new ExtExpression of typeU256
with an expression containing the correct arithmetic function.Note: the
Base::U256
enum value should contain aU256
struct with arithmetic functions attached to it. However, this is not necessary at the moment.Fits into #21.
The text was updated successfully, but these errors were encountered: