mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Reattach docs to the items they describe
This commit is contained in:
@@ -207,8 +207,6 @@ impl<'a, 'e, N> RecordInput<'a, 'e, N> {
|
||||
}
|
||||
}
|
||||
|
||||
/// The raw lazy input handed to a poll kernel whose input rides records while
|
||||
/// the kernel consumes the plain element.
|
||||
/// # Safety
|
||||
/// `rec` must be a record of the layout the offsets were resolved against
|
||||
/// and `El` its element type; both are proven at wiring.
|
||||
@@ -216,6 +214,8 @@ unsafe fn element_only<El: Clone>(rec: Rec<'_>, _reads: &[Option<usize>]) -> El
|
||||
unsafe { read_element::<El>(rec) }
|
||||
}
|
||||
|
||||
/// The raw lazy input handed to a poll kernel whose input rides records while
|
||||
/// the kernel consumes the plain element.
|
||||
pub struct ElementInput<'a, 'e, Out, N> {
|
||||
node: &'a N,
|
||||
layout: &'a Layout,
|
||||
|
||||
@@ -334,7 +334,6 @@ pub fn empty_layout() -> &'static Layout {
|
||||
EMPTY.get_or_init(Layout::default)
|
||||
}
|
||||
|
||||
/// Declarative record-io metadata for a node type, emitted by the macro into
|
||||
/// A record node's output layout with the frame size and carrier copy plan derived from it.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct RecordLayout {
|
||||
@@ -347,6 +346,7 @@ pub struct RecordLayout {
|
||||
pub lane_invariant: u32,
|
||||
}
|
||||
|
||||
/// Declarative record-io metadata for a node type, emitted by the macro into
|
||||
/// its registry entry so the compiler can fold each input's layout without
|
||||
/// running the node's constructor. [`fold`](LayoutMeta::fold) reproduces the
|
||||
/// layout the constructor derives at wiring today; the compiler layout pass
|
||||
@@ -436,13 +436,13 @@ impl LayoutMeta {
|
||||
let layout = self.fold(inputs);
|
||||
let frame_bytes = layout.frame_bytes();
|
||||
let plan = match self.sources.first() {
|
||||
// A reducer collapses its carrier's levels, so it writes a fresh record rather than copying fields down.
|
||||
Some(&source) if self.level_delta >= 0 => {
|
||||
let from = inputs[source as usize].expect("layout resolve source input has no layout");
|
||||
let carry_element = matches!(self.element, ElementSpec::Carried);
|
||||
let removes: Vec<(&str, u8)> = self.removes.clone();
|
||||
copy_plan(from, &layout, carry_element, &removes)
|
||||
}
|
||||
// A reducer collapses its carrier's levels, so it writes a fresh record rather than copying fields down.
|
||||
_ => Vec::new(),
|
||||
};
|
||||
RecordLayout {
|
||||
|
||||
@@ -143,9 +143,6 @@ impl<Input, N> Node<Input> for SharedSource<N>
|
||||
where
|
||||
N: Node<Input> + ?Sized,
|
||||
{
|
||||
/// A node takes exactly its own frame out of its caller's free space: the
|
||||
/// caller minted the claim and kept the cursor, so the frame accounting is
|
||||
/// structural here and asserted where a claim is split.
|
||||
fn serve<'e, 'l>(&self, input: &Input, slot: crate::record::FrameClaim<'e, 'l>) -> crate::gpoll::GPoll<crate::record::Served<'e>>
|
||||
where
|
||||
Input: crate::context::ExtractArena<ArenaRef = &'e crate::arena::Arena>,
|
||||
|
||||
Reference in New Issue
Block a user