Skip to content

Commit d4a9ae6

Browse files
committed
---
yaml --- r: 6843 b: refs/heads/master c: e1a9668 h: refs/heads/master i: 6841: 4bda669 6839: 85673b9 v: v3
1 parent 77d853e commit d4a9ae6

Some content is hidden

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

52 files changed

+357
-1393
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 539cfe8a8558aa10487ba3f0f4858482d27d661a
2+
refs/heads/master: e1a9668ab27805db83f97cafe2a937e6569863ff

trunk/mk/target.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/rustc$$(X): \
5050
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
5151
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
5252
$$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \
53-
$$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3))
53+
$$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3)) \
54+
$$(TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3))
5455
@$$(call E, compile_and_link: $$@)
5556
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$<
5657

trunk/src/comp/back/link.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ mod write {
321321
*
322322
* There are a few issues to handle:
323323
*
324-
* - Linkers operate on a flat namespace, so we have to flatten names.
324+
* - Linnkers operate on a flat namespace, so we have to flatten names.
325325
* We do this using the C++ namespace-mangling technique. Foo::bar
326326
* symbols and such.
327327
*

trunk/src/comp/driver/rustc.rs

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import syntax::print::{pp, pprust};
1111
import util::{ppaux, filesearch};
1212
import back::link;
1313
import core::{option, str, vec, int, result};
14-
import result::{ok, err};
1514
import std::{fs, io, getopts};
1615
import option::{some, none};
1716
import getopts::{optopt, optmulti, optflag, optflagopt, opt_present};
@@ -421,8 +420,7 @@ fn build_session_options(match: getopts::match)
421420
let libcore = !opt_present(match, "no-core");
422421
let verify = !opt_present(match, "no-verify");
423422
let save_temps = opt_present(match, "save-temps");
424-
let extra_debuginfo = opt_present(match, "xg");
425-
let debuginfo = opt_present(match, "g") || extra_debuginfo;
423+
let debuginfo = opt_present(match, "g");
426424
let stats = opt_present(match, "stats");
427425
let time_passes = opt_present(match, "time-passes");
428426
let time_llvm_passes = opt_present(match, "time-llvm-passes");
@@ -469,7 +467,6 @@ fn build_session_options(match: getopts::match)
469467
libcore: libcore,
470468
optimize: opt_level,
471469
debuginfo: debuginfo,
472-
extra_debuginfo: extra_debuginfo,
473470
verify: verify,
474471
save_temps: save_temps,
475472
stats: stats,
@@ -489,7 +486,7 @@ fn build_session_options(match: getopts::match)
489486
ret sopts;
490487
}
491488

492-
fn build_session(sopts: @session::options, input: str) -> session::session {
489+
fn build_session(sopts: @session::options) -> session::session {
493490
let target_cfg = build_target_config(sopts);
494491
let cstore = cstore::mk_cstore();
495492
let filesearch = filesearch::mk_filesearch(
@@ -498,7 +495,7 @@ fn build_session(sopts: @session::options, input: str) -> session::session {
498495
sopts.addl_lib_search_paths);
499496
ret session::session(target_cfg, sopts, cstore,
500497
@{cm: codemap::new_codemap(), mutable next_id: 1},
501-
none, 0u, filesearch, false, fs::dirname(input));
498+
none, 0u, filesearch, false);
502499
}
503500

504501
fn parse_pretty(sess: session::session, &&name: str) -> pp_mode {
@@ -518,7 +515,7 @@ fn opts() -> [getopts::opt] {
518515
optflag("emit-llvm"), optflagopt("pretty"),
519516
optflag("ls"), optflag("parse-only"), optflag("no-trans"),
520517
optflag("O"), optopt("opt-level"), optmulti("L"), optflag("S"),
521-
optopt("o"), optopt("out-dir"), optflag("xg"),
518+
optopt("o"), optopt("out-dir"),
522519
optflag("c"), optflag("g"), optflag("save-temps"),
523520
optopt("sysroot"), optopt("target"), optflag("stats"),
524521
optflag("time-passes"), optflag("time-llvm-passes"),
@@ -624,8 +621,8 @@ fn main(args: [str]) {
624621
let args = args, binary = vec::shift(args);
625622
let match =
626623
alt getopts::getopts(args, opts()) {
627-
ok(m) { m }
628-
err(f) {
624+
getopts::success(m) { m }
625+
getopts::failure(f) {
629626
early_error(getopts::fail_str(f))
630627
}
631628
};
@@ -644,7 +641,7 @@ fn main(args: [str]) {
644641
};
645642

646643
let sopts = build_session_options(match);
647-
let sess = build_session(sopts, ifile);
644+
let sess = build_session(sopts);
648645
let odir = getopts::opt_maybe_str(match, "out-dir");
649646
let ofile = getopts::opt_maybe_str(match, "o");
650647
let cfg = build_configuration(sess, binary, ifile);
@@ -673,10 +670,10 @@ mod test {
673670
fn test_switch_implies_cfg_test() {
674671
let match =
675672
alt getopts::getopts(["--test"], opts()) {
676-
ok(m) { m }
673+
getopts::success(m) { m }
677674
};
678675
let sessopts = build_session_options(match);
679-
let sess = build_session(sessopts, "");
676+
let sess = build_session(sessopts);
680677
let cfg = build_configuration(sess, "whatever", "whatever");
681678
assert (attr::contains_name(cfg, "test"));
682679
}
@@ -687,10 +684,10 @@ mod test {
687684
fn test_switch_implies_cfg_test_unless_cfg_test() {
688685
let match =
689686
alt getopts::getopts(["--test", "--cfg=test"], opts()) {
690-
ok(m) { m }
687+
getopts::success(m) { m }
691688
};
692689
let sessopts = build_session_options(match);
693-
let sess = build_session(sessopts, "");
690+
let sess = build_session(sessopts);
694691
let cfg = build_configuration(sess, "whatever", "whatever");
695692
let test_items = attr::find_meta_items_by_name(cfg, "test");
696693
assert (vec::len(test_items) == 1u);

trunk/src/comp/driver/session.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ type options =
3131
libcore: bool,
3232
optimize: uint,
3333
debuginfo: bool,
34-
extra_debuginfo: bool,
3534
verify: bool,
3635
save_temps: bool,
3736
stats: bool,
@@ -60,8 +59,7 @@ obj session(targ_cfg: @config,
6059
mutable main_fn: option::t<node_id>,
6160
mutable err_count: uint,
6261
filesearch: filesearch::filesearch,
63-
mutable building_library: bool,
64-
working_dir: str) {
62+
mutable building_library: bool) {
6563
fn get_targ_cfg() -> @config { ret targ_cfg; }
6664
fn get_opts() -> @options { ret opts; }
6765
fn get_cstore() -> metadata::cstore::cstore { cstore }
@@ -124,9 +122,6 @@ obj session(targ_cfg: @config,
124122
fn set_building_library(crate: @ast::crate) {
125123
building_library = session::building_library(opts.crate_type, crate);
126124
}
127-
fn get_working_dir() -> str {
128-
ret working_dir;
129-
}
130125
}
131126

132127
fn building_library(req_crate_type: crate_type, crate: @ast::crate) -> bool {

trunk/src/comp/lib/llvm.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,9 @@ native mod llvm {
234234
/* Operations on other types */
235235
fn LLVMVoidTypeInContext(C: ContextRef) -> TypeRef;
236236
fn LLVMLabelTypeInContext(C: ContextRef) -> TypeRef;
237-
fn LLVMMetadataTypeInContext(C: ContextRef) -> TypeRef;
238237

239238
fn LLVMVoidType() -> TypeRef;
240239
fn LLVMLabelType() -> TypeRef;
241-
fn LLVMMetadataType() -> TypeRef;
242240

243241
/* Operations on all values */
244242
fn LLVMTypeOf(Val: ValueRef) -> TypeRef;
@@ -258,7 +256,6 @@ native mod llvm {
258256

259257
/* Operations on Users */
260258
fn LLVMGetOperand(Val: ValueRef, Index: uint) -> ValueRef;
261-
fn LLVMSetOperand(Val: ValueRef, Index: uint, Op: ValueRef);
262259

263260
/* Operations on constants of any type */
264261
fn LLVMConstNull(Ty: TypeRef) -> ValueRef;
@@ -278,8 +275,6 @@ native mod llvm {
278275
fn LLVMMDNodeInContext(C: ContextRef, Vals: *ValueRef, Count: uint) ->
279276
ValueRef;
280277
fn LLVMMDNode(Vals: *ValueRef, Count: uint) -> ValueRef;
281-
fn LLVMAddNamedMetadataOperand(M: ModuleRef, Str: sbuf, SLen: uint,
282-
Val: ValueRef);
283278

284279
/* Operations on scalar constants */
285280
fn LLVMConstInt(IntTy: TypeRef, N: ULongLong, SignExtend: Bool) ->

trunk/src/comp/metadata/decoder.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,8 @@ fn item_type(item: ebml::doc, this_cnum: ast::crate_num, tcx: ty::ctxt,
107107
}
108108
let tp = ebml::get_doc(item, tag_items_data_item_type);
109109
let def_parser = bind parse_external_def_id(this_cnum, extres, _);
110-
let t = parse_ty_data(item.data, this_cnum, tp.start, tp.end - tp.start,
111-
def_parser, tcx);
112-
if family_names_type(item_family(item)) {
113-
t = ty::mk_named(tcx, t, @item_name(item));
114-
}
115-
t
110+
ret parse_ty_data(item.data, this_cnum, tp.start, tp.end - tp.start,
111+
def_parser, tcx);
116112
}
117113

118114
fn item_ty_param_kinds(item: ebml::doc) -> [ast::kind] {
@@ -311,10 +307,6 @@ fn family_has_type_params(fam_ch: u8) -> bool {
311307
};
312308
}
313309

314-
fn family_names_type(fam_ch: u8) -> bool {
315-
alt fam_ch as char { 'y' | 't' { true } _ { false } }
316-
}
317-
318310
fn read_path(d: ebml::doc) -> {path: str, pos: uint} {
319311
let desc = ebml::doc_data(d);
320312
let pos = ebml::be_uint_from_bytes(@desc, 0u, 4u);

trunk/src/comp/metadata/encoder.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,6 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::writer, item: @item,
314314
encode_family(ebml_w, 'y' as u8);
315315
encode_type_param_kinds(ebml_w, tps);
316316
encode_type(ecx, ebml_w, node_id_to_monotype(ecx.ccx.tcx, item.id));
317-
encode_name(ebml_w, item.ident);
318317
ebml::end_tag(ebml_w);
319318
}
320319
item_tag(variants, tps) {
@@ -323,7 +322,6 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::writer, item: @item,
323322
encode_family(ebml_w, 't' as u8);
324323
encode_type_param_kinds(ebml_w, tps);
325324
encode_type(ecx, ebml_w, node_id_to_monotype(ecx.ccx.tcx, item.id));
326-
encode_name(ebml_w, item.ident);
327325
for v: variant in variants {
328326
encode_variant_id(ebml_w, local_def(v.node.id));
329327
}
@@ -338,7 +336,6 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::writer, item: @item,
338336
encode_family(ebml_w, 'y' as u8);
339337
encode_type_param_kinds(ebml_w, tps);
340338
encode_type(ecx, ebml_w, ty::ty_fn_ret(ecx.ccx.tcx, fn_ty));
341-
encode_name(ebml_w, item.ident);
342339
encode_symbol(ecx, ebml_w, item.id);
343340
ebml::end_tag(ebml_w);
344341

@@ -359,7 +356,6 @@ fn encode_info_for_item(ecx: @encode_ctxt, ebml_w: ebml::writer, item: @item,
359356
encode_family(ebml_w, 'y' as u8);
360357
encode_type_param_kinds(ebml_w, tps);
361358
encode_type(ecx, ebml_w, ty::ty_fn_ret(ecx.ccx.tcx, fn_ty));
362-
encode_name(ebml_w, item.ident);
363359
ebml::end_tag(ebml_w);
364360

365361
index += [{val: ctor_id, pos: ebml_w.writer.tell()}];

trunk/src/comp/middle/ast_map.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ import syntax::{visit, codemap};
77
tag ast_node {
88
node_item(@item);
99
node_obj_ctor(@item);
10-
node_obj_method(@method);
1110
node_native_item(@native_item);
1211
node_method(@method);
1312
node_expr(@expr);
1413
// Locals are numbered, because the alias analysis needs to know in which
1514
// order they are introduced.
1615
node_arg(arg, uint);
1716
node_local(uint);
18-
node_res_ctor(@item);
1917
}
2018

2119
type map = std::map::hashmap<node_id, ast_node>;
@@ -65,19 +63,10 @@ fn map_arm(cx: ctx, arm: arm) {
6563
fn map_item(cx: ctx, i: @item) {
6664
cx.map.insert(i.id, node_item(i));
6765
alt i.node {
68-
item_obj(ob, _, ctor_id) {
69-
cx.map.insert(ctor_id, node_obj_ctor(i));
70-
for m in ob.methods {
71-
cx.map.insert(m.node.id, node_obj_method(m));
72-
}
73-
}
66+
item_obj(_, _, ctor_id) { cx.map.insert(ctor_id, node_obj_ctor(i)); }
7467
item_impl(_, _, ms) {
7568
for m in ms { cx.map.insert(m.node.id, node_method(m)); }
7669
}
77-
item_res(_, dtor_id, _, ctor_id) {
78-
cx.map.insert(ctor_id, node_res_ctor(i));
79-
cx.map.insert(dtor_id, node_item(i));
80-
}
8170
_ { }
8271
}
8372
}

0 commit comments

Comments
 (0)