mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-08 16:07:43 +00:00
Better representation of tag containment, which will allow us to discern backreferences
This commit is contained in:
parent
a4a8bea3cc
commit
01a76e21a6
@ -88,6 +88,11 @@ type tag_info =
|
|||||||
{ tag_idents: (Ast.ident, (int * node_id * Ast.ty_tup)) Hashtbl.t;
|
{ tag_idents: (Ast.ident, (int * node_id * Ast.ty_tup)) Hashtbl.t;
|
||||||
tag_nums: (int, (Ast.ident * node_id * Ast.ty_tup)) Hashtbl.t; }
|
tag_nums: (int, (Ast.ident * node_id * Ast.ty_tup)) Hashtbl.t; }
|
||||||
|
|
||||||
|
type tag_graph_node = {
|
||||||
|
mutable tgn_index: int option;
|
||||||
|
tgn_children: opaque_id Queue.t;
|
||||||
|
}
|
||||||
|
|
||||||
type ctxt =
|
type ctxt =
|
||||||
{ ctxt_sess: Session.sess;
|
{ ctxt_sess: Session.sess;
|
||||||
ctxt_frame_args: (node_id,node_id list) Hashtbl.t;
|
ctxt_frame_args: (node_id,node_id list) Hashtbl.t;
|
||||||
@ -111,9 +116,8 @@ type ctxt =
|
|||||||
ctxt_all_lvals: (node_id,Ast.lval) Hashtbl.t;
|
ctxt_all_lvals: (node_id,Ast.lval) Hashtbl.t;
|
||||||
ctxt_call_lval_params: (node_id,Ast.ty array) Hashtbl.t;
|
ctxt_call_lval_params: (node_id,Ast.ty array) Hashtbl.t;
|
||||||
|
|
||||||
(* Each pair (a, b) in this table indicates that tag a contains all the
|
(* A directed graph that encodes the containment relation among tags. *)
|
||||||
* tags in the list b. *)
|
ctxt_tag_containment: (opaque_id, tag_graph_node) Hashtbl.t;
|
||||||
ctxt_tag_containment: (opaque_id, opaque_id Queue.t) Hashtbl.t;
|
|
||||||
|
|
||||||
(* definition id --> definition *)
|
(* definition id --> definition *)
|
||||||
ctxt_all_defns: (node_id,defn) Hashtbl.t;
|
ctxt_all_defns: (node_id,defn) Hashtbl.t;
|
||||||
|
Loading…
Reference in New Issue
Block a user