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

Function gen_group

cranelift/codegen/meta/src/gen_settings.rs:395–411  ·  view source on GitHub ↗
(group: &SettingGroup, parent: ParentGroup, fmt: &mut Formatter)

Source from the content-addressed store, hash-verified

393}
394
395fn gen_group(group: &SettingGroup, parent: ParentGroup, fmt: &mut Formatter) {
396 // Generate struct.
397 fmtln!(fmt, "#[derive(Clone, PartialEq, Hash)]");
398 fmt.doc_comment(format!("Flags group `{}`.", group.name));
399 fmt.add_block("pub struct Flags", |fmt| {
400 fmtln!(fmt, "bytes: [u8; {}],", group.byte_size());
401 });
402
403 gen_constructor(group, parent, fmt);
404 gen_iterator(group, fmt);
405 gen_enum_types(group, fmt);
406 gen_getters(group, fmt);
407 gen_descriptors(group, fmt);
408 gen_template(group, fmt);
409 gen_display(group, fmt);
410 gen_hash_key(fmt);
411}
412
413pub(crate) fn generate(
414 settings: &SettingGroup,

Callers 1

generateFunction · 0.85

Calls 10

gen_constructorFunction · 0.85
gen_iteratorFunction · 0.85
gen_enum_typesFunction · 0.85
gen_gettersFunction · 0.85
gen_descriptorsFunction · 0.85
gen_templateFunction · 0.85
gen_displayFunction · 0.85
gen_hash_keyFunction · 0.85
doc_commentMethod · 0.80
add_blockMethod · 0.45

Tested by

no test coverage detected