]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #9026 : jbclements/rust/let-var-hygiene, r=jbclements
bors [Sat, 7 Sep 2013 06:35:57 +0000 (23:35 -0700)]
auto merge of #9026 : jbclements/rust/let-var-hygiene, r=jbclements

This is a rebase of my approved pull request from ... the end of June? It introduces hygiene for let-bound variables.

10 years agoident->name in debuginfo
John Clements [Sat, 7 Sep 2013 06:19:11 +0000 (23:19 -0700)]
ident->name in debuginfo

10 years agoauto merge of #9016 : sfackler/rust/nanoseconds, r=alexcrichton
bors [Sat, 7 Sep 2013 05:25:59 +0000 (22:25 -0700)]
auto merge of #9016 : sfackler/rust/nanoseconds, r=alexcrichton

The ISO 8601 standard does not mandate any specific precision for
fractional seconds, so this accepts input of any length, ignoring the
part after the nanoseconds place. It may be more correct to round with
the tenths of nanoseconds digit, but then we'd have to deal with
carrying the round through the entire Tm struct (e.g. for a time like
Dec 31 11:59.999999999999).

%f is the format specifier that Python's datetime library uses for
0-padded microseconds so it seemed appropriate here.

cc #2350

10 years agoauto merge of #9010 : aaronlaursen/rust/master, r=alexcrichton
bors [Sat, 7 Sep 2013 03:10:57 +0000 (20:10 -0700)]
auto merge of #9010 : aaronlaursen/rust/master, r=alexcrichton

Here's a fix for issue #7588, "Overflow handling of from_str methods is broken".

The integer overflow issues are taken care of by checking to see if the multiply-by-radix-and-add-next-digit process is reversible. If it overflowed, then some information is lost and the process is irreversible, in which case, None is returned.

Floats now consistently return Some(Inf) of Some(-Inf) on overflow thanks to a call to NumStrConv::inf() and NumStrConv::neg_inf() respectively when the overflow is detected (which yields a value of None in the case of ints and uints anyway).

This is my first contribution to Rust, and my first time using the language in general, so any and all feedback is appreciated.

10 years agoauto merge of #9030 : tikue/rust/glob, r=huonw
bors [Sat, 7 Sep 2013 02:01:01 +0000 (19:01 -0700)]
auto merge of #9030 : tikue/rust/glob, r=huonw

10 years agouse enumerate in place of 'for ti in range(i, tokens.len()) ... match tokens[ti]...
Tim Kuehn [Sat, 7 Sep 2013 01:36:48 +0000 (21:36 -0400)]
use enumerate in place of 'for ti in range(i, tokens.len()) ... match tokens[ti] ...'

10 years agoauto merge of #9019 : alexcrichton/rust/reconfigure-llvm, r=brson
bors [Fri, 6 Sep 2013 23:51:00 +0000 (16:51 -0700)]
auto merge of #9019 : alexcrichton/rust/reconfigure-llvm, r=brson

@Chris-Morgan ran into this, turns out if we have a clean llvm in the old location we won't rebuild/reconfigure even though we should.

10 years agoident->name
John Clements [Thu, 5 Sep 2013 20:57:52 +0000 (13:57 -0700)]
ident->name

10 years agoadded index to test cases, more debugging output
John Clements [Thu, 5 Sep 2013 20:28:57 +0000 (13:28 -0700)]
added index to test cases, more debugging output

10 years agoquote_* macros no longer need to be capturing
John Clements [Thu, 5 Sep 2013 17:30:23 +0000 (10:30 -0700)]
quote_* macros no longer need to be capturing

This is actually almost a problem, because those were my poster-child
macros for "here's how to implement a capturing macro." Following this
change, there will be no macros that use capturing; this will probably
make life unpleasant for the first person that wants to implement a
capturing macro. I should probably create a dummy_capturing macro,
just to show how it works.

10 years agocomment fix
John Clements [Sun, 28 Jul 2013 20:34:19 +0000 (16:34 -0400)]
comment fix

10 years agoadd hygiene test, add copyright to another
John Clements [Fri, 26 Jul 2013 20:30:05 +0000 (16:30 -0400)]
add hygiene test, add copyright to another

10 years agomake macro hygienic
John Clements [Fri, 26 Jul 2013 20:10:56 +0000 (16:10 -0400)]
make macro hygienic

10 years agoadd test case, cleanup
John Clements [Thu, 5 Sep 2013 16:29:31 +0000 (09:29 -0700)]
add test case, cleanup

10 years agoadd display_sctable fn to ast_util
John Clements [Fri, 26 Jul 2013 17:27:38 +0000 (13:27 -0400)]
add display_sctable fn to ast_util

10 years agofixed a bug that caused double-expand-traversal of macros that expand into modules.
John Clements [Fri, 26 Jul 2013 16:57:30 +0000 (12:57 -0400)]
fixed a bug that caused double-expand-traversal of macros that expand into modules.

10 years agoWIP: adding mark-cancelling for macro_rules
John Clements [Sun, 14 Jul 2013 19:25:04 +0000 (15:25 -0400)]
WIP: adding mark-cancelling for macro_rules

10 years agoadded string_to_tts
John Clements [Sun, 14 Jul 2013 19:23:56 +0000 (15:23 -0400)]
added string_to_tts

10 years agocomments
John Clements [Sun, 14 Jul 2013 02:12:25 +0000 (19:12 -0700)]
comments

10 years agocomment on hygienic context extension train fns
John Clements [Sat, 13 Jul 2013 17:18:37 +0000 (10:18 -0700)]
comment on hygienic context extension train fns

10 years agoawesome new bug! added test case
John Clements [Sat, 13 Jul 2013 01:35:47 +0000 (18:35 -0700)]
awesome new bug! added test case

10 years agoexpose mtwt_marksof for testing
John Clements [Sat, 13 Jul 2013 01:35:05 +0000 (18:35 -0700)]
expose mtwt_marksof for testing

10 years agoident->name
John Clements [Fri, 12 Jul 2013 15:55:12 +0000 (08:55 -0700)]
ident->name

10 years agoxfailed unhygienic test
John Clements [Fri, 12 Jul 2013 08:18:59 +0000 (01:18 -0700)]
xfailed unhygienic test

10 years agoident->name
John Clements [Fri, 12 Jul 2013 07:28:48 +0000 (00:28 -0700)]
ident->name

10 years agoremove unneeded imports, clean up unused var warnings
John Clements [Fri, 12 Jul 2013 06:07:34 +0000 (23:07 -0700)]
remove unneeded imports, clean up unused var warnings

10 years agowhitespace, reindentation, and comments only
John Clements [Fri, 12 Jul 2013 05:58:14 +0000 (22:58 -0700)]
whitespace, reindentation, and comments only

10 years agomemoization for resolve
John Clements [Wed, 10 Jul 2013 23:40:09 +0000 (16:40 -0700)]
memoization for resolve

10 years agouncomment mtwt_resolve calls
John Clements [Thu, 5 Sep 2013 21:15:00 +0000 (14:15 -0700)]
uncomment mtwt_resolve calls

10 years agoident->name in NamedField, elsewhere
John Clements [Wed, 10 Jul 2013 20:44:58 +0000 (13:44 -0700)]
ident->name in NamedField, elsewhere

10 years agoadded utility function
John Clements [Wed, 10 Jul 2013 18:52:59 +0000 (11:52 -0700)]
added utility function

10 years agofix one remaining token comparison, refactor token comparison to avoid == check
John Clements [Wed, 10 Jul 2013 18:52:39 +0000 (11:52 -0700)]
fix one remaining token comparison, refactor token comparison to avoid == check

10 years agoremove dead code
John Clements [Tue, 9 Jul 2013 21:24:03 +0000 (14:24 -0700)]
remove dead code

10 years agocapturing macros now implemented
John Clements [Mon, 8 Jul 2013 22:55:14 +0000 (15:55 -0700)]
capturing macros now implemented

10 years agoadd fold_mac clause to fun_to_ctxt_folder
John Clements [Mon, 8 Jul 2013 17:37:07 +0000 (10:37 -0700)]
add fold_mac clause to fun_to_ctxt_folder

10 years agoadd fold_mac field to fold.rs
John Clements [Fri, 5 Jul 2013 21:16:39 +0000 (14:16 -0700)]
add fold_mac field to fold.rs

10 years agoWIP: adding context to macros
John Clements [Fri, 5 Jul 2013 20:57:53 +0000 (13:57 -0700)]
WIP: adding context to macros

10 years agorework fold so that fold_tts takes an ast_fold rather than a thunk, stop using closur...
John Clements [Tue, 9 Jul 2013 22:56:21 +0000 (15:56 -0700)]
rework fold so that fold_tts takes an ast_fold rather than a thunk, stop using closures in ident traversal

10 years agoadd temporarily unused ctxt field to mac_invoc_tt
John Clements [Wed, 3 Jul 2013 22:16:04 +0000 (15:16 -0700)]
add temporarily unused ctxt field to mac_invoc_tt

10 years agocomments
John Clements [Wed, 3 Jul 2013 22:15:45 +0000 (15:15 -0700)]
comments

10 years agoadd test case for macro token comparison
John Clements [Tue, 9 Jul 2013 22:10:16 +0000 (15:10 -0700)]
add test case for macro token comparison

10 years agomarking on both input and output from macros. nice shiny new test case framework
John Clements [Sat, 29 Jun 2013 12:59:08 +0000 (05:59 -0700)]
marking on both input and output from macros. nice shiny new test case framework

10 years agoadded IterBytes for 4-tuples
John Clements [Thu, 27 Jun 2013 23:00:18 +0000 (16:00 -0700)]
added IterBytes for 4-tuples

10 years agoadded gensym_copy mechanism to ensure sharing of pointers in the interner
John Clements [Wed, 26 Jun 2013 17:11:19 +0000 (10:11 -0700)]
added gensym_copy mechanism to ensure sharing of pointers in the interner

this makes comparisons constant-time, and enables spelling-comparison
of identifiers, crucial in many parts of resolve.

10 years agoadded test for ptr_eq on fresh_name-generated idents
John Clements [Tue, 25 Jun 2013 23:48:03 +0000 (16:48 -0700)]
added test for ptr_eq on fresh_name-generated idents

10 years agofixed bug in fold's traversal of cast exprs
John Clements [Sat, 8 Jun 2013 00:14:06 +0000 (17:14 -0700)]
fixed bug in fold's traversal of cast exprs

10 years agonew test that uncovers bug in fold
John Clements [Sat, 8 Jun 2013 00:06:57 +0000 (17:06 -0700)]
new test that uncovers bug in fold

10 years agotest case support fns, remove debugging test case
John Clements [Tue, 9 Jul 2013 23:00:41 +0000 (16:00 -0700)]
test case support fns, remove debugging test case

10 years agotest case work
John Clements [Fri, 7 Jun 2013 22:01:28 +0000 (15:01 -0700)]
test case work

10 years agore-add lost call to expand_block_elts
John Clements [Fri, 7 Jun 2013 21:54:48 +0000 (14:54 -0700)]
re-add lost call to expand_block_elts

10 years agore-add debug version
John Clements [Fri, 7 Jun 2013 21:53:53 +0000 (14:53 -0700)]
re-add debug version

10 years agotest case work
John Clements [Fri, 7 Jun 2013 19:28:03 +0000 (12:28 -0700)]
test case work

10 years agouse empty_ctxt to simplify downstream
John Clements [Fri, 7 Jun 2013 19:26:34 +0000 (12:26 -0700)]
use empty_ctxt to simplify downstream

10 years agomake comparison of special_idents non-hygienic
John Clements [Wed, 3 Jul 2013 18:34:01 +0000 (11:34 -0700)]
make comparison of special_idents non-hygienic

10 years agocomments
John Clements [Fri, 7 Jun 2013 17:41:38 +0000 (10:41 -0700)]
comments

10 years agodrop back to a simple gensym approach for fresh-name.
John Clements [Fri, 7 Jun 2013 17:41:18 +0000 (10:41 -0700)]
drop back to a simple gensym approach for fresh-name.

this is necessary so that the new idents are connected to the original strings.
this is important both for error messages, and so that top-level refs get connected
to the right things.

10 years agoadded FIXME comment
John Clements [Fri, 7 Jun 2013 17:39:59 +0000 (10:39 -0700)]
added FIXME comment

10 years agoremove FIXME #2888, now bug is fixed
John Clements [Fri, 7 Jun 2013 01:09:31 +0000 (18:09 -0700)]
remove FIXME #2888, now bug is fixed

10 years agocomments only
John Clements [Wed, 29 May 2013 23:21:04 +0000 (16:21 -0700)]
comments only

10 years agoadding test case to check marking/unmarking
John Clements [Tue, 25 Jun 2013 18:43:52 +0000 (11:43 -0700)]
adding test case to check marking/unmarking

10 years agorefactor so tt_fold only requires an ident->ident fn
John Clements [Tue, 28 May 2013 22:13:57 +0000 (15:13 -0700)]
refactor so tt_fold only requires an ident->ident fn

10 years agoseparate ItemDecorator from ItemDecorator
John Clements [Tue, 28 May 2013 21:55:50 +0000 (14:55 -0700)]
separate ItemDecorator from ItemDecorator

10 years agoremoved unneccessary SyntaxExpander structs
John Clements [Tue, 28 May 2013 21:53:38 +0000 (14:53 -0700)]
removed unneccessary SyntaxExpander structs

10 years agocomments in ast.rs
John Clements [Thu, 6 Jun 2013 18:14:29 +0000 (11:14 -0700)]
comments in ast.rs

10 years agorenaming test cases
John Clements [Thu, 6 Jun 2013 18:21:02 +0000 (11:21 -0700)]
renaming test cases

10 years agoflip the switch on let renaming
John Clements [Thu, 6 Jun 2013 18:42:34 +0000 (11:42 -0700)]
flip the switch on let renaming

10 years agoresolve test case
John Clements [Wed, 26 Jun 2013 17:37:25 +0000 (10:37 -0700)]
resolve test case

resolve must ignore syntax context when comparing module names

10 years agomake ifn macro non-capturing
John Clements [Mon, 8 Jul 2013 22:52:51 +0000 (15:52 -0700)]
make ifn macro non-capturing

10 years agoupdate librustc to use name comparison in most cases, and mtwt_resolve comparison...
John Clements [Wed, 26 Jun 2013 22:56:13 +0000 (15:56 -0700)]
update librustc to use name comparison in most cases, and mtwt_resolve comparison in others

10 years agoone-line comment
John Clements [Fri, 31 May 2013 00:46:25 +0000 (17:46 -0700)]
one-line comment

10 years agoadd hygiene support fns, move them around.
John Clements [Tue, 25 Jun 2013 18:40:51 +0000 (11:40 -0700)]
add hygiene support fns, move them around.

also adds test cases

10 years agotry removing basically dead code in resolve
John Clements [Wed, 26 Jun 2013 18:16:09 +0000 (11:16 -0700)]
try removing basically dead code in resolve

10 years agocompare macro tokens hygienically (commented out)
John Clements [Thu, 5 Sep 2013 21:14:31 +0000 (14:14 -0700)]
compare macro tokens hygienically (commented out)

10 years agoident->name
John Clements [Thu, 6 Jun 2013 02:49:41 +0000 (19:49 -0700)]
ident->name

10 years agorename resolve to mtwt_resolve
John Clements [Tue, 9 Jul 2013 21:09:30 +0000 (14:09 -0700)]
rename resolve to mtwt_resolve

10 years agocommenting out special Eq implementation for now
John Clements [Fri, 6 Sep 2013 20:34:58 +0000 (13:34 -0700)]
commenting out special Eq implementation for now

See the comments for details on why I'm leaving this code
in, though commented out.

10 years agoauto merge of #8994 : alexcrichton/rust/upgrade-libuv, r=brson
bors [Fri, 6 Sep 2013 18:16:12 +0000 (11:16 -0700)]
auto merge of #8994 : alexcrichton/rust/upgrade-libuv, r=brson

This is a reopening of the libuv-upgrade part of #8645. Hopefully this won't
cause random segfaults all over the place. The windows regression in testing
should also be fixed (it shouldn't build the whole compiler twice).

A notable difference from before is that gyp is now a git submodule instead of
always git-cloned at make time. This allows bundling for releases more easily.

Closes #8850

10 years agoUpgrade libuv to the current master (again)
Alex Crichton [Mon, 19 Aug 2013 00:11:45 +0000 (17:11 -0700)]
Upgrade libuv to the current master (again)

This is a reopening of the libuv-upgrade part of #8645. Hopefully this won't
cause random segfaults all over the place. The windows regression in testing
should also be fixed (it shouldn't build the whole compiler twice).

A notable difference from before is that gyp is now a git submodule instead of
always git-cloned at make time. This allows bundling for releases more easily.

Closes #8850

10 years agofix for issue #7588, overflow now handled correctly
Aaron Laursen [Fri, 30 Aug 2013 22:45:20 +0000 (17:45 -0500)]
fix for issue #7588, overflow now handled correctly

10 years agodisallow ident equality checks when contexts are not equal
John Clements [Wed, 10 Jul 2013 05:52:34 +0000 (22:52 -0700)]
disallow ident equality checks when contexts are not equal

10 years agomove and duplicate macro defns in sha2 to make them hygienic
John Clements [Thu, 5 Sep 2013 16:05:26 +0000 (09:05 -0700)]
move and duplicate macro defns in sha2 to make them hygienic

... it would also have been possible to add all of their dependencies,
but that would have increased the already-lengthy list of parameters.
Also, if we had macros that could expand into macro defns, you could
stage it. This seemed like the least painful choice.

10 years agoauto merge of #9017 : vadimcn/rust/rustllvm-build, r=alexcrichton
bors [Fri, 6 Sep 2013 12:05:59 +0000 (05:05 -0700)]
auto merge of #9017 : vadimcn/rust/rustllvm-build, r=alexcrichton

After recent build directory reorg, building from scratch fails (at least on Windows), because it can't find llvm-config.h.

10 years agoauto merge of #9002 : brson/rust/issue-8769, r=catamorphism
bors [Fri, 6 Sep 2013 10:50:57 +0000 (03:50 -0700)]
auto merge of #9002 : brson/rust/issue-8769, r=catamorphism

This is an unsafe implementation detail of `push`.

10 years agoauto merge of #9000 : brson/rust/dns, r=anasazi
bors [Fri, 6 Sep 2013 09:31:02 +0000 (02:31 -0700)]
auto merge of #9000 : brson/rust/dns, r=anasazi

This exposes a very simple function for resolving host names. There's a lot more that needs to be done, but this is probably enough for servo to get started connecting to real websites again.

10 years agoauto merge of #9018 : alexcrichton/rust/fix-bots, r=huonw
bors [Fri, 6 Sep 2013 07:36:07 +0000 (00:36 -0700)]
auto merge of #9018 : alexcrichton/rust/fix-bots, r=huonw

The new glob tests created tmp/glob-tests as a directory, but the never removed
it. The `make clean` target then attempted to `rm -f` on this, but it couldn't
remove the directory. This both changes the clean target to `rm -rf` tmp files,
and also alters the tests to delete the directory that all the files are added
into.

10 years agoUn-hork the bots by removing intermediate files
Alex Crichton [Fri, 6 Sep 2013 07:17:14 +0000 (00:17 -0700)]
Un-hork the bots by removing intermediate files

The new glob tests created tmp/glob-tests as a directory, but the never removed
it. The `make clean` target then attempted to `rm -f` on this, but it couldn't
remove the directory. This both changes the clean target to `rm -rf` tmp files,
and also alters the tests to delete the directory that all the files are added
into.

10 years agoBe sure to reconfigure LLVM even when relocated
Alex Crichton [Fri, 6 Sep 2013 07:09:36 +0000 (00:09 -0700)]
Be sure to reconfigure LLVM even when relocated

10 years agoFixed makefile to point to the new llvm build directory.
Vadim Chugunov [Fri, 6 Sep 2013 06:18:18 +0000 (23:18 -0700)]
Fixed makefile to point to the new llvm build directory.

10 years agoAdd fractional second support to str{p,f}time
Steven Fackler [Fri, 6 Sep 2013 06:13:02 +0000 (23:13 -0700)]
Add fractional second support to str{p,f}time

The ISO 8601 standard does not mandate any specific precision for
fractional seconds, so this accepts input of any length, ignoring the
part after the nanoseconds place. It may be more correct to round with
the tenths of nanoseconds digit, but then we'd have to deal with
carrying the round through the entire Tm struct (e.g. for a time like
Dec 31 11:59.999999999999).

%f is the format specifier that Python's datetime library uses for
0-padded microseconds so it seemed appropriate here.

cc #2350

10 years agostd::rt: Fix addrinfo definition on BSD
Brian Anderson [Fri, 6 Sep 2013 05:15:02 +0000 (22:15 -0700)]
std::rt: Fix addrinfo definition on BSD

10 years agoauto merge of #8914 : Dretch/rust/native-glob, r=alexcrichton
bors [Fri, 6 Sep 2013 05:00:58 +0000 (22:00 -0700)]
auto merge of #8914 : Dretch/rust/native-glob, r=alexcrichton

This is #8201 with a bunch of amendments to address the comments (and re-based).

10 years agoauto merge of #8909 : lkuper/rust/default-methods-refactor, r=alexcrichton
bors [Fri, 6 Sep 2013 03:50:53 +0000 (20:50 -0700)]
auto merge of #8909 : lkuper/rust/default-methods-refactor, r=alexcrichton

 (cc: #3227)

Parts I'm unsure about and would like a reviewer to look at are:

  * `pub trait GenericPath : Clone + Eq + ToStr` -- is this the done thing?  I've never done trait inheritance before, let alone from multiple traits, but it seemed to be necessary to be able to call all the methods we have to be able to call on `self`.

  * changing the argument of `components` from `self` to `&self`, and having it return `self.components.clone()` instead of `self.components`; this was necessary to avoid move errors, but I'm not sure if it's the right thing.  (The default methods impls now all have to call `self.components()` instead of just referencing the field `self.components`.)

10 years agoauto merge of #9011 : alexcrichton/rust/fix-lint, r=thestinger
bors [Fri, 6 Sep 2013 02:40:54 +0000 (19:40 -0700)]
auto merge of #9011 : alexcrichton/rust/fix-lint, r=thestinger

10 years agoDon't run lint over gyp files (they just fail anyway)
Alex Crichton [Fri, 6 Sep 2013 02:20:30 +0000 (19:20 -0700)]
Don't run lint over gyp files (they just fail anyway)

10 years agoauto merge of #9004 : brson/rust/issue-8660, r=thestinger
bors [Thu, 5 Sep 2013 23:40:48 +0000 (16:40 -0700)]
auto merge of #9004 : brson/rust/issue-8660, r=thestinger

The new scheduler makes better use of threads than the old.

10 years agoextra: Don't overcommit test tasks. Closes #8660
Brian Anderson [Thu, 5 Sep 2013 23:36:39 +0000 (16:36 -0700)]
extra: Don't overcommit test tasks. Closes #8660

The new scheduler makes better use of threads than the old.

10 years agostd: Remove push_fast from OwnedVector. Closes #8769
Brian Anderson [Thu, 5 Sep 2013 22:55:59 +0000 (15:55 -0700)]
std: Remove push_fast from OwnedVector. Closes #8769

This is an unsafe implementation detail of `push`.

10 years agoauto merge of #8997 : fhahn/rust/issue_8985, r=catamorphism,brson
bors [Thu, 5 Sep 2013 22:00:49 +0000 (15:00 -0700)]
auto merge of #8997 : fhahn/rust/issue_8985, r=catamorphism,brson

Patch for #8985

10 years agostd::rt: Add get_host_addresses function
Brian Anderson [Thu, 5 Sep 2013 21:16:17 +0000 (14:16 -0700)]
std::rt: Add get_host_addresses function

This is a very simplistic method for host name resolution. It converts
a host name to a vector of IP addresses. Should be enough to get started.

10 years agostd::rt: Add libuv bindings for getaddrinfo
Brian Anderson [Thu, 5 Sep 2013 01:51:14 +0000 (18:51 -0700)]
std::rt: Add libuv bindings for getaddrinfo