MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / claim_gathered_comments

Method claim_gathered_comments

cranelift/reader/src/parser.rs:516–525  ·  view source on GitHub ↗

Claim the comments gathered up to the current position for the given entity.

(&mut self, entity: E)

Source from the content-addressed store, hash-verified

514 // Claim the comments gathered up to the current position for the
515 // given entity.
516 fn claim_gathered_comments<E: Into<AnyEntity>>(&mut self, entity: E) {
517 debug_assert!(self.gathering_comments);
518 let entity = entity.into();
519 self.comments.extend(
520 self.gathered_comments
521 .drain(..)
522 .map(|text| Comment { entity, text }),
523 );
524 self.gathering_comments = false;
525 }
526
527 // Get the comments collected so far, clearing out the internal list.
528 fn take_comments(&mut self) -> Vec<Comment<'a>> {

Callers 13

parse_testFunction · 0.80
parse_functionMethod · 0.80
parse_stack_slot_declMethod · 0.80
parse_signature_declMethod · 0.80
parse_function_declMethod · 0.80
parse_constant_declMethod · 0.80
parse_basic_blockMethod · 0.80

Calls 3

extendMethod · 0.45
mapMethod · 0.45
drainMethod · 0.45

Tested by

no test coverage detected