MCPcopy Create free account
hub / github.com/cretz/stackparam / add_stack_params_field

Function add_stack_params_field

src/manip.rs:131–144  ·  view source on GitHub ↗
(class_file: &mut Classfile)

Source from the content-addressed store, hash-verified

129}
130
131unsafe fn add_stack_params_field(class_file: &mut Classfile) {
132 // Add "private transient Object[][] stackParams" field
133 let field_name_idx = ConstantPoolIndex { idx: utf8_const(class_file, "stackParams") };
134 let field_desc_idx = ConstantPoolIndex { idx: utf8_const(class_file, "[[Ljava/lang/Object;") };
135 class_file.fields.push(Field {
136 access_flags: AccessFlags { flags: FieldAccessFlags::Private as u16 + FieldAccessFlags::Transient as u16 },
137 name_index: field_name_idx,
138 descriptor_index: field_desc_idx,
139 attributes: Vec::new(),
140 });
141
142 // Note, we choose not to explicitly set the stackParams field to null in Throwable
143 // constructors because we do it in fillInStackTrace one way or another
144}
145
146unsafe fn add_native_stack_params_method(class_file: &mut Classfile) {
147 // Create native stackParamFillInStackTrace(Thread)

Callers 1

manip_throwable_classFunction · 0.85

Calls 1

utf8_constFunction · 0.85

Tested by

no test coverage detected