This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl LIns { | |
/// Returns instruction result type | |
#[inline(always)] | |
pub const fn ret_type(&self) -> LIRTy { | |
RET_TYPES[self.opcode as usize] | |
} | |
#[inline] | |
pub const fn is_live(&self) -> bool { | |
self.is_v() | self.is_call() | self.is_op(LOpcode::ParamQ) | self.is_result_live |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codegen irGenerator; | |
for (auto* module : Module::getAllImportedModules()) { | |
irGenerator.compile(*module); | |
} | |
auto& mainModule = irGenerator.compile(module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Clone, PartialEq, Eq, Copy, Debug)] | |
#[repr(u8)] | |
pub enum IncrementalState { | |
Done, | |
Mark, | |
Sweep, | |
Roots, | |
} | |
pub struct IncrementalMarkAndSweep<'a> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Clone, PartialEq, Eq, Copy, Debug)] | |
#[repr(u8)] | |
pub enum IncrementalState { | |
Done, | |
Mark, | |
Sweep, | |
Roots, | |
} | |
pub struct IncrementalMarkAndSweep<'a> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func swap(x: *i32,y: *i32) void { | |
if x == y { | |
return; | |
} | |
*x = *x ^ *y; | |
*y = *y ^ *x; | |
*x = *x ^ *y; | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub const ALIGN: usize = 2 * core::mem::size_of::<usize>(); | |
pub fn align_usize(value: usize, align: usize) -> usize { | |
if align == 0 { | |
return value; | |
} | |
((value + align - 1) / align) * align | |
} | |
use std::cell::UnsafeCell; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmarking gc vs rc/Immix(30% threshold)/0: Warming up for 3.0000 s | |
Warning: Unable to complete 10 samples in 5.0s. You may wish to increase target time to 5.1s. | |
gc vs rc/Immix(30% threshold)/0 | |
time: [440.09 ms 465.06 ms 487.66 ms] | |
change: [-4.5483% +1.5499% +6.8789%] (p = 0.62 > 0.05) | |
No change in performance detected. | |
Finished 30% threshold benchmark with total 614.4M threshold | |
gc vs rc/Immix(30% threshold) after first bench/0 | |
time: [456.78 ms 472.31 ms 487.89 ms] | |
change: [-1.1698% +3.2781% +7.4036%] (p = 0.18 > 0.05) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function min(left, right) { | |
if (left < right) { | |
return left; | |
} | |
return right; | |
} | |
function sortMerge(dst, src, srcIndex, srcEnd, width, comparator) { | |
"use strict"; | |
var left = srcIndex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
waffle::val::fadd: | |
sub sp, sp, #64 | |
stp x22, x21, [sp, #16] | |
stp x20, x19, [sp, #32] | |
stp x29, x30, [sp, #48] | |
add x29, sp, #48 | |
mov x20, x1 | |
mov x19, x0 | |
mov x21, #2 | |
movk x21, #65534, lsl, #48 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::rc::Rc; | |
use b3::{ValueRep, Reg, BasicBlockBuilder}; | |
use macroassembler::{jit::{gpr_info::*, helpers::AssemblyHelpers}, assembler::{abstract_macro_assembler::Address, TargetMacroAssembler}}; | |
pub fn tail_call(bb: &mut b3::BasicBlockBuilder, callee: b3::ValueId, args: &[b3::ValueId]) { | |
let patchpoint = bb.patchpoint(b3::Type::Void); | |
bb.procedure.patchpoint_effects_mut(patchpoint).terminal = true; | |
bb.procedure.patchpoint_effects_mut(patchpoint).exit_sideways = true; |
OlderNewer