@@ -356,6 +356,8 @@ pub struct Function {
356356 /// This indexmap stores the accounts this functions needs to be called on Solana
357357 /// The string is the account's name
358358 pub solana_accounts : RefCell < IndexMap < String , SolanaAccount > > ,
359+ /// List of contracts this function creates
360+ pub creates : Vec < ( pt:: Loc , usize ) > ,
359361}
360362
361363/// This struct represents a Solana account. There is no name field, because
@@ -463,6 +465,7 @@ impl Function {
463465 annotations : ConstructorAnnotations :: default ( ) ,
464466 mangled_name_contracts : HashSet :: new ( ) ,
465467 solana_accounts : IndexMap :: new ( ) . into ( ) ,
468+ creates : Vec :: new ( ) ,
466469 }
467470 }
468471
@@ -888,12 +891,6 @@ pub enum Expression {
888891 ty : Type ,
889892 value : Vec < u8 > ,
890893 } ,
891- CodeLiteral {
892- loc : pt:: Loc ,
893- contract_no : usize ,
894- // runtime code rather than deployer (evm only)
895- runtime : bool ,
896- } ,
897894 NumberLiteral {
898895 loc : pt:: Loc ,
899896 ty : Type ,
@@ -1248,10 +1245,6 @@ pub enum Expression {
12481245 kind : Builtin ,
12491246 args : Vec < Expression > ,
12501247 } ,
1251- InterfaceId {
1252- loc : pt:: Loc ,
1253- contract_no : usize ,
1254- } ,
12551248 List {
12561249 loc : pt:: Loc ,
12571250 list : Vec < Expression > ,
@@ -1268,6 +1261,10 @@ pub enum Expression {
12681261 ty : Type ,
12691262 event_no : usize ,
12701263 } ,
1264+ TypeOperator {
1265+ loc : pt:: Loc ,
1266+ ty : Type ,
1267+ } ,
12711268}
12721269
12731270#[ derive( PartialEq , Eq , Clone , Default , Debug ) ]
@@ -1508,16 +1505,15 @@ impl Recurse for Expression {
15081505 }
15091506
15101507 Expression :: NumberLiteral { .. }
1511- | Expression :: InterfaceId { .. }
15121508 | Expression :: InternalFunction { .. }
15131509 | Expression :: ConstantVariable { .. }
15141510 | Expression :: StorageVariable { .. }
15151511 | Expression :: Variable { .. }
15161512 | Expression :: RationalNumberLiteral { .. }
1517- | Expression :: CodeLiteral { .. }
15181513 | Expression :: BytesLiteral { .. }
15191514 | Expression :: BoolLiteral { .. }
1520- | Expression :: EventSelector { .. } => ( ) ,
1515+ | Expression :: EventSelector { .. }
1516+ | Expression :: TypeOperator { .. } => ( ) ,
15211517 }
15221518 }
15231519 }
@@ -1528,7 +1524,6 @@ impl CodeLocation for Expression {
15281524 match self {
15291525 Expression :: BoolLiteral { loc, .. }
15301526 | Expression :: BytesLiteral { loc, .. }
1531- | Expression :: CodeLiteral { loc, .. }
15321527 | Expression :: NumberLiteral { loc, .. }
15331528 | Expression :: RationalNumberLiteral { loc, .. }
15341529 | Expression :: StructLiteral { loc, .. }
@@ -1587,11 +1582,11 @@ impl CodeLocation for Expression {
15871582 | Expression :: Assign { loc, .. }
15881583 | Expression :: List { loc, list : _ }
15891584 | Expression :: FormatString { loc, format : _ }
1590- | Expression :: InterfaceId { loc, .. }
15911585 | Expression :: And { loc, .. }
15921586 | Expression :: NamedMember { loc, .. }
15931587 | Expression :: UserDefinedOperator { loc, .. }
1594- | Expression :: EventSelector { loc, .. } => * loc,
1588+ | Expression :: EventSelector { loc, .. }
1589+ | Expression :: TypeOperator { loc, .. } => * loc,
15951590 }
15961591 }
15971592}
@@ -1777,6 +1772,12 @@ pub enum Builtin {
17771772 ECRecover ,
17781773 StringConcat ,
17791774 BytesConcat ,
1775+ TypeMin ,
1776+ TypeMax ,
1777+ TypeName ,
1778+ TypeInterfaceId ,
1779+ TypeRuntimeCode ,
1780+ TypeCreatorCode ,
17801781}
17811782
17821783#[ derive( PartialEq , Eq , Clone , Debug ) ]
0 commit comments