Skip to content

Instantly share code, notes, and snippets.

View tomaka's full-sized avatar

Pierre Krieger tomaka

  • Freelance
  • Berlin, Germany
View GitHub Profile
[build]
rustflags = ["-Ctarget-cpu=native", "-Ctarget-feature=+crt-static", "-Zunstable-options"]
callq lua_tointegerx
cmpl $0, 64(%rsp)
je .LBB6_1
movabsq $2486786064384, %rcx
imulq %rcx, %rax
sarq $32, %rax
movq %rsi, %rcx
movq %rax, %rdx
callq lua_pushinteger
error[E0275]: overflow evaluating the requirement `hlua::Lua: hlua::AsMutLua<'_>`
|
= note: consider adding a `#![recursion_limit="128"]` attribute to your crate
= note: required because of the requirements on the impl of `hlua::AsMutLua<'_>` for `&mut hlua::Lua`
= note: required because of the requirements on the impl of `hlua::AsMutLua<'_>` for `&mut &mut hlua::Lua`
= note: required because of the requirements on the impl of `hlua::AsMutLua<'_>` for `&mut &mut &mut hlua::Lua`
= note: required because of the requirements on the impl of `hlua::AsMutLua<'_>` for `&mut &mut &mut &mut hlua::Lua`
= note: required because of the requirements on the impl of `hlua::AsMutLua<'_>` for `&mut &mut &mut &mut &mut hlua::Lua`
= note: required because of the requirements on the impl of `hlua::AsMutLua<'_>` for `&mut &mut &mut &mut &mut &mut hlua::Lua`
macro_rules! query {
($db:ident, $query:expr, [$($param:expr),*], {$($out_field:ident: $ty:ty),+ }) => ({
#[derive(Debug, Clone)]
#[allow(non_snake_case)]
struct Output {
$(
$out_field: $ty,
)+
}
_ZN4test13test_smallvec17h7a853d9d03ae64b2E:
.Ltmp12:
.seh_proc _ZN4test13test_smallvec17h7a853d9d03ae64b2E
pushq %r15
.Ltmp13:
.seh_pushreg 15
pushq %r14
.Ltmp14:
.seh_pushreg 14
pushq %rsi
fn test_smallvec(val1: u32, val2: u32) {
let array: SmallVec<[_; 2]> = [val1, val2].iter().cloned().collect();
ptr(array.as_ptr());
}
@tomaka
tomaka / mod.rs
Last active August 12, 2016 14:10
extern crate coreaudio;
extern crate libc;
use std::sync::mpsc::{channel, Sender, Receiver};
use std::sync::{Arc, Mutex};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::cell::RefCell;
use std::mem;
use std::cmp;
use std::marker::PhantomData;
@tomaka
tomaka / lib.rs
Created April 18, 2016 08:40 — forked from reem/lib.rs
Fast atomic typed arena in rust.
//! # sync-arena
use std::mem;
use std::marker::PhantomData;
use std::sync::atomic::{AtomicUsize, Ordering};
pub struct TypedArena<T> {
root: AtomicUsize,
phantom: PhantomData<Option<InnerArena<T>>>
}
#![feature(test)]
extern crate test;
use test::Bencher;
use std::thread;
#[bench]
fn thread(b: &mut Bencher) {
b.iter(|| {
vkGetInstanceProcAddr - 0 * 9223372036.9s = 0ns (0.0%)
vkCreateInstance - 0 * 9223372036.9s = 0ns (0.0%)
vkEnumeratePhysicalDevices - 0 * 9223372036.9s = 0ns (0.0%)
vkGetPhysicalDeviceProperties - 0 * 9223372036.9s = 0ns (0.0%)
vkGetPhysicalDeviceQueueFamilyProperties - 0 * 9223372036.9s = 0ns (0.0%)
vkGetPhysicalDeviceMemoryProperties - 0 * 9223372036.9s = 0ns (0.0%)
vkGetPhysicalDeviceFeatures - 0 * 9223372036.9s = 0ns (0.0%)
vkCreateDebugReportCallbackEXT - 0 * 9223372036.9s = 0ns (0.0%)
vkCreateWin32SurfaceKHR - 0 * 9223372036.9s = 0ns (0.0%)
vkGetPhysicalDeviceSurfaceSupportKHR - 0 * 9223372036.9s = 0ns (0.0%)