We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97c4fa5 commit a6b07f9Copy full SHA for a6b07f9
cilly/src/bin/asmedit.rs
@@ -360,7 +360,7 @@ fn misolate(asm: &mut Assembly, isolate_id: Interned<MethodRef>) {
360
}
361
fn parse_id(id: &str, asm: &Assembly) -> Interned<MethodRef> {
362
if let Ok(id) = id.parse::<u32>() {
363
- unsafe { Interned::from_index(NonZeroU32::new(id).unwrap()) }
+ Interned::from_index(NonZeroU32::new(id).unwrap())
364
} else {
365
let Some(mut iter) = asm.find_methods_matching(id) else {
366
panic!("{id:?} is neithier a method name nor a method id")
cilly/src/v2/asm.rs
@@ -185,7 +185,9 @@ impl Assembly {
185
let method_def_idxs: Box<[_]> = self.method_defs.keys().copied().collect();
186
for method in method_def_idxs {
187
let mut tmp_method = self.method_def(method).clone();
188
- tmp_method.typecheck(self);
+ if let Err(err) = tmp_method.typecheck(self) {
189
+ eprintln!("{err:?}");
190
+ };
191
192
193
#[must_use]
cilly/src/v2/asm_link.rs
@@ -108,10 +108,10 @@ impl Assembly {
108
super::Const::Null(cref) => super::Const::Null(self.translate_class_ref(source, *cref)),
109
super::Const::ByteBuffer { data, tpe } => {
110
let tpe = self.translate_type(source, source[*tpe]);
111
- (super::Const::ByteBuffer {
+ super::Const::ByteBuffer {
112
data: self.alloc_const_data(&source.const_data[*data]),
113
tpe: self.alloc_type(tpe),
114
- })
+ }
115
116
_ => cst.clone(),
117
cilly/src/v2/builtins/atomics.rs
@@ -1,7 +1,7 @@
1
use crate::{
2
asm::MissingMethodPatcher,
3
bimap::Interned,
4
- cilnode::{ExtendKind, MethodKind, PtrCastRes},
+ cilnode::{ExtendKind, MethodKind},
5
cilroot::BranchCond,
6
BasicBlock, BinOp, CILNode, CILRoot, ClassRef, Const, Int, MethodImpl, MethodRef, Type,
7
};
cilly/src/v2/builtins/int128/mod.rs
@@ -1,6 +1,6 @@
- asm::MissingMethodPatcher, cilnode::UnOp, Assembly, BasicBlock, BinOp, BranchCond, CILNode,
- CILRoot, ClassRef, Const, Int, MethodImpl, Type,
+ asm::MissingMethodPatcher, Assembly, BasicBlock, BinOp, BranchCond, CILNode, CILRoot, ClassRef,
+ Const, Int, MethodImpl, Type,
fn op_direct(
cilly/src/v2/builtins/mod.rs
@@ -429,7 +429,8 @@ pub fn insert_exeception_stub(asm: &mut Assembly, patcher: &mut MissingMethodPat
429
Some(NonZeroU32::new(8).unwrap()),
430
None,
431
true,
432
- ));
+ ))
433
+ .unwrap();
434
insert_catch_unwind_stub(asm, patcher);
435
436
pub fn insert_exception(asm: &mut Assembly, patcher: &mut MissingMethodPatcher) {
cilly/src/v2/builtins/simd/binop.rs
asm::MissingMethodPatcher, tpe::simd::SIMDElem, Assembly, BasicBlock, BinOp, CILNode, CILRoot,
- Const, Int, Interned, MethodImpl, MethodRef, Type,
+ Const, Interned, MethodImpl, MethodRef, Type,
macro_rules! binop {
($op_name:ident,$op_dotnet:literal) => {
@@ -108,7 +108,7 @@ fn simd_binop(
pub fn fallback_simd(asm: &mut Assembly, patcher: &mut MissingMethodPatcher) {
simd_binop(
- |asm, lhs, rhs, elem, res_tpe| {
+ |asm, lhs, rhs, _, res_tpe| {
let res = asm.biop(lhs, rhs, BinOp::Lt);
asm.int_cast(
res,
@@ -121,7 +121,7 @@ pub fn fallback_simd(asm: &mut Assembly, patcher: &mut MissingMethodPatcher) {
121
patcher,
122
);
123
124
125
let res = asm.biop(lhs, rhs, BinOp::Eq);
126
127
cilly/src/v2/builtins/simd/eq.rs
@@ -1,8 +1,6 @@
- asm::MissingMethodPatcher,
- bimap::Interned,
- tpe::simd::{SIMDElem, SIMDVector},
- Assembly, BasicBlock, BinOp, CILNode, CILRoot, Const, MethodImpl, MethodRef, Type,
+ asm::MissingMethodPatcher, bimap::Interned, Assembly, BasicBlock, CILNode, CILRoot, MethodImpl,
+ MethodRef, Type,
8
use super::dotnet_vec_cast;
cilly/src/v2/c_exporter/mod.rs
@@ -715,13 +715,15 @@ impl CExporter {
715
CILNode::LdStaticField(static_field_idx) => {
716
let field = asm[static_field_idx];
717
let class = asm[field.owner()].clone();
718
- let fname = class_member_name(&asm[class.name()], &asm[field.name()]);
+ let fname =
719
+ class_member_name(&asm[class.name()], &escape_nonfn_name(&asm[field.name()]));
720
fname.to_string()
721
722
CILNode::LdStaticFieldAdress(static_field_idx) => {
723
724
725
726
727
format!("&{}", fname)
728
729
CILNode::LdFtn(method) => mref_to_name(&asm[method], asm),
@@ -951,7 +953,8 @@ impl CExporter {
951
953
CILRoot::SetStaticField { field, val } => {
952
954
let field = asm[field];
955
956
957
958
let val = Self::node_to_string(asm[val].clone(), asm, locals, inputs, sig)?;
959
format!("{fname} = {val};")
960
cilly/src/v2/cilroot.rs
@@ -1,9 +1,8 @@
use serde::{Deserialize, Serialize};
use super::{
- bimap::{BiMapIndex, Interned, IntoBiMapIndex},
- cilnode::IsPure,
- Assembly, CILNode, FieldDesc, Float, FnSig, Int, MethodRef, StaticFieldDesc, Type,
+ bimap::Interned, cilnode::IsPure, Assembly, CILNode, FieldDesc, Float, FnSig, Int, MethodRef,
+ StaticFieldDesc, Type,
use crate::{cil_root::CILRoot as V1Root, IString};
9
//use crate::cil_node::CILNode as V1Node;
0 commit comments