Skip to content

Commit

Permalink
Let AInlined & VInlined share the same field type
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao committed Apr 2, 2024
1 parent 3801401 commit bc0e2d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hld/Eval.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ enum VarAddress {
AAddr( ptr : Pointer, t : HLType );
AMethod( v : Value, ptr : Pointer, t : HLType );
AEvaled( v : Value );
AInlined( fields : Array<{ name : String, addr : VarAddress }> );
AInlined( fields : Array<InlinedField> );
}

class Eval {
Expand Down
4 changes: 3 additions & 1 deletion hld/Value.hx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ enum ValueRepr {
VType( t : HLType );
VEnum( c : String, values : Array<Value>, p : Pointer );
VBytes( length : Int, read : Int -> Int, p : Pointer );
VInlined( fields : Array<{ name : String, addr : Eval.VarAddress }> );
VInlined( fields : Array<InlinedField> );
}

enum FunRepr {
FUnknown( p : Pointer );
FIndex( i : Int );
}

typedef InlinedField = { name : String, addr : Eval.VarAddress }

@:structInit class Value {
public var v : ValueRepr;
public var t : HLType;
Expand Down

0 comments on commit bc0e2d0

Please sign in to comment.