Vadim Chugunov
8cf50bc1fd
Merged windows and unix find_libdir()
2015-11-02 11:42:20 -08:00
Vadim Chugunov
4e0c6db67f
Windows: Move target libraries to $rustroot/lib/rustlib/... - for symmetry with all other platforms.
2015-10-31 23:29:39 -07:00
JP Sugarbroad
9cdd73124a
Log the error we get when we fail to load metadata from a library.
2015-10-28 11:19:33 -07:00
Florian Hahn
107b4aa329
Remove bare semicolons
2015-10-24 00:35:44 +02:00
Vadim Petrochenkov
46750d0409
Merge VariantData and VariantData_
2015-10-13 15:19:27 +03:00
Vadim Petrochenkov
40aa09e4c9
Merge struct fields and struct kind
2015-10-13 15:19:25 +03:00
Vadim Petrochenkov
30af54dede
Dict -> Struct, StructDef -> VariantData, def -> data
2015-10-13 15:19:24 +03:00
Vadim Petrochenkov
f4e3851aa7
Fix rebase
2015-10-13 15:19:22 +03:00
Vadim Petrochenkov
877c35e8a2
Remove now redundant NodeId from Variant
2015-10-13 15:19:18 +03:00
Vadim Petrochenkov
495566ee61
Decouple structure kinds from NodeIds
2015-10-13 15:19:17 +03:00
Ariel Ben-Yehuda
8afa1762f0
use the struct's ctor-id as its variant def-id
...
this makes the code cleaner, and is a complement to the cleanup on the
HIR side.
2015-10-07 20:31:23 +03:00
bors
3e06daac83
Auto merge of #28521 - arielb1:metadiet, r=eddyb
...
libcore.rlib reduced from 19121 kiB to 15934 kiB - 20% win.
The librustc encoded AST is 9013500 bytes long - for the record, librustc consists of about 2254126 characters. Might be worth looking at.
r? @eddyb
2015-10-03 17:33:10 +00:00
Ariel Ben-Yehuda
eae41d3078
unify the 2 impl indexes
2015-10-02 16:44:26 +03:00
Ariel Ben-Yehuda
55d35f12ae
Merge branch 'master' into metadiet
...
rlib sizes:
1445222 liballoc_jemalloc-bb943c5a.rlib
10664 liballoc_system-bb943c5a.rlib
143592 libarena-bb943c5a.rlib
3639102 libcollections-bb943c5a.rlib
16316910 libcore-bb943c5a.rlib
214154 libflate-bb943c5a.rlib
231440 libfmt_macros-bb943c5a.rlib
536976 libgetopts-bb943c5a.rlib
209672 libgraphviz-bb943c5a.rlib
408008 liblibc-bb943c5a.rlib
189610 liblog-bb943c5a.rlib
662184 librand-bb943c5a.rlib
605112 librbml-bb943c5a.rlib
1397820 librustc_back-bb943c5a.rlib
38383772 librustc-bb943c5a.rlib
12842 librustc_bitflags-bb943c5a.rlib
2297822 librustc_borrowck-bb943c5a.rlib
571064 librustc_data_structures-bb943c5a.rlib
9356542 librustc_driver-bb943c5a.rlib
9477226 librustc_front-bb943c5a.rlib
1605698 librustc_lint-bb943c5a.rlib
77111720 librustc_llvm-bb943c5a.rlib
4783848 librustc_mir-bb943c5a.rlib
3534256 librustc_platform_intrinsics-bb943c5a.rlib
593038 librustc_privacy-bb943c5a.rlib
3122202 librustc_resolve-bb943c5a.rlib
14185212 librustc_trans-bb943c5a.rlib
11940328 librustc_typeck-bb943c5a.rlib
1634264 librustc_unicode-bb943c5a.rlib
15564160 librustdoc-bb943c5a.rlib
8153964 libstd-bb943c5a.rlib
30589338 libsyntax-bb943c5a.rlib
897110 libterm-bb943c5a.rlib
1360662 libtest-bb943c5a.rlib
2015-10-02 16:13:50 +03:00
bors
a004ff5caf
Auto merge of #28793 - Ms2ger:AttrStyle, r=alexcrichton
2015-10-02 07:10:43 +00:00
Ariel Ben-Yehuda
db817ceda4
remove the code that encodes type parameter defs
...
there are no type parameter defs in the relevant range
2015-10-01 22:31:09 +03:00
Ariel Ben-Yehuda
8557cb47cb
don't store method_fty
...
It is redundant with the item type. This is not much of a win,
as there are really not *that* many methods, but it makes the code
uglier.
2015-10-01 22:30:18 +03:00
Ariel Ben-Yehuda
a1c921e8a5
don't duplicate item types between encoder <-> astencode
...
a 5% win on libcore
512576 liballoc-bb943c5a.rlib
1425106 liballoc_jemalloc-bb943c5a.rlib
10070 liballoc_system-bb943c5a.rlib
141332 libarena-bb943c5a.rlib
3611586 libcollections-bb943c5a.rlib
16293400 libcore-bb943c5a.rlib
195018 libflate-bb943c5a.rlib
231940 libfmt_macros-bb943c5a.rlib
532704 libgetopts-bb943c5a.rlib
208094 libgraphviz-bb943c5a.rlib
383522 liblibc-bb943c5a.rlib
183786 liblog-bb943c5a.rlib
658332 librand-bb943c5a.rlib
567676 librbml-bb943c5a.rlib
1376114 librustc_back-bb943c5a.rlib
37134688 librustc-bb943c5a.rlib
12826 librustc_bitflags-bb943c5a.rlib
2241942 librustc_borrowck-bb943c5a.rlib
513598 librustc_data_structures-bb943c5a.rlib
9340348 librustc_driver-bb943c5a.rlib
8880472 librustc_front-bb943c5a.rlib
1590548 librustc_lint-bb943c5a.rlib
79149202 librustc_llvm-bb943c5a.rlib
4536740 librustc_mir-bb943c5a.rlib
3528866 librustc_platform_intrinsics-bb943c5a.rlib
588514 librustc_privacy-bb943c5a.rlib
3068562 librustc_resolve-bb943c5a.rlib
13982508 librustc_trans-bb943c5a.rlib
11799790 librustc_typeck-bb943c5a.rlib
1637532 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
2649520 libserialize-bb943c5a.rlib
8095050 libstd-bb943c5a.rlib
29391260 libsyntax-bb943c5a.rlib
891210 libterm-bb943c5a.rlib
2015-10-01 22:29:30 +03:00
Ariel Ben-Yehuda
b74219964c
improve the tyencode abbrev format
...
3% win on libcore
528828 liballoc-bb943c5a.rlib
1425126 liballoc_jemalloc-bb943c5a.rlib
10090 liballoc_system-bb943c5a.rlib
144904 libarena-bb943c5a.rlib
3773896 libcollections-bb943c5a.rlib
17075242 libcore-bb943c5a.rlib
195770 libflate-bb943c5a.rlib
234702 libfmt_macros-bb943c5a.rlib
536342 libgetopts-bb943c5a.rlib
212028 libgraphviz-bb943c5a.rlib
397068 liblibc-bb943c5a.rlib
185038 liblog-bb943c5a.rlib
680782 librand-bb943c5a.rlib
577574 librbml-bb943c5a.rlib
1381992 librustc_back-bb943c5a.rlib
37554736 librustc-bb943c5a.rlib
12826 librustc_bitflags-bb943c5a.rlib
2257392 librustc_borrowck-bb943c5a.rlib
533858 librustc_data_structures-bb943c5a.rlib
9338878 librustc_driver-bb943c5a.rlib
8960016 librustc_front-bb943c5a.rlib
1594212 librustc_lint-bb943c5a.rlib
79159342 librustc_llvm-bb943c5a.rlib
4590656 librustc_mir-bb943c5a.rlib
3529292 librustc_platform_intrinsics-bb943c5a.rlib
590688 librustc_privacy-bb943c5a.rlib
3084134 librustc_resolve-bb943c5a.rlib
14032890 librustc_trans-bb943c5a.rlib
11833852 librustc_typeck-bb943c5a.rlib
1641496 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
2693764 libserialize-bb943c5a.rlib
8266920 libstd-bb943c5a.rlib
29573790 libsyntax-bb943c5a.rlib
895484 libterm-bb943c5a.rlib
2015-10-01 22:10:09 +03:00
Ariel Ben-Yehuda
ce02aa4942
don't mark_stable_position needlessly in tyencode
...
another 1% improvement in libcore size - also 1% in librustc
550076 liballoc-bb943c5a.rlib
1425150 liballoc_jemalloc-bb943c5a.rlib
10100 liballoc_system-bb943c5a.rlib
149372 libarena-bb943c5a.rlib
3964144 libcollections-bb943c5a.rlib
17744342 libcore-bb943c5a.rlib
197420 libflate-bb943c5a.rlib
241582 libfmt_macros-bb943c5a.rlib
550560 libgetopts-bb943c5a.rlib
219444 libgraphviz-bb943c5a.rlib
402668 liblibc-bb943c5a.rlib
187158 liblog-bb943c5a.rlib
704588 librand-bb943c5a.rlib
594522 librbml-bb943c5a.rlib
1392516 librustc_back-bb943c5a.rlib
38196500 librustc-bb943c5a.rlib
12826 librustc_bitflags-bb943c5a.rlib
2286918 librustc_borrowck-bb943c5a.rlib
561714 librustc_data_structures-bb943c5a.rlib
9356400 librustc_driver-bb943c5a.rlib
9378650 librustc_front-bb943c5a.rlib
1603680 librustc_lint-bb943c5a.rlib
79184908 librustc_llvm-bb943c5a.rlib
4746824 librustc_mir-bb943c5a.rlib
3532474 librustc_platform_intrinsics-bb943c5a.rlib
592664 librustc_privacy-bb943c5a.rlib
3114986 librustc_resolve-bb943c5a.rlib
14153174 librustc_trans-bb943c5a.rlib
11918356 librustc_typeck-bb943c5a.rlib
1669986 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
2836912 libserialize-bb943c5a.rlib
8549994 libstd-bb943c5a.rlib
30399156 libsyntax-bb943c5a.rlib
907058 libterm-bb943c5a.rlib
2015-10-01 21:50:52 +03:00
Ms2ger
b093060c2a
Stop re-exporting AttrStyle's variants and rename them.
2015-10-01 18:03:34 +02:00
Ariel Ben-Yehuda
38cd6d40d2
share stored predicates
...
while most of the duplication in predicates was caused by stubs,
this is still a 5% win on libcore.
567924 liballoc-bb943c5a.rlib
1425564 liballoc_jemalloc-bb943c5a.rlib
10520 liballoc_system-bb943c5a.rlib
154842 libarena-bb943c5a.rlib
4113790 libcollections-bb943c5a.rlib
18513674 libcore-bb943c5a.rlib
199466 libflate-bb943c5a.rlib
249548 libfmt_macros-bb943c5a.rlib
560488 libgetopts-bb943c5a.rlib
226772 libgraphviz-bb943c5a.rlib
442966 liblibc-bb943c5a.rlib
189884 liblog-bb943c5a.rlib
736764 librand-bb943c5a.rlib
609874 librbml-bb943c5a.rlib
1411678 librustc_back-bb943c5a.rlib
38770354 librustc-bb943c5a.rlib
12868 librustc_bitflags-bb943c5a.rlib
2327196 librustc_borrowck-bb943c5a.rlib
582178 librustc_data_structures-bb943c5a.rlib
9379344 librustc_driver-bb943c5a.rlib
9540324 librustc_front-bb943c5a.rlib
1614996 librustc_lint-bb943c5a.rlib
79217876 librustc_llvm-bb943c5a.rlib
4833518 librustc_mir-bb943c5a.rlib
3535794 librustc_platform_intrinsics-bb943c5a.rlib
603190 librustc_privacy-bb943c5a.rlib
3158032 librustc_resolve-bb943c5a.rlib
14300126 librustc_trans-bb943c5a.rlib
12024054 librustc_typeck-bb943c5a.rlib
1834852 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
2926594 libserialize-bb943c5a.rlib
8780060 libstd-bb943c5a.rlib
30772000 libsyntax-bb943c5a.rlib
917984 libterm-bb943c5a.rlib
1369754 libtest-bb943c5a.rlib
2015-10-01 18:02:42 +03:00
Ariel Ben-Yehuda
d98165941d
add a cross-reference index
...
it still does not *do* anything
2015-10-01 17:45:41 +03:00
Ariel Ben-Yehuda
67e60bf283
remove unneeded tags from metadata
...
stage1 release rlib sizes:
580890 liballoc-bb943c5a.rlib
1425558 liballoc_jemalloc-bb943c5a.rlib
10514 liballoc_system-bb943c5a.rlib
157192 libarena-bb943c5a.rlib
4316234 libcollections-bb943c5a.rlib
19580128 libcore-bb943c5a.rlib
199498 libflate-bb943c5a.rlib
249328 libfmt_macros-bb943c5a.rlib
560406 libgetopts-bb943c5a.rlib
233620 libgraphviz-bb943c5a.rlib
442964 liblibc-bb943c5a.rlib
190178 liblog-bb943c5a.rlib
778488 librand-bb943c5a.rlib
621972 librbml-bb943c5a.rlib
1415040 librustc_back-bb943c5a.rlib
38849082 librustc-bb943c5a.rlib
12862 librustc_bitflags-bb943c5a.rlib
2331690 librustc_borrowck-bb943c5a.rlib
616880 librustc_data_structures-bb943c5a.rlib
9386582 librustc_driver-bb943c5a.rlib
9600440 librustc_front-bb943c5a.rlib
1615058 librustc_lint-bb943c5a.rlib
79218480 librustc_llvm-bb943c5a.rlib
5020974 librustc_mir-bb943c5a.rlib
3535448 librustc_platform_intrinsics-bb943c5a.rlib
603640 librustc_privacy-bb943c5a.rlib
3163628 librustc_resolve-bb943c5a.rlib
14326646 librustc_trans-bb943c5a.rlib
12033174 librustc_typeck-bb943c5a.rlib
1838202 librustc_unicode-bb943c5a.rlib
15611582 librustdoc-bb943c5a.rlib
3056280 libserialize-bb943c5a.rlib
8954312 libstd-bb943c5a.rlib
30906736 libsyntax-bb943c5a.rlib
925480 libterm-bb943c5a.rlib
1377952 libtest-bb943c5a.rlib
2015-10-01 17:43:15 +03:00
Niko Matsakis
6bfdf37250
remove code for re-exports of static methods
2015-10-01 10:43:07 -04:00
Niko Matsakis
01f32ace03
Convert DefId to use DefIndex, which is an index into a list of
...
paths, and construct paths for all definitions. Also, stop rewriting
DefIds for closures, and instead just load the closure data from
the original def-id, which may be in another crate.
2015-10-01 10:43:07 -04:00
Niko Matsakis
a6fee06741
rename ast_map to hir_map
2015-10-01 10:42:37 -04:00
Niko Matsakis
5600c6282e
move direct accesses of node
to go through as_local_node_id
, unless
...
they are being used as an opaque "position identifier"
2015-10-01 10:37:19 -04:00
Niko Matsakis
9ff4f57cd0
move job of creating local-def-ids to ast-map (with a few stragglers)
2015-10-01 10:28:28 -04:00
Niko Matsakis
dc4a4ada58
move LOCAL_CRATE to cstore
2015-10-01 09:44:28 -04:00
Ariel Ben-Yehuda
709ce9f96d
kill the fake provided method stubs
...
this simplifies the code while reducing the size of libcore.rlib by
3.3 MiB (~1M of which is bloat a separate patch of mine removes
too), while reducing rustc memory usage on small crates by 18MiB.
This also simplifies the code considerably.
2015-10-01 00:14:56 +03:00
bors
44d404804c
Auto merge of #28724 - tsion:remove-double-semicolons, r=alexcrichton
...
Really minor code cleanup, because why not?
2015-09-30 03:24:00 +00:00
bors
65d5c08337
Auto merge of #28702 - arielb1:metadata-versioning, r=nrc
...
This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.
Fixes #28700
r? @nrc
2015-09-29 23:26:34 +00:00
Ariel Ben-Yehuda
9699adc508
store the rustc version in metadata and check it
...
This prevents ICEs when old crates are used with a new version of
rustc. Currently, the linking of crates compiled with different
versions of rustc is completely unsupported.
Fixes #28700
2015-09-29 21:27:08 +03:00
Scott Olson
55e48420db
Minor code cleanup.
2015-09-28 19:21:18 -06:00
Vadim Petrochenkov
4744d56846
Fill in some missing parts in the default HIR visitor
2015-09-29 00:23:54 +03:00
Vadim Petrochenkov
f284cbc7af
Cleanup interfaces of Name, SyntaxContext and Ident
...
Make sure Name, SyntaxContext and Ident are passed by value
Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24 23:05:02 +03:00
Vadim Petrochenkov
40ce80484c
Remove random Idents outside of libsyntax
2015-09-23 20:04:49 +03:00
Vadim Petrochenkov
a636a83caa
Use Names in path fragments and MacroDef
2015-09-22 19:57:43 +03:00
Vadim Petrochenkov
a4af958786
Use Names in HIR Items
2015-09-22 19:53:52 +03:00
bors
8dfb89067a
Auto merge of #28353 - GuillaumeGomez:error_codes, r=Manishearth
...
r? @Manishearth
This is a work in progress.
2015-09-16 08:51:30 +00:00
Nick Cameron
e9f1b06329
Use ast attributes every where (remove HIR attributes).
...
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-16 10:57:06 +12:00
Ariel Ben-Yehuda
5a95acb8ab
split ty::util and ty::adjustment
2015-09-14 14:55:56 +03:00
bors
009f2cf7dd
Auto merge of #28392 - arielb1:sort-bounds-list, r=eddyb
...
The sort key is a (DefId, Name), which is *not* stable between
runs, so we must re-sort when loading.
Fixes #24063
Fixes #25467
Fixes #27222
Fixes #28377
r? @eddyb
2015-09-14 05:08:27 +00:00
Ariel Ben-Yehuda
8478acf695
sort the existential bounds list in tydecode
...
The sort key is a (DefId, Name), which is *not* stable between
runs, so we must re-sort when loading.
Fixes #24063
Fixes #25467
Fixes #27222
Fixes #28377
2015-09-13 20:59:40 +03:00
Guillaume Gomez
7358a5e8ea
Add part of new error codes in librustc
2015-09-13 00:38:36 +02:00
Ariel Ben-Yehuda
cde09e7ca3
rewrite metadata indexing
...
this improves the compilation time for small crates by ~20%
2015-09-03 12:59:51 +03:00
Ariel Ben-Yehuda
fcad49e416
remove totally useless struct-field index
2015-09-03 12:23:56 +03:00
Nick Cameron
facdf2ebb1
Add an intital HIR and lowering step
2015-09-03 10:02:36 +12:00
Ariel Ben-Yehuda
1e507d4450
address nits
2015-08-24 21:30:39 +03:00