Skip to content

Commit e727cd3

Browse files
committed
---
yaml --- r: 83773 b: refs/heads/try c: 313052a h: refs/heads/master i: 83771: d213525 v: v3
1 parent 445c525 commit e727cd3

File tree

12 files changed

+125
-759
lines changed

12 files changed

+125
-759
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0e4d1fc8cae42e15e00f71d9f439b01bb25a86ae
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5-
refs/heads/try: 580adc9ad38bfe3585e8d17ba9ad4766cbc1ff1c
5+
refs/heads/try: 313052aeb25b3de4501a062c963916e3455efbf1
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/lib/llvm.rs

Lines changed: 2 additions & 458 deletions
Large diffs are not rendered by default.

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3119,11 +3119,6 @@ pub fn trans_crate(sess: session::Session,
31193119
symbol_hasher,
31203120
link_meta,
31213121
analysis.reachable);
3122-
3123-
if ccx.sess.opts.debuginfo {
3124-
debuginfo::initialize(ccx, &crate);
3125-
}
3126-
31273122
{
31283123
let _icx = push_ctxt("text");
31293124
trans_mod(ccx, &crate.module);

branches/try/src/librustc/middle/trans/common.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ pub fn type_is_immediate(ccx: &mut CrateContext, ty: ty::t) -> bool {
7070
return true;
7171
}
7272
match ty::get(ty).sty {
73-
// FIXME: #9651: small `ty_struct` should also be immediate
74-
ty::ty_struct(def_id, ref substs) => {
75-
ty::struct_fields(tcx, def_id, substs).is_empty()
76-
}
77-
ty::ty_enum(*) | ty::ty_tup(*) => {
73+
ty::ty_struct(*) | ty::ty_enum(*) | ty::ty_tup(*) => {
7874
let llty = sizing_type_of(ccx, ty);
7975
llsize_of_alloc(ccx, llty) <= llsize_of_alloc(ccx, ccx.int_type)
8076
}

branches/try/src/librustc/middle/trans/debuginfo.rs

Lines changed: 94 additions & 210 deletions
Large diffs are not rendered by default.

branches/try/src/libstd/libc.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2708,12 +2708,9 @@ pub mod funcs {
27082708
pub fn setbuf(stream: *FILE, buf: *c_char);
27092709
// Omitted: printf and scanf variants.
27102710
pub fn fgetc(stream: *FILE) -> c_int;
2711-
#[fast_ffi]
27122711
pub fn fgets(buf: *mut c_char, n: c_int, stream: *FILE)
27132712
-> *c_char;
2714-
#[fast_ffi]
27152713
pub fn fputc(c: c_int, stream: *FILE) -> c_int;
2716-
#[fast_ffi]
27172714
pub fn fputs(s: *c_char, stream: *FILE) -> *c_char;
27182715
// Omitted: getc, getchar (might be macros).
27192716

@@ -2723,13 +2720,11 @@ pub mod funcs {
27232720
// Omitted: putc, putchar (might be macros).
27242721
pub fn puts(s: *c_char) -> c_int;
27252722
pub fn ungetc(c: c_int, stream: *FILE) -> c_int;
2726-
#[fast_ffi]
27272723
pub fn fread(ptr: *mut c_void,
27282724
size: size_t,
27292725
nobj: size_t,
27302726
stream: *FILE)
27312727
-> size_t;
2732-
#[fast_ffi]
27332728
pub fn fwrite(ptr: *c_void,
27342729
size: size_t,
27352730
nobj: size_t,
@@ -2766,13 +2761,9 @@ pub mod funcs {
27662761
-> c_long;
27672762
pub fn strtoul(s: *c_char, endp: **c_char, base: c_int)
27682763
-> c_ulong;
2769-
#[fast_ffi]
27702764
pub fn calloc(nobj: size_t, size: size_t) -> *c_void;
2771-
#[fast_ffi]
27722765
pub fn malloc(size: size_t) -> *c_void;
2773-
#[fast_ffi]
27742766
pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void;
2775-
#[fast_ffi]
27762767
pub fn free(p: *c_void);
27772768
pub fn abort() -> !;
27782769
pub fn exit(status: c_int) -> !;
@@ -2865,7 +2856,6 @@ pub mod funcs {
28652856
#[link_name = "_pclose"]
28662857
pub fn pclose(stream: *FILE) -> c_int;
28672858
#[link_name = "_fdopen"]
2868-
#[fast_ffi]
28692859
pub fn fdopen(fd: c_int, mode: *c_char) -> *FILE;
28702860
#[link_name = "_fileno"]
28712861
pub fn fileno(stream: *FILE) -> c_int;
@@ -2933,15 +2923,13 @@ pub mod funcs {
29332923
pub fn pipe(fds: *mut c_int, psize: c_uint, textmode: c_int)
29342924
-> c_int;
29352925
#[link_name = "_read"]
2936-
#[fast_ffi]
29372926
pub fn read(fd: c_int, buf: *mut c_void, count: c_uint)
29382927
-> c_int;
29392928
#[link_name = "_rmdir"]
29402929
pub fn rmdir(path: *c_char) -> c_int;
29412930
#[link_name = "_unlink"]
29422931
pub fn unlink(c: *c_char) -> c_int;
29432932
#[link_name = "_write"]
2944-
#[fast_ffi]
29452933
pub fn write(fd: c_int, buf: *c_void, count: c_uint) -> c_int;
29462934
}
29472935
}
@@ -3095,7 +3083,6 @@ pub mod funcs {
30953083
pub fn pathconf(path: *c_char, name: c_int) -> c_long;
30963084
pub fn pause() -> c_int;
30973085
pub fn pipe(fds: *mut c_int) -> c_int;
3098-
#[fast_ffi]
30993086
pub fn read(fd: c_int, buf: *mut c_void, count: size_t)
31003087
-> ssize_t;
31013088
pub fn rmdir(path: *c_char) -> c_int;
@@ -3108,7 +3095,6 @@ pub mod funcs {
31083095
pub fn tcgetpgrp(fd: c_int) -> pid_t;
31093096
pub fn ttyname(fd: c_int) -> *c_char;
31103097
pub fn unlink(c: *c_char) -> c_int;
3111-
#[fast_ffi]
31123098
pub fn write(fd: c_int, buf: *c_void, count: size_t)
31133099
-> ssize_t;
31143100
}

branches/try/src/libstd/rt/local_heap.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,25 +107,18 @@ pub fn live_allocs() -> *raw::Box<()> {
107107
}
108108

109109
extern {
110-
#[fast_ffi]
111110
fn rust_new_memory_region(detailed_leaks: uintptr_t,
112111
poison_on_free: uintptr_t) -> *MemoryRegion;
113-
#[fast_ffi]
114112
fn rust_delete_memory_region(region: *MemoryRegion);
115-
#[fast_ffi]
116113
fn rust_new_boxed_region(region: *MemoryRegion,
117114
poison_on_free: uintptr_t) -> *BoxedRegion;
118-
#[fast_ffi]
119115
fn rust_delete_boxed_region(region: *BoxedRegion);
120-
#[fast_ffi]
121116
fn rust_boxed_region_malloc(region: *BoxedRegion,
122117
td: *TypeDesc,
123118
size: size_t) -> *OpaqueBox;
124-
#[fast_ffi]
125119
fn rust_boxed_region_realloc(region: *BoxedRegion,
126120
ptr: *OpaqueBox,
127121
size: size_t) -> *OpaqueBox;
128-
#[fast_ffi]
129122
fn rust_boxed_region_free(region: *BoxedRegion, box: *OpaqueBox);
130123
}
131124

branches/try/src/libstd/rt/thread_local_storage.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,8 @@ type pthread_key_t = ::libc::c_uint;
5252

5353
#[cfg(unix)]
5454
extern {
55-
#[fast_ffi]
5655
fn pthread_key_create(key: *mut pthread_key_t, dtor: *u8) -> c_int;
57-
#[fast_ffi]
5856
fn pthread_setspecific(key: pthread_key_t, value: *mut c_void) -> c_int;
59-
#[fast_ffi]
6057
fn pthread_getspecific(key: pthread_key_t) -> *mut c_void;
6158
}
6259

branches/try/src/libstd/unstable/sync.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use vec;
2626
/// An atomically reference counted pointer.
2727
///
2828
/// Enforces no shared-memory safety.
29-
#[unsafe_no_drop_flag]
29+
//#[unsafe_no_drop_flag] FIXME: #9758
3030
pub struct UnsafeArc<T> {
3131
data: *mut ArcData<T>,
3232
}
@@ -427,6 +427,8 @@ mod tests {
427427
use util;
428428
use sys::size_of;
429429

430+
//#[unsafe_no_drop_flag] FIXME: #9758
431+
#[ignore]
430432
#[test]
431433
fn test_size() {
432434
assert_eq!(size_of::<UnsafeArc<[int, ..10]>>(), size_of::<*[int, ..10]>());

branches/try/src/libsyntax/parse/token.rs

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ pub mod special_idents {
326326
pub static unary_minus_fn : Ident = Ident { name: 6, ctxt: 0}; // apparently unused?
327327
pub static clownshoes_extensions : Ident = Ident { name: 7, ctxt: 0};
328328

329-
pub static self_ : Ident = Ident { name: super::SELF_KEYWORD_NAME, ctxt: 0}; // 'self'
329+
pub static self_ : Ident = Ident { name: 8, ctxt: 0}; // 'self'
330330

331331
/* for matcher NTs */
332332
// none of these appear to be used, but perhaps references to
@@ -352,7 +352,7 @@ pub mod special_idents {
352352
pub static main : Ident = Ident { name: 24, ctxt: 0};
353353
pub static opaque : Ident = Ident { name: 25, ctxt: 0};
354354
pub static blk : Ident = Ident { name: 26, ctxt: 0};
355-
pub static statik : Ident = Ident { name: super::STATIC_KEYWORD_NAME, ctxt: 0};
355+
pub static statik : Ident = Ident { name: 27, ctxt: 0};
356356
pub static clownshoes_foreign_mod: Ident = Ident { name: 28, ctxt: 0};
357357
pub static unnamed_field: Ident = Ident { name: 29, ctxt: 0};
358358
pub static c_abi: Ident = Ident { name: 30, ctxt: 0}; // apparently unused?
@@ -414,9 +414,8 @@ pub type ident_interner = StrInterner;
414414

415415
// return a fresh interner, preloaded with special identifiers.
416416
fn mk_fresh_ident_interner() -> @ident_interner {
417-
// The indices here must correspond to the numbers in
418-
// special_idents, in Keyword to_ident(), and in static
419-
// constants below.
417+
// the indices here must correspond to the numbers in
418+
// special_idents.
420419
let init_vec = ~[
421420
"_", // 0
422421
"anon", // 1
@@ -474,8 +473,8 @@ fn mk_fresh_ident_interner() -> @ident_interner {
474473
"pub", // 52
475474
"ref", // 53
476475
"return", // 54
477-
"static", // 27 -- also a special ident (prefill de-dupes)
478-
"self", // 8 -- also a special ident (prefill de-dupes)
476+
"static", // 27 -- also a special ident
477+
"self", // 8 -- also a special ident
479478
"struct", // 55
480479
"super", // 56
481480
"true", // 57
@@ -499,32 +498,6 @@ fn mk_fresh_ident_interner() -> @ident_interner {
499498
@interner::StrInterner::prefill(init_vec)
500499
}
501500

502-
// NOTE remove stage0 pub'ed special cases after next snapshot.
503-
#[cfg(stage0)]
504-
pub static SELF_KEYWORD_NAME: uint = 8;
505-
#[cfg(not(stage0))]
506-
static SELF_KEYWORD_NAME: uint = 8;
507-
#[cfg(stage0)]
508-
pub static STATIC_KEYWORD_NAME: uint = 27;
509-
#[cfg(not(stage0))]
510-
static STATIC_KEYWORD_NAME: uint = 27;
511-
#[cfg(stage0)]
512-
pub static STRICT_KEYWORD_START: uint = 32;
513-
#[cfg(not(stage0))]
514-
static STRICT_KEYWORD_START: uint = 32;
515-
#[cfg(stage0)]
516-
pub static STRICT_KEYWORD_FINAL: uint = 64;
517-
#[cfg(not(stage0))]
518-
static STRICT_KEYWORD_FINAL: uint = 64;
519-
#[cfg(stage0)]
520-
pub static RESERVED_KEYWORD_START: uint = 65;
521-
#[cfg(not(stage0))]
522-
static RESERVED_KEYWORD_START: uint = 65;
523-
#[cfg(stage0)]
524-
pub static RESERVED_KEYWORD_FINAL: uint = 71;
525-
#[cfg(not(stage0))]
526-
static RESERVED_KEYWORD_FINAL: uint = 71;
527-
528501
// if an interner exists in TLS, return it. Otherwise, prepare a
529502
// fresh one.
530503
pub fn get_ident_interner() -> @ident_interner {
@@ -702,8 +675,8 @@ pub mod keywords {
702675
Pub => Ident { name: 52, ctxt: 0 },
703676
Ref => Ident { name: 53, ctxt: 0 },
704677
Return => Ident { name: 54, ctxt: 0 },
705-
Static => Ident { name: super::STATIC_KEYWORD_NAME, ctxt: 0 },
706-
Self => Ident { name: super::SELF_KEYWORD_NAME, ctxt: 0 },
678+
Static => Ident { name: 27, ctxt: 0 },
679+
Self => Ident { name: 8, ctxt: 0 },
707680
Struct => Ident { name: 55, ctxt: 0 },
708681
Super => Ident { name: 56, ctxt: 0 },
709682
True => Ident { name: 57, ctxt: 0 },
@@ -736,8 +709,7 @@ pub fn is_keyword(kw: keywords::Keyword, tok: &Token) -> bool {
736709
pub fn is_any_keyword(tok: &Token) -> bool {
737710
match *tok {
738711
token::IDENT(sid, false) => match sid.name {
739-
SELF_KEYWORD_NAME | STATIC_KEYWORD_NAME |
740-
STRICT_KEYWORD_START .. RESERVED_KEYWORD_FINAL => true,
712+
8 | 27 | 32 .. 70 => true,
741713
_ => false,
742714
},
743715
_ => false
@@ -747,8 +719,7 @@ pub fn is_any_keyword(tok: &Token) -> bool {
747719
pub fn is_strict_keyword(tok: &Token) -> bool {
748720
match *tok {
749721
token::IDENT(sid, false) => match sid.name {
750-
SELF_KEYWORD_NAME | STATIC_KEYWORD_NAME |
751-
STRICT_KEYWORD_START .. STRICT_KEYWORD_FINAL => true,
722+
8 | 27 | 32 .. 64 => true,
752723
_ => false,
753724
},
754725
_ => false,
@@ -758,7 +729,7 @@ pub fn is_strict_keyword(tok: &Token) -> bool {
758729
pub fn is_reserved_keyword(tok: &Token) -> bool {
759730
match *tok {
760731
token::IDENT(sid, false) => match sid.name {
761-
RESERVED_KEYWORD_START .. RESERVED_KEYWORD_FINAL => true,
732+
65 .. 71 => true,
762733
_ => false,
763734
},
764735
_ => false,

branches/try/src/rustllvm/RustWrapper.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,14 +548,21 @@ extern "C" LLVMValueRef LLVMDIBuilderCreateStructType(
548548
LLVMValueRef DerivedFrom,
549549
LLVMValueRef Elements,
550550
unsigned RunTimeLang,
551-
LLVMValueRef VTableHolder) {
551+
LLVMValueRef VTableHolder,
552+
const char *UniqueId) {
552553
return wrap(Builder->createStructType(
553-
unwrapDI<DIDescriptor>(Scope), Name,
554-
unwrapDI<DIFile>(File), LineNumber,
555-
SizeInBits, AlignInBits, Flags,
554+
unwrapDI<DIDescriptor>(Scope),
555+
Name,
556+
unwrapDI<DIFile>(File),
557+
LineNumber,
558+
SizeInBits,
559+
AlignInBits,
560+
Flags,
556561
unwrapDI<DIType>(DerivedFrom),
557-
unwrapDI<DIArray>(Elements), RunTimeLang,
558-
unwrapDI<MDNode*>(VTableHolder)));
562+
unwrapDI<DIArray>(Elements),
563+
RunTimeLang,
564+
unwrapDI<MDNode*>(VTableHolder),
565+
UniqueId));
559566
}
560567

561568
extern "C" LLVMValueRef LLVMDIBuilderCreateMemberType(

branches/try/src/test/bench/shootout-pidigits.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,22 @@ impl mpz_t {
2424

2525
#[link_args="-lgmp"]
2626
extern {
27-
#[fast_ffi]
2827
#[link_name="__gmpz_add"]
2928
fn mpz_add(x: *mpz_t, y: *mpz_t, z: *mpz_t);
30-
#[fast_ffi]
3129
#[link_name="__gmpz_cmp"]
3230
fn mpz_cmp(x: *mpz_t, y: *mpz_t) -> c_int;
33-
#[fast_ffi]
3431
#[link_name="__gmpz_fdiv_qr"]
3532
fn mpz_fdiv_qr(a: *mpz_t, b: *mpz_t, c: *mpz_t, d: *mpz_t);
36-
#[fast_ffi]
3733
#[link_name="__gmpz_get_ui"]
3834
fn mpz_get_ui(x: *mpz_t) -> c_uint;
39-
#[fast_ffi]
4035
#[link_name="__gmpz_init"]
4136
fn mpz_init(x: *mpz_t);
42-
#[fast_ffi]
4337
#[link_name="__gmpz_init_set_ui"]
4438
fn mpz_init_set_ui(x: *mpz_t, y: c_uint);
45-
#[fast_ffi]
4639
#[link_name="__gmpz_mul_2exp"]
4740
fn mpz_mul_2exp(x: *mpz_t, y: *mpz_t, z: c_uint);
48-
#[fast_ffi]
4941
#[link_name="__gmpz_mul_ui"]
5042
fn mpz_mul_ui(x: *mpz_t, y: *mpz_t, z: c_uint);
51-
#[fast_ffi]
5243
#[link_name="__gmpz_submul_ui"]
5344
fn mpz_submul_ui(x: *mpz_t, y: *mpz_t, z: c_uint);
5445
}

0 commit comments

Comments
 (0)