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
| auto fres = trans_lval(bcx, f); | |
| bcx = fres.res.bcx; | |
| // FIXME: Evaluate arguments | |
| auto nameval = make_task_name(bcx, name); | |
| auto newtask = trans_upcall(bcx, "upcall_new_task", | |
| vec(vp2i(bcx, nameval))); | |
| bcx = newtask.bcx; | |
| auto task_ty = node_ann_type(bcx.fcx.ccx, ann); |
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
| fn find_outer_scope_cx(@block_ctxt cx) -> @block_ctxt { | |
| auto scope_cx = find_scope_cx(cx); | |
| alt (cx.parent) { | |
| case (parent_some(?b)) { | |
| be find_scope_cx(b); | |
| } | |
| case (parent_none) { | |
| fail; | |
| } | |
| } |
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
| auto r_ty = ty.expr_ty(e); | |
| auto r2 = incr_all_refcnts(bcx, r.val, r_ty); | |
| bcx = r2.bcx; | |
| auto r_val = load_scalar_or_boxed(bcx, r.val, r_ty); | |
| find_outer_scope_cx(cx).cleanups += | |
| vec(clean(bind drop_ty(_, r_val, r_ty))); |
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
| fn id[T](&T t) -> T { | |
| ret t; | |
| } | |
| fn main() { | |
| auto expected = @100; | |
| auto actual = id[@int](expected); | |
| log *actual; | |
| check (*expected == *actual); | |
| } |
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
| define internal fastcc void @_rust_fn1_id(i8*, %task*, %1*, %tydesc*, i8*) { | |
| allocas: | |
| br label %"function top level3" | |
| "function top level3": ; preds = %allocas | |
| %5 = getelementptr %tydesc* %3, i32 0, i32 0 | |
| %6 = load %tydesc*** %5 | |
| %7 = getelementptr %tydesc* %3, i32 0, i32 3 | |
| %8 = load void (i1*, %task*, i1*, %tydesc**, i8*)** %7 | |
| %9 = ptrtoint void (i1*, %task*, i1*, %tydesc**, i8*)* %8 to i32 |
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
| define internal fastcc void @_rust_fn1_id(i8*, %task*, %1*, %tydesc*, i8*) { | |
| allocas: | |
| %5 = getelementptr %tydesc* %3, i32 0, i32 0 | |
| %6 = load %tydesc*** %5 | |
| %7 = getelementptr %tydesc* %3, i32 0, i32 3 | |
| %8 = load void (i1*, %task*, i1*, %tydesc**, i8*)** %7 | |
| %9 = ptrtoint void (i1*, %task*, i1*, %tydesc**, i8*)* %8 to i32 | |
| %10 = ptrtoint %tydesc* %3 to i32 | |
| %11 = add i32 %9, %10 | |
| %12 = inttoptr i32 %11 to void (i1*, %task*, i1*, %tydesc**, i8*)* |
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
| mod foo { | |
| export bar; | |
| fn bar() { | |
| foo.baz(); | |
| } | |
| fn baz() { | |
| } |
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
| mod foo { | |
| export f; | |
| export g; | |
| tag t { | |
| t1; | |
| } | |
| fn f() -> t { | |
| ret t1; |
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
| fn main() { | |
| auto a = { | |
| auto b = tup(3u16); | |
| b | |
| }; | |
| } |
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
| use std; | |
| import std::task; | |
| tag request { | |
| quit; | |
| close(int, chan[bool]); | |
| } | |
| type ctx = chan[request]; |
OlderNewer