Skip to content

Commit e9d8ff7

Browse files
committed
---
yaml --- r: 16341 b: refs/heads/try c: 8f5f45b h: refs/heads/master i: 16339: 81f31fc v: v3
1 parent d04dbc7 commit e9d8ff7

File tree

14 files changed

+19
-201
lines changed

14 files changed

+19
-201
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 5f4837ad6ac5ceb7277796a817db35b137da4813
5+
refs/heads/try: 8f5f45bfe143b667a4d3bb41963ed130b13fdb7f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,12 @@ STAGE$(1)_T_$(2)_H_$(3) := \
346346
$$(Q)$$(call CFG_RUN_TARG,$(1), \
347347
$$(CFG_VALGRIND_COMPILE$(1)) \
348348
$$(HBIN$(1)_H_$(3))/rustc$$(X) \
349-
--cfg stage$(1) \
350349
$$(CFG_RUSTC_FLAGS) --target=$(2))
351350

352351
PERF_STAGE$(1)_T_$(2)_H_$(3) := \
353352
$$(Q)$$(call CFG_RUN_TARG,$(1), \
354353
$$(CFG_PERF_TOOL) \
355354
$$(HBIN$(1)_H_$(3))/rustc$$(X) \
356-
--cfg stage$(1) \
357355
$$(CFG_RUSTC_FLAGS) --target=$(2))
358356

359357
endef

branches/try/mk/platform.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ ifneq ($(findstring freebsd,$(CFG_OSTYPE)),)
3333
CFG_DEF_SUFFIX := .bsd.def
3434
CFG_INSTALL_NAME =
3535
CFG_PERF_TOOL := /usr/bin/time
36-
37-
# FIXME (1825): We're deadlocking on FreeBSD
38-
ifndef RUST_THREADS
39-
RUST_THREADS=1
40-
export RUST_THREADS
41-
endif
4236
endif
4337

4438
ifneq ($(findstring linux,$(CFG_OSTYPE)),)

branches/try/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ mod extfmt;
201201
mod unicode;
202202
mod priv;
203203
mod cmath;
204-
mod stackwalk;
204+
205205

206206
// Local Variables:
207207
// mode: rust;

branches/try/src/libcore/stackwalk.rs

Lines changed: 0 additions & 54 deletions
This file was deleted.

branches/try/src/libstd/dbg.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export debug_tag;
99
export debug_fn;
1010
export ptr_cast;
1111
export refcount;
12-
export breakpoint;
1312

1413
#[abi = "cdecl"]
1514
native mod rustrt {
@@ -19,7 +18,6 @@ native mod rustrt {
1918
fn debug_tag(td: *sys::type_desc, x: *());
2019
fn debug_fn(td: *sys::type_desc, x: *());
2120
fn debug_ptrcast(td: *sys::type_desc, x: *()) -> *();
22-
fn rust_dbg_breakpoint();
2321
}
2422

2523
fn debug_tydesc<T>() {
@@ -53,18 +51,6 @@ fn refcount<T>(a: @T) -> uint unsafe {
5351
ret *p;
5452
}
5553

56-
#[doc = "Triggers a debugger breakpoint"]
57-
fn breakpoint() {
58-
rustrt::rust_dbg_breakpoint();
59-
}
60-
61-
#[test]
62-
fn test_breakpoint_should_not_abort_process_when_not_under_gdb() {
63-
// Triggering a breakpoint involves raising SIGTRAP, which terminates
64-
// the process under normal circumstances
65-
breakpoint();
66-
}
67-
6854
// Local Variables:
6955
// mode: rust;
7056
// fill-column: 78;

branches/try/src/rt/rust_builtin.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -805,11 +805,6 @@ rust_dbg_call(dbg_callback cb, void *data) {
805805
return cb(data);
806806
}
807807

808-
extern "C" CDECL void
809-
rust_dbg_breakpoint() {
810-
BREAKPOINT_AWESOME;
811-
}
812-
813808
extern "C" CDECL rust_sched_id
814809
rust_osmain_sched_id() {
815810
rust_task *task = rust_get_current_task();

branches/try/src/rt/rust_debug.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,6 @@
77
#include <string>
88
#include <cstdlib>
99

10-
#ifndef _WIN32
11-
12-
#include <signal.h>
13-
#define BREAKPOINT_AWESOME \
14-
do { \
15-
signal(SIGTRAP, SIG_IGN); \
16-
raise(SIGTRAP); \
17-
} while (0)
18-
19-
#else
20-
#define BREAKPOINT_AWESOME
21-
#endif
22-
2310
struct rust_task;
2411

2512
namespace debug {

branches/try/src/rt/rustrt.def.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ rust_dbg_lock_unlock
151151
rust_dbg_lock_wait
152152
rust_dbg_lock_signal
153153
rust_dbg_call
154-
rust_dbg_breakpoint
155154
rust_osmain_sched_id
156155
rust_compare_and_swap_ptr
157156
rust_atomic_increment

branches/try/src/rustc/back/link.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,13 @@ fn link_binary(sess: session,
645645
}
646646

647647
if sess.targ_cfg.os == session::os_freebsd {
648-
cc_args += ["-lrt", "-L/usr/local/lib", "-lexecinfo",
649-
"-L/usr/local/lib/gcc46",
650-
"-L/usr/local/lib/gcc44", "-lstdc++",
651-
"-Wl,-z,origin",
652-
"-Wl,-rpath,/usr/local/lib/gcc46",
653-
"-Wl,-rpath,/usr/local/lib/gcc44"];
648+
cc_args += ["-pthread", "-lrt",
649+
"-L/usr/local/lib", "-lexecinfo",
650+
"-L/usr/local/lib/gcc46",
651+
"-L/usr/local/lib/gcc44", "-lstdc++",
652+
"-Wl,-z,origin",
653+
"-Wl,-rpath,/usr/local/lib/gcc46",
654+
"-Wl,-rpath,/usr/local/lib/gcc44"];
654655
}
655656

656657
// OS X 10.6 introduced 'compact unwind info', which is produced by the

branches/try/src/rustc/middle/trans/base.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5301,7 +5301,6 @@ fn declare_intrinsics(llmod: ModuleRef) -> hashmap<str, ValueRef> {
53015301
let T_memset64_args: [TypeRef] =
53025302
[T_ptr(T_i8()), T_i8(), T_i64(), T_i32(), T_i1()];
53035303
let T_trap_args: [TypeRef] = [];
5304-
let T_frameaddress_args: [TypeRef] = [T_i32()];
53055304
let gcroot =
53065305
decl_cdecl_fn(llmod, "llvm.gcroot",
53075306
T_fn([T_ptr(T_ptr(T_i8())), T_ptr(T_i8())], T_void()));
@@ -5321,9 +5320,6 @@ fn declare_intrinsics(llmod: ModuleRef) -> hashmap<str, ValueRef> {
53215320
decl_cdecl_fn(llmod, "llvm.memset.p0i8.i64",
53225321
T_fn(T_memset64_args, T_void()));
53235322
let trap = decl_cdecl_fn(llmod, "llvm.trap", T_fn(T_trap_args, T_void()));
5324-
let frameaddress = decl_cdecl_fn(llmod, "llvm.frameaddress",
5325-
T_fn(T_frameaddress_args,
5326-
T_ptr(T_i8())));
53275323
let intrinsics = str_hash::<ValueRef>();
53285324
intrinsics.insert("llvm.gcroot", gcroot);
53295325
intrinsics.insert("llvm.gcread", gcread);
@@ -5332,7 +5328,6 @@ fn declare_intrinsics(llmod: ModuleRef) -> hashmap<str, ValueRef> {
53325328
intrinsics.insert("llvm.memset.p0i8.i32", memset32);
53335329
intrinsics.insert("llvm.memset.p0i8.i64", memset64);
53345330
intrinsics.insert("llvm.trap", trap);
5335-
intrinsics.insert("llvm.frameaddress", frameaddress);
53365331
ret intrinsics;
53375332
}
53385333

branches/try/src/rustc/middle/trans/native.rs

Lines changed: 9 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -755,44 +755,22 @@ fn trans_native_mod(ccx: @crate_ctxt,
755755
}
756756

757757
let mut cc = alt abi {
758-
ast::native_abi_rust_intrinsic |
758+
ast::native_abi_rust_intrinsic { ret; }
759759
ast::native_abi_cdecl { lib::llvm::CCallConv }
760760
ast::native_abi_stdcall { lib::llvm::X86StdcallCallConv }
761761
};
762762

763763
for vec::each(native_mod.items) {|native_item|
764764
alt native_item.node {
765-
ast::native_item_fn(fn_decl, typarams) {
765+
ast::native_item_fn(fn_decl, _) {
766766
let id = native_item.id;
767-
if abi != ast::native_abi_rust_intrinsic {
768-
let llwrapfn = get_item_val(ccx, id);
769-
let tys = c_stack_tys(ccx, id);
770-
if attr::attrs_contains_name(native_item.attrs, "rust_stack") {
771-
build_direct_fn(ccx, llwrapfn, native_item, tys, cc);
772-
} else {
773-
let llshimfn = build_shim_fn(ccx, native_item, tys, cc);
774-
build_wrap_fn(ccx, tys, llshimfn, llwrapfn);
775-
}
767+
let llwrapfn = get_item_val(ccx, id);
768+
let tys = c_stack_tys(ccx, id);
769+
if attr::attrs_contains_name(native_item.attrs, "rust_stack") {
770+
build_direct_fn(ccx, llwrapfn, native_item, tys, cc);
776771
} else {
777-
// Intrinsics with type parameters are emitted by
778-
// monomorphic_fn, but ones without are emitted here
779-
if typarams.is_empty() {
780-
let llwrapfn = get_item_val(ccx, id);
781-
let path = alt ccx.tcx.items.find(id) {
782-
some(ast_map::node_native_item(_, _, pt)) { pt }
783-
_ {
784-
ccx.sess.span_bug(native_item.span,
785-
"can't find intrinsic path")
786-
}
787-
};
788-
let psubsts = {
789-
tys: [],
790-
vtables: none,
791-
bounds: @[]
792-
};
793-
trans_intrinsic(ccx, llwrapfn, native_item,
794-
*path, psubsts, none);
795-
}
772+
let llshimfn = build_shim_fn(ccx, native_item, tys, cc);
773+
build_wrap_fn(ccx, tys, llshimfn, llwrapfn);
796774
}
797775
}
798776
}
@@ -805,41 +783,31 @@ fn trans_intrinsic(ccx: @crate_ctxt, decl: ValueRef, item: @ast::native_item,
805783
let fcx = new_fn_ctxt_w_id(ccx, path, decl, item.id,
806784
some(substs), some(item.span));
807785
let mut bcx = top_scope_block(fcx, none), lltop = bcx.llbb;
786+
let tp_ty = substs.tys[0], lltp_ty = type_of::type_of(ccx, tp_ty);
808787
alt check item.ident {
809788
"size_of" {
810-
let tp_ty = substs.tys[0];
811-
let lltp_ty = type_of::type_of(ccx, tp_ty);
812789
Store(bcx, C_uint(ccx, shape::llsize_of_real(ccx, lltp_ty)),
813790
fcx.llretptr);
814791
}
815792
"min_align_of" {
816-
let tp_ty = substs.tys[0];
817-
let lltp_ty = type_of::type_of(ccx, tp_ty);
818793
Store(bcx, C_uint(ccx, shape::llalign_of_min(ccx, lltp_ty)),
819794
fcx.llretptr);
820795
}
821796
"pref_align_of" {
822-
let tp_ty = substs.tys[0];
823-
let lltp_ty = type_of::type_of(ccx, tp_ty);
824797
Store(bcx, C_uint(ccx, shape::llalign_of_pref(ccx, lltp_ty)),
825798
fcx.llretptr);
826799
}
827800
"get_tydesc" {
828-
let tp_ty = substs.tys[0];
829801
let td = get_tydesc_simple(ccx, tp_ty);
830802
Store(bcx, PointerCast(bcx, td, T_ptr(T_nil())), fcx.llretptr);
831803
}
832804
"init" {
833-
let tp_ty = substs.tys[0];
834-
let lltp_ty = type_of::type_of(ccx, tp_ty);
835805
if !ty::type_is_nil(tp_ty) {
836806
Store(bcx, C_null(lltp_ty), fcx.llretptr);
837807
}
838808
}
839809
"forget" {}
840810
"reinterpret_cast" {
841-
let tp_ty = substs.tys[0];
842-
let lltp_ty = type_of::type_of(ccx, tp_ty);
843811
let llout_ty = type_of::type_of(ccx, substs.tys[1]);
844812
let tp_sz = shape::llsize_of_real(ccx, lltp_ty),
845813
out_sz = shape::llsize_of_real(ccx, llout_ty);
@@ -863,7 +831,6 @@ fn trans_intrinsic(ccx: @crate_ctxt, decl: ValueRef, item: @ast::native_item,
863831
Store(bcx, get_param(decl, first_real_arg), fcx.llretptr);
864832
}
865833
"needs_drop" {
866-
let tp_ty = substs.tys[0];
867834
Store(bcx, C_bool(ty::type_needs_drop(ccx.tcx, tp_ty)),
868835
fcx.llretptr);
869836
}
@@ -872,31 +839,6 @@ fn trans_intrinsic(ccx: @crate_ctxt, decl: ValueRef, item: @ast::native_item,
872839
let visitor = get_param(decl, first_real_arg);
873840
call_tydesc_glue(bcx, visitor, tp_ty, abi::tydesc_field_visit_glue);
874841
}
875-
"frame_address" {
876-
let frameaddress = ccx.intrinsics.get("llvm.frameaddress");
877-
let frameaddress_val = Call(bcx, frameaddress, [C_i32(0i32)]);
878-
let fty = ty::mk_fn(bcx.tcx(), {
879-
purity: ast::impure_fn,
880-
proto: ast::proto_any,
881-
inputs: [{
882-
mode: ast::expl(ast::by_val),
883-
ty: ty::mk_imm_ptr(
884-
bcx.tcx(),
885-
ty::mk_mach_uint(bcx.tcx(), ast::ty_u8))
886-
}],
887-
output: ty::mk_nil(bcx.tcx()),
888-
ret_style: ast::return_val,
889-
constraints: []
890-
});
891-
bcx = trans_call_inner(bcx, none, fty, ty::mk_nil(bcx.tcx()),
892-
{ |bcx|
893-
lval_no_env(
894-
bcx,
895-
get_param(decl, first_real_arg),
896-
temporary)
897-
},
898-
arg_vals([frameaddress_val]), ignore);
899-
}
900842
}
901843
build_return(bcx);
902844
finish_fn(fcx, lltop);

branches/try/src/rustc/middle/typeck/check.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,22 +2317,7 @@ fn check_intrinsic_type(ccx: @crate_ctxt, it: @ast::native_item) {
23172317
let (_, visitor_iface) = ccx.tcx.intrinsic_ifaces.get("ty_visitor");
23182318
(1u, [arg(ast::by_ref, visitor_iface)], ty::mk_nil(tcx))
23192319
}
2320-
"frame_address" {
2321-
let fty = ty::mk_fn(ccx.tcx, {
2322-
purity: ast::impure_fn,
2323-
proto: ast::proto_any,
2324-
inputs: [{
2325-
mode: ast::expl(ast::by_val),
2326-
ty: ty::mk_imm_ptr(
2327-
ccx.tcx,
2328-
ty::mk_mach_uint(ccx.tcx, ast::ty_u8))
2329-
}],
2330-
output: ty::mk_nil(ccx.tcx),
2331-
ret_style: ast::return_val,
2332-
constraints: []
2333-
});
2334-
(0u, [arg(ast::by_ref, fty)], ty::mk_nil(tcx))
2335-
}
2320+
23362321
other {
23372322
tcx.sess.span_err(it.span, "unrecognized intrinsic function: `" +
23382323
other + "`");

branches/try/src/test/run-pass/intrinsic-frame-address.rs

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)