Skip to content

Commit ec8cc99

Browse files
committed
fix: remove Rvalue::Len, fix custom JSON spec file, add new needed lang items to just_main_func
1 parent 7d28478 commit ec8cc99

File tree

3 files changed

+8
-22
lines changed

3 files changed

+8
-22
lines changed

jvm-unknown-unknown.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
"tier": 3
1818
},
1919
"panic-strategy": "abort",
20-
"target-pointer-width": "32",
20+
"target-pointer-width": 32,
2121
"llvm-target": "jvm-unknown-unknown"
2222
}

src/lower1/control_flow/rvalue.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -200,26 +200,6 @@ pub fn convert_rvalue_to_operand<'a>(
200200
}
201201
}
202202

203-
Rvalue::Len(source_place) => {
204-
let temp_len_var = generate_temp_var_name(&base_temp_name);
205-
let source_name = place_to_string(source_place, tcx);
206-
instructions.push(oomir::Instruction::Length {
207-
dest: temp_len_var.clone(),
208-
array: oomir::Operand::Variable {
209-
name: source_name,
210-
ty: ty_to_oomir_type(
211-
source_place.ty(&mir.local_decls, tcx).ty,
212-
tcx,
213-
data_types,
214-
),
215-
},
216-
});
217-
result_operand = oomir::Operand::Variable {
218-
name: temp_len_var,
219-
ty: oomir::Type::I32,
220-
};
221-
}
222-
223203
Rvalue::Cast(_cast_kind, operand, target_mir_ty) => {
224204
let temp_cast_var = generate_temp_var_name(&base_temp_name);
225205
let oomir_target_type = ty_to_oomir_type(*target_mir_ty, tcx, data_types);

tests/binary/just_main_func/src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@ fn main() {
77
}
88

99
#[lang = "sized"]
10-
trait Sized {}
10+
trait Sized {}
11+
12+
#[lang = "meta_sized"]
13+
trait MetaSized {}
14+
15+
#[lang = "pointee_sized"]
16+
trait PointeeSized {}

0 commit comments

Comments
 (0)