[struct] Lifetime: 48
[struct] Path: 104
[struct] def_id: 16
[struct] TyParam: 32
[struct] Generics: 16
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::hashmap::HashMap; | |
#[deriving(Eq,Clone,IterBytes)] | |
pub struct Ident(u32); | |
#[deriving(Clone)] | |
pub struct Pos { | |
col: u16, | |
row: u16 | |
} |
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
; ModuleID = 'test.rc' | |
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" | |
target triple = "x86_64-unknown-linux-gnu" | |
%struct.Foo = type { [10 x i64] } | |
%tydesc = type { i64, i64, void ({}*, i8*)*, void ({}*, i8*)*, void ({}*, i8*)*, void ({}*, i8*)*, i64, { i8*, i64 } } | |
@_rust_crate_map_toplevel = global { i32, i64, [2 x i64] } { i32 1, i64 ptrtoint ([1 x { i64, i64 }]* @_rust_mod_map to i64), [2 x i64] [i64 ptrtoint (i64* @_rust_crate_map_std_0.9-pre_6c65cf4b443341b1 to i64), i64 0] } | |
@_rust_crate_map_std_0.9-pre_6c65cf4b443341b1 = external global i64 | |
@_rust_mod_map = internal global [1 x { i64, i64 }] zeroinitializer |
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
<?php | |
/* | |
Horrible Memory Corruption Bug. | |
So using PHPUnit, the file below (more-or-less) gets included inside a function as bootstrapping | |
script for PHPUnit. The first time it runs (i.e. no bytecode cache) it works fine. The second | |
causes a segfault in release mode. It asserts if assertions are turned on (-DALWAYS_ASSERT). | |
The assertion is: |
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
/* | |
This is some hypothetical builder object that mutably | |
borrows a `Map` then does stuff to it. But the map itself | |
has a bounded lifetime. | |
What compiles is this: | |
*/ | |
struct Builder<'self> { |
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
extern mod std; | |
extern mod syntax; | |
use syntax::ast::*; | |
use std::sys::size_of; | |
macro_rules! type_size ( | |
(S $t:ident) => (print_type_size::<$t>("struct", stringify!($t))); | |
(E $t:ident) => (print_type_size::<$t>("enum", stringify!($t))) | |
) |
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
_ZN7rt_exit17_96fb77fd6c6361db3_00E: | |
.cfi_startproc | |
cmpq %fs:112, %rsp | |
ja .LBB5_2 | |
movabsq $8, %r10 | |
movabsq $0, %r11 | |
callq __morestack | |
ret | |
.LBB5_2: | |
pushq %rbp |
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
#[inline(always)] | |
unsafe fn syscall0(n: int) -> int { | |
let mut ret : int = 0; | |
asm!("syscall" : "={rax}"(ret) : "{rax}"(n) : "rcx", "r11", "memory" : "volatile"); | |
return ret; | |
} | |
#[inline(always)] |
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
#[allow(default_methods)]; | |
trait Foo { | |
pub fn visit_crate(&mut self) { | |
self.visit_mod([1,2,3]) | |
} | |
pub fn visit_mod(&mut self, a: &[uint]) { | |
for a.iter().advance |i| { | |
self.visit_item(i); |
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
execve("./test", ["./test"], [/* 54 vars */]) = 0 | |
brk(0) = 0x6f8000 | |
readlink("/proc/self/exe", "/home/james/tmp/test", 4096) = 20 | |
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb03fd5d000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/home/james/tmp/../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/tls/x86_64/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/home/james/tmp/../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/tls/x86_64", 0x7fff360cf100) = -1 ENOENT (No such file or directory) | |
open("/home/james/tmp/../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/tls/librt.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) | |
stat("/home/james/tmp/../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib/tls", 0x7fff360cf100) = -1 ENOENT (No such file or directory) | |
open("/home/james/tmp/../../../usr/local/lib/rustc/x86_64-unknown-linux-gnu/lib |