mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-03 23:28:11 +08:00
Drop the unread kernel field from the intent IR
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
//! The intent IR: a node built from its signature, from which lowering derives.
|
//! The intent IR: a node built from its signature, from which lowering derives.
|
||||||
|
// Fields below the `Node` root are read by the IR's own tests only.
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
||||||
use crate::codegen::classify::{Dialect, RoutingIo, bare_ident, context_param, dialect, flip_carrier, generic_assignment, generic_extractable, is_served, record_shape, routing_io, slot_value_type};
|
use crate::codegen::classify::{Dialect, RoutingIo, bare_ident, context_param, dialect, flip_carrier, generic_assignment, generic_extractable, is_served, record_shape, routing_io, slot_value_type};
|
||||||
@@ -13,7 +14,6 @@ pub(crate) fn build(parsed: &ParsedNodeFn) -> Node {
|
|||||||
let generic_idents: Vec<Ident> = generics.iter().map(|generic| generic.ident.clone()).collect();
|
let generic_idents: Vec<Ident> = generics.iter().map(|generic| generic.ident.clone()).collect();
|
||||||
let fields: Vec<&ParsedField> = parsed.fields.iter().filter(|field| !field.is_data_field).collect();
|
let fields: Vec<&ParsedField> = parsed.fields.iter().filter(|field| !field.is_data_field).collect();
|
||||||
Node {
|
Node {
|
||||||
kernel: Kernel { fn_name: parsed.fn_name.clone() },
|
|
||||||
monomorphizations: monomorphizations(parsed, &fields, &generic_idents),
|
monomorphizations: monomorphizations(parsed, &fields, &generic_idents),
|
||||||
inputs: inputs(parsed, &fields, &generic_idents),
|
inputs: inputs(parsed, &fields, &generic_idents),
|
||||||
output: output(parsed, &generic_idents),
|
output: output(parsed, &generic_idents),
|
||||||
@@ -496,7 +496,6 @@ pub(crate) fn lazy_binding(node: &Node, index: usize) -> LazyBinding {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) struct Node {
|
pub(crate) struct Node {
|
||||||
pub(crate) kernel: Kernel,
|
|
||||||
pub(crate) generics: Vec<Generic>,
|
pub(crate) generics: Vec<Generic>,
|
||||||
/// Correlated rows (zipped `#[implementations]`, not crossed); empty = erased.
|
/// Correlated rows (zipped `#[implementations]`, not crossed); empty = erased.
|
||||||
pub(crate) monomorphizations: Vec<ImplRow>,
|
pub(crate) monomorphizations: Vec<ImplRow>,
|
||||||
@@ -507,11 +506,6 @@ pub(crate) struct Node {
|
|||||||
pub(crate) derives: bool,
|
pub(crate) derives: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The kernel fn the node wraps.
|
|
||||||
pub(crate) struct Kernel {
|
|
||||||
pub(crate) fn_name: Ident,
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) struct Generic {
|
pub(crate) struct Generic {
|
||||||
pub(crate) ident: Ident,
|
pub(crate) ident: Ident,
|
||||||
pub(crate) bounds: Vec<TypeParamBound>,
|
pub(crate) bounds: Vec<TypeParamBound>,
|
||||||
|
|||||||
Reference in New Issue
Block a user