about summary refs log blame commit diff stats
path: root/util.c
blob: abd82defb07cddee6a50117452a15ee94ce19a8f (plain) (tree)
n">value = nth_type(callsite_type, element_type->value-START_TYPE_INGREDIENTS); } replace_type_ingredients(element_type->right, callsite_type->right); } type_ordinal nth_type(type_tree* base, long long int n) { assert(n >= 0); if (n == 0) return base->value; // todo: base->left return nth_type(base->right, n-1); } :(scenario get_address_on_generic_container) container foo:_t [ x:_t y:number ] recipe main [ 10:foo:point <- merge 14, 15, 16 1:address:number <- get-address 10:foo:point, 1:offset ] +mem: storing 12 in location 1 :(before "End GET_ADDRESS field Cases") if (Type[base_type].elements.at(i)->value >= START_TYPE_INGREDIENTS) { result += size_of_type_ingredient(Type[base_type].elements.at(i), base.type->right); continue; } :(scenario get_on_generic_container_inside_generic_container) container foo:_t [ x:_t y:number ] container bar [ x:foo:point y:number ] recipe main [ 1:bar <- merge 14, 15, 16, 17 2:number <- get 1:bar, 1:offset ] +mem: storing 17 in location 2