Merge branch 'main' into drop_specialization

Signed-off-by: J Teeuwissen <jelleteeuwissen@hotmail.nl>
This commit is contained in:
J Teeuwissen 2023-04-26 20:26:37 +02:00 committed by GitHub
commit 7439ee0c8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
229 changed files with 3602 additions and 2412 deletions

View file

@ -885,7 +885,7 @@ impl<'a, 'r> WasmBackend<'a, 'r> {
self.code_builder.f32_eq();
}
ValueType::F64 => {
self.code_builder.f64_const(f64::from_bits(*value as u64));
self.code_builder.f64_const(f64::from_bits(*value));
self.code_builder.f64_eq();
}
}
@ -1114,7 +1114,7 @@ impl<'a, 'r> WasmBackend<'a, 'r> {
match storage {
StoredValue::VirtualMachineStack { value_type, .. } => {
match (lit, value_type) {
(Literal::Float(x), ValueType::F64) => self.code_builder.f64_const(*x as f64),
(Literal::Float(x), ValueType::F64) => self.code_builder.f64_const(*x),
(Literal::Float(x), ValueType::F32) => self.code_builder.f32_const(*x as f32),
(Literal::Int(x), ValueType::I64) => {
self.code_builder.i64_const(i128::from_ne_bytes(*x) as i64)

View file

@ -506,7 +506,7 @@ impl<'a> CodeBuilder<'a> {
stack_size
);
let new_len = stack_size - pops as usize;
let new_len = stack_size - pops;
current_stack.truncate(new_len);
if push {
current_stack.push(Symbol::WASM_TMP);

View file

@ -1956,6 +1956,8 @@ impl<'a> LowLevelCall<'a> {
backend.storage.load_symbols(code_builder, self.arguments);
}
PtrWrite => todo!("{:?}", self.lowlevel),
Hash => todo!("{:?}", self.lowlevel),
Eq | NotEq => self.eq_or_neq(backend),