Skip to content

Commit 4d9aeca

Browse files
committed
---
yaml --- r: 138429 b: refs/heads/try2 c: 0aa1aaa h: refs/heads/master i: 138427: b6bd365 v: v3
1 parent 0b365c8 commit 4d9aeca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1716
-1147
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 9776c387319f4078fb748c5f365b713d603bfc4f
8+
refs/heads/try2: 0aa1aaa2c1d095365e341017e443d61a960e0af6
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"Highlight the 78th text column
2+
"Feature became available in v7.3
3+
if version >= 703
4+
set colorcolumn=78
5+
endif

branches/try2/src/etc/vim/syntax/rust.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,15 @@ syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\(f\|f32\|f64\)\>
103103
syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9_]\+\)\>"
104104
syn match rustFloat display "\<[0-9][0-9_]*\.[0-9_]\+\%([eE][+-]\=[0-9_]\+\)\(f\|f32\|f64\)\>"
105105

106+
"rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting
107+
syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*"
106108
syn match rustCharacter "'\([^'\\]\|\\\(['nrt\\\"]\|x\x\{2}\|u\x\{4}\|U\x\{8}\)\)'"
107109

108110
syn region rustComment start="/\*" end="\*/" contains=rustComment,rustTodo
109111
syn region rustComment start="//" skip="\\$" end="$" contains=rustTodo keepend
110112

111-
syn keyword rustTodo TODO FIXME XXX NB
113+
114+
syn keyword rustTodo TODO FIXME XXX NB unsafe
112115

113116
hi def link rustHexNumber rustNumber
114117
hi def link rustBinNumber rustNumber
@@ -134,6 +137,7 @@ hi def link rustType Type
134137
hi def link rustTodo Todo
135138
hi def link rustAttribute PreProc
136139
hi def link rustStorage StorageClass
140+
hi def link rustLifetime Special
137141

138142
" Other Suggestions:
139143
" hi rustAssert ctermfg=yellow

branches/try2/src/etc/x86.supp

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,55 @@
366366
...
367367
}
368368

369+
{
370+
enum-instruction-scheduling-1
371+
Memcheck:Cond
372+
fun:*fold_mod*
373+
...
374+
}
375+
376+
{
377+
enum-instruction-scheduling-2
378+
Memcheck:Cond
379+
fun:*fold_nmod*
380+
...
381+
}
382+
383+
{
384+
enum-instruction-scheduling-3
385+
Memcheck:Cond
386+
fun:*fold_crate*
387+
...
388+
}
389+
390+
{
391+
enum-instruction-scheduling-4
392+
Memcheck:Cond
393+
fun:*fold_enum*
394+
...
395+
}
396+
397+
{
398+
enum-instruction-scheduling-5
399+
Memcheck:Cond
400+
fun:*write_variant*
401+
...
402+
}
403+
404+
{
405+
enum-instruction-scheduling-6
406+
Memcheck:Cond
407+
fun:*merge_method_attrs*
408+
...
409+
}
410+
411+
{
412+
enum-instruction-scheduling-7
413+
Memcheck:Cond
414+
fun:*parse_config_*
415+
...
416+
}
417+
369418
{
370419
llvm-user-new-leak
371420
Memcheck:Leak

branches/try2/src/librustc/back/arm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use session::sess_os_to_meta_os;
1414
use metadata::loader::meta_section_name;
1515

1616
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
17-
return {
17+
return target_strs::t {
1818
module_asm: ~"",
1919

2020
meta_sect_name: meta_section_name(sess_os_to_meta_os(target_os)),

branches/try2/src/librustc/back/link.rs

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ use lib::llvm::llvm;
1616
use lib::llvm::{ModuleRef, mk_pass_manager, mk_target_data, True, False};
1717
use lib::llvm::{PassManagerRef, FileType};
1818
use lib;
19-
use metadata::common::link_meta;
19+
use metadata::common::LinkMeta;
2020
use metadata::filesearch;
2121
use metadata::{encoder, cstore};
22-
use middle::trans::common::crate_ctxt;
22+
use middle::trans::common::CrateContext;
2323
use middle::ty;
2424
use session::Session;
2525
use session;
@@ -451,15 +451,16 @@ pub mod write {
451451
*/
452452

453453
pub fn build_link_meta(sess: Session, c: &ast::crate, output: &Path,
454-
symbol_hasher: &hash::State) -> link_meta {
454+
symbol_hasher: &hash::State) -> LinkMeta {
455455

456-
type provided_metas =
457-
{name: Option<@str>,
458-
vers: Option<@str>,
459-
cmh_items: ~[@ast::meta_item]};
456+
struct ProvidedMetas {
457+
name: Option<@str>,
458+
vers: Option<@str>,
459+
cmh_items: ~[@ast::meta_item]
460+
}
460461

461462
fn provided_link_metas(sess: Session, c: &ast::crate) ->
462-
provided_metas {
463+
ProvidedMetas {
463464
let mut name = None;
464465
let mut vers = None;
465466
let mut cmh_items = ~[];
@@ -480,7 +481,12 @@ pub fn build_link_meta(sess: Session, c: &ast::crate, output: &Path,
480481
}
481482
} else { cmh_items.push(*meta); }
482483
}
483-
return {name: name, vers: vers, cmh_items: cmh_items};
484+
485+
ProvidedMetas {
486+
name: name,
487+
vers: vers,
488+
cmh_items: cmh_items
489+
}
484490
}
485491

486492
// This calculates CMH as defined above
@@ -563,16 +569,23 @@ pub fn build_link_meta(sess: Session, c: &ast::crate, output: &Path,
563569
};
564570
}
565571

566-
let {name: opt_name, vers: opt_vers,
567-
cmh_items: cmh_items} = provided_link_metas(sess, c);
572+
let ProvidedMetas {
573+
name: opt_name,
574+
vers: opt_vers,
575+
cmh_items: cmh_items
576+
} = provided_link_metas(sess, c);
568577
let name = crate_meta_name(sess, output, opt_name);
569578
let vers = crate_meta_vers(sess, opt_vers);
570579
let dep_hashes = cstore::get_dep_hashes(sess.cstore);
571580
let extras_hash =
572581
crate_meta_extras_hash(symbol_hasher, cmh_items,
573582
dep_hashes);
574583

575-
return {name: name, vers: vers, extras_hash: extras_hash};
584+
LinkMeta {
585+
name: name,
586+
vers: vers,
587+
extras_hash: extras_hash
588+
}
576589
}
577590

578591
pub fn truncated_hash_result(symbol_hasher: &hash::State) -> ~str {
@@ -584,7 +597,7 @@ pub fn truncated_hash_result(symbol_hasher: &hash::State) -> ~str {
584597

585598
// This calculates STH for a symbol, as defined above
586599
pub fn symbol_hash(tcx: ty::ctxt, symbol_hasher: &hash::State, t: ty::t,
587-
link_meta: link_meta) -> @str {
600+
link_meta: LinkMeta) -> @str {
588601
// NB: do *not* use abbrevs here as we want the symbol names
589602
// to be independent of one another in the crate.
590603

@@ -601,7 +614,7 @@ pub fn symbol_hash(tcx: ty::ctxt, symbol_hasher: &hash::State, t: ty::t,
601614
hash.to_managed()
602615
}
603616
604-
pub fn get_symbol_hash(ccx: @crate_ctxt, t: ty::t) -> @str {
617+
pub fn get_symbol_hash(ccx: @CrateContext, t: ty::t) -> @str {
605618
match ccx.type_hashcodes.find(&t) {
606619
Some(h) => h,
607620
None => {
@@ -673,14 +686,16 @@ pub fn exported_name(sess: Session,
673686
path_name(sess.ident_of(vers.to_owned()))));
674687
}
675688

676-
pub fn mangle_exported_name(ccx: @crate_ctxt, +path: path, t: ty::t) -> ~str {
689+
pub fn mangle_exported_name(ccx: @CrateContext,
690+
+path: path,
691+
t: ty::t) -> ~str {
677692
let hash = get_symbol_hash(ccx, t);
678693
return exported_name(ccx.sess, path,
679694
hash,
680695
ccx.link_meta.vers);
681696
}
682697

683-
pub fn mangle_internal_name_by_type_only(ccx: @crate_ctxt,
698+
pub fn mangle_internal_name_by_type_only(ccx: @CrateContext,
684699
t: ty::t,
685700
name: &str) -> ~str {
686701
let s = ppaux::ty_to_short_str(ccx.tcx, t);
@@ -691,23 +706,23 @@ pub fn mangle_internal_name_by_type_only(ccx: @crate_ctxt,
691706
path_name(ccx.sess.ident_of(hash.to_owned()))]);
692707
}
693708

694-
pub fn mangle_internal_name_by_path_and_seq(ccx: @crate_ctxt,
709+
pub fn mangle_internal_name_by_path_and_seq(ccx: @CrateContext,
695710
+path: path,
696711
+flav: ~str) -> ~str {
697712
return mangle(ccx.sess,
698713
vec::append_one(path, path_name((ccx.names)(flav))));
699714
}
700715

701-
pub fn mangle_internal_name_by_path(ccx: @crate_ctxt, +path: path) -> ~str {
716+
pub fn mangle_internal_name_by_path(ccx: @CrateContext, +path: path) -> ~str {
702717
return mangle(ccx.sess, path);
703718
}
704719

705-
pub fn mangle_internal_name_by_seq(ccx: @crate_ctxt, +flav: ~str) -> ~str {
720+
pub fn mangle_internal_name_by_seq(ccx: @CrateContext, +flav: ~str) -> ~str {
706721
return fmt!("%s_%u", flav, (ccx.names)(flav).repr);
707722
}
708723

709724

710-
pub fn output_dll_filename(os: session::os, lm: link_meta) -> ~str {
725+
pub fn output_dll_filename(os: session::os, lm: LinkMeta) -> ~str {
711726
let libname = fmt!("%s-%s-%s", lm.name, lm.extras_hash, lm.vers);
712727
let (dll_prefix, dll_suffix) = match os {
713728
session::os_win32 => (win32::DLL_PREFIX, win32::DLL_SUFFIX),
@@ -725,7 +740,7 @@ pub fn output_dll_filename(os: session::os, lm: link_meta) -> ~str {
725740
pub fn link_binary(sess: Session,
726741
obj_filename: &Path,
727742
out_filename: &Path,
728-
lm: link_meta) {
743+
lm: LinkMeta) {
729744
// Converts a library file-stem into a cc -l argument
730745
fn unlib(config: @session::config, +stem: ~str) -> ~str {
731746
if stem.starts_with("lib") &&

branches/try2/src/librustc/back/target_strs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
// except according to those terms.
1010

1111

12-
pub type t = {
12+
pub struct t {
1313
module_asm: ~str,
1414
meta_sect_name: ~str,
1515
data_layout: ~str,
1616
target_triple: ~str,
1717
cc_args: ~[~str]
18-
};
18+
}

branches/try2/src/librustc/back/upcall.rs

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ use middle::trans::common::{T_fn, T_i1, T_i8, T_i32,
1515
T_int, T_nil,
1616
T_opaque_vec, T_ptr, T_unique_ptr,
1717
T_size_t, T_void, T_vec2};
18-
use lib::llvm::{type_names, ModuleRef, ValueRef, TypeRef};
18+
use lib::llvm::{TypeNames, ModuleRef, ValueRef, TypeRef};
1919

20-
pub type upcalls =
21-
{trace: ValueRef,
22-
call_shim_on_c_stack: ValueRef,
23-
call_shim_on_rust_stack: ValueRef,
24-
rust_personality: ValueRef,
25-
reset_stack_limit: ValueRef};
20+
pub struct Upcalls {
21+
trace: ValueRef,
22+
call_shim_on_c_stack: ValueRef,
23+
call_shim_on_rust_stack: ValueRef,
24+
rust_personality: ValueRef,
25+
reset_stack_limit: ValueRef
26+
}
2627

2728
pub fn declare_upcalls(targ_cfg: @session::config,
28-
llmod: ModuleRef) -> @upcalls {
29+
llmod: ModuleRef) -> @Upcalls {
2930
fn decl(llmod: ModuleRef, prefix: ~str, name: ~str,
3031
tys: ~[TypeRef], rv: TypeRef) ->
3132
ValueRef {
@@ -43,22 +44,23 @@ pub fn declare_upcalls(targ_cfg: @session::config,
4344

4445
let int_t = T_int(targ_cfg);
4546

46-
return @{trace: dv(~"trace", ~[T_ptr(T_i8()),
47+
@Upcalls {
48+
trace: dv(~"trace", ~[T_ptr(T_i8()),
4749
T_ptr(T_i8()),
4850
int_t]),
49-
call_shim_on_c_stack:
50-
d(~"call_shim_on_c_stack",
51-
// arguments: void *args, void *fn_ptr
52-
~[T_ptr(T_i8()), T_ptr(T_i8())],
53-
int_t),
54-
call_shim_on_rust_stack:
55-
d(~"call_shim_on_rust_stack",
56-
~[T_ptr(T_i8()), T_ptr(T_i8())], int_t),
57-
rust_personality:
58-
nothrow(d(~"rust_personality", ~[], T_i32())),
59-
reset_stack_limit:
60-
nothrow(dv(~"reset_stack_limit", ~[]))
61-
};
51+
call_shim_on_c_stack:
52+
d(~"call_shim_on_c_stack",
53+
// arguments: void *args, void *fn_ptr
54+
~[T_ptr(T_i8()), T_ptr(T_i8())],
55+
int_t),
56+
call_shim_on_rust_stack:
57+
d(~"call_shim_on_rust_stack",
58+
~[T_ptr(T_i8()), T_ptr(T_i8())], int_t),
59+
rust_personality:
60+
nothrow(d(~"rust_personality", ~[], T_i32())),
61+
reset_stack_limit:
62+
nothrow(dv(~"reset_stack_limit", ~[]))
63+
}
6264
}
6365
//
6466
// Local Variables:

branches/try2/src/librustc/back/x86.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use metadata::loader::meta_section_name;
1515
use session::sess_os_to_meta_os;
1616

1717
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
18-
return {
18+
return target_strs::t {
1919
module_asm: ~"",
2020

2121
meta_sect_name: meta_section_name(sess_os_to_meta_os(target_os)),

branches/try2/src/librustc/back/x86_64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use metadata::loader::meta_section_name;
1515
use session::sess_os_to_meta_os;
1616

1717
pub fn get_target_strs(target_os: session::os) -> target_strs::t {
18-
return {
18+
return target_strs::t {
1919
module_asm: ~"",
2020

2121
meta_sect_name: meta_section_name(sess_os_to_meta_os(target_os)),

0 commit comments

Comments
 (0)