Rearrange ast::node_t fields to improve packing

This commit is contained in:
ridiculousfish 2020-07-12 14:08:11 -07:00
parent 487de1e6c3
commit c12ab7a674

View File

@ -211,15 +211,15 @@ void accept_field_visitor(FieldVisitor &v, bool reverse, Field &field, Rest &...
/// node_t is the base node of all AST nodes.
/// It is not a template: it is possible to work concretely with this type.
struct node_t {
/// The parent node, or null if this is root.
const node_t *parent{nullptr};
/// The type of this node.
const type_t type;
/// The category of this node.
const category_t category;
/// The parent node, or null if this is root.
const node_t *parent{nullptr};
constexpr explicit node_t(type_t t, category_t c) : type(t), category(c) {}
/// Disallow copying, etc.