This file contains hidden or 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
; optimize with 'opt -O2 -S' to get the file below. note the undef on line 30 of the result | |
declare i32 @upcall_rust_personality() | |
declare i32 @extern_fn(i32*) | |
define internal void @cleanup_fn() alwaysinline { | |
ret void | |
} |
This file contains hidden or 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
opt -lint stage1/rustc.bc | |
WARNING: You're attempting to print out a bitcode file. | |
This is inadvisable as it may cause display problems. If | |
you REALLY want to taste LLVM bitcode first-hand, you | |
can force output with the `-f' option. | |
Undefined behavior: Call argument type mismatches callee parameter type | |
tail call void bitcast (void (%task*, i8*, i8*, i32)* @upcall_fail to void (%struct.rust_task*, i8*, i8*, i32)*)(%struct.rust_task* %task, i8* getelementptr inbounds ([42 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8]* @.str1, i32 0, i32 0), i32 45) |
This file contains hidden or 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
(gdb) run -c -o stage2/lib/glue.o --glue | |
Starting program: e:\rust/stage2/rustc.exe -c -o stage2/lib/glue.o --glue | |
[New Thread 980.0x910] | |
Program received signal SIGSEGV, Segmentation fault. | |
0x00ffffff in ?? () | |
(gdb) bt | |
#0 0x00ffffff in ?? () | |
#1 0x63cb4ad2 in __do_global_ctors () from e:\rust\stage2\std.dll | |
#2 0x63c41167 in DllMainCRTStartup@12 () from e:\rust\stage2\std.dll |
This file contains hidden or 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
(gdb) bt | |
#0 0xf7fdf430 in __kernel_vsyscall () | |
#1 0xf6d02ea1 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 | |
#2 0xf6d062ce in abort () at abort.c:92 | |
#3 0xf6cfb7c8 in __assert_fail (assertion=0xf7b3b818 "Ty && \"Invalid GetElementPtrInst indices for type!\"", | |
file=0xf7b3b544 "/home/marijn/prog/llvm/include/llvm/Instructions.h", line=703, function=0xf7dc5540 "llvm::Type* llvm::checkGEPType(llvm::Type*)") | |
at assert.c:81 | |
#4 0xf7a045b1 in llvm::IRBuilder<true, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<true> >::CreateInBoundsGEP(llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::Twine const&) () from /home/marijn/src/rust/stage1/librustllvm.so | |
#5 0xf6b9f068 in ?? () | |
#6 0x79543a3a in ?? () |
This file contains hidden or 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
tag a { | |
left(int); | |
right(bool); | |
} | |
fn sabotage(@rec(mutable a foo) x) { | |
x.foo = left(0); | |
} | |
fn main() { |
This file contains hidden or 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
(defclass test-data () | |
((id :col-type serial :initarg :id :accessor test-id) | |
(a :col-type (or (varchar 100) db-null) :initarg :a :accessor test-a) | |
(b :col-type boolean :col-default nil :initarg :b :accessor test-b)) | |
(:metaclass dao-class) | |
(:table-name dao-test) | |
(:keys id)) | |
(deftable test-data |
This file contains hidden or 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
commit ff98487d35883e8a55827c992da9c2f43fa55068 | |
Author: Marijn Haverbeke <[email protected]> | |
Date: Thu Apr 28 14:20:35 2011 +0200 | |
stab at taking/dropping function args | |
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs | |
index 3e316ab..335b706 100644 | |
--- a/src/comp/middle/trans.rs | |
+++ b/src/comp/middle/trans.rs |
This file contains hidden or 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
tag name { long(str); short(char); } | |
fn main() { | |
if (long("Abc") == long("Def")) { | |
log_err "ARGH"; | |
} | |
} |
This file contains hidden or 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
cc1plus: warnings being treated as errors | |
In file included from ./src/rt/rust_internal.h:48, | |
from ./src/rt/rust.cpp:1: | |
./src/rt/sync/lock_free_queue.h: In member function ‘bool lock_free_queue<T>::compare_and_swap(lock_free_queue<T>::pointer_t*, lock_free_queue<T>::pointer_t*, lock_free_queue<T>::pointer_t) [with T = rust_message*]’: | |
./src/rt/sync/lock_free_queue.h:154: instantiated from ‘void lock_free_queue<T>::enqueue(T) [with T = rust_message*]’ | |
./src/rt/rust_message.h:119: instantiated from here | |
./src/rt/sync/lock_free_queue.h:91: error: dereferencing type-punned pointer will break strict-aliasing rules | |
make: *** [rt/rust.o] Error 1 |
This file contains hidden or 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() { | |
function keywords(str) { | |
var obj = {}, words = str.split(" "); | |
for (var i = 0; i < words.length; ++i) obj[words[i]] = true; | |
return obj; | |
} | |
var phpKeywords = | |
keywords("abstract and array as break case catch cfunction class clone const continue declare " + | |
"default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends " + | |
"final for foreach function global goto if implements interface instanceof namespace " + |