git.haldean.org expel / ac6fd2d
actually I don't think we need the graph type at all Haldean Brown 6 years ago
6 changed file(s) with 0 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
183183
184184 /* The result node in the graph. */
185185 struct xl_dagc_node *result;
186
187 /* The effective type of the graph. */
188 struct xl_value *type;
189186 };
190187
191188 /* Starts the expel runtime.
585585 return err;
586586 }
587587
588 err = xl_take(result->type);
589 if (err != OK)
590 return err;
591
592588 return OK;
593589 }
8383 err = xl_type_func_apply(node->head.known_type, node->func->known_type);
8484 if (err != OK)
8585 return err;
86 err = xl_type_func_apply(result->type, proto->type);
87 if (err != OK)
88 return err;
8986
9087 node->head.flags |= XL_DAGC_FLAG_COMPLETE;
9188 return OK;
606606 if (err != OK)
607607 return err;
608608 }
609 err = xl_release(g->type);
610 if (err != OK)
611 return err;
612609
613610 bzero(g, sizeof(*g));
614611 free(g);
482482 xl_word n_nodes;
483483 xl_word result_idx;
484484 xl_word identity_idx;
485 xl_word type_idx;
486485 size_t i;
487486 xl_error err;
488487 xl_tag tag;
506505
507506 READ_INTO(identity_idx, sp);
508507 identity_idx = ntohw(identity_idx);
509
510 READ_INTO(type_idx, sp);
511 type_idx = ntohw(type_idx);
512508
513509 /* This binary is too large to be read on this machine. Note that
514510 * performing this check up front means that we don't have to worry
573569 else
574570 (*graph)->identity = NULL;
575571
576 if (type_idx >= n_values)
577 return xl_raise(ERR_BAD_HEADER, "type_idx > n_values");
578 (*graph)->type = values[type_idx];
579 err = xl_take((*graph)->type);
580 if (err != OK)
581 return err;
582
583572 (*graph)->tag = tag;
584573 return OK;
585574 }
8787 graph->nodes[arity]->flags = 0x00;
8888
8989 graph->result = graph->nodes[arity];
90
91 err = xl_value_new(&graph->type);
92 if (err != OK)
93 return err;
94 graph->type->tag |= TAG_LEFT_WORD | TAG_RIGHT_WORD;
95 graph->type->left.w = 0;
96 graph->type->right.w = 0;
9790
9891 err = xl_dagc_init(graph);
9992 if (err != OK)