Skip to content

Commit 9150d41

Browse files
committed
---
yaml --- r: 72625 b: refs/heads/dist-snap c: e34a7ec h: refs/heads/master i: 72623: d530c7f v: v3
1 parent b56f416 commit 9150d41

Some content is hidden

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

88 files changed

+1266
-6443
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: f45c6b878ff11ca7d1927f330ee6f2c878893b29
10+
refs/heads/dist-snap: e34a7ecbab8190560d50d4ccb21ffdae855b7c60
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/rt.mk

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,14 @@ endif
163163
ifdef CFG_WINDOWSY_$(1)
164164
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
165165
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
166-
CFLAGS="$$(CFG_GCCISH_CFLAGS)" \
167-
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS)" \
168166
builddir_name="$$(CFG_BUILD_DIR)/rt/$(1)/libuv" \
169167
OS=mingw \
170168
V=$$(VERBOSE)
171169
else ifeq ($(OSTYPE_$(1)), linux-androideabi)
172170
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
173171
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
174-
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
175-
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
172+
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
173+
LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
176174
CC="$$(CC_$(1))" \
177175
CXX="$$(CXX_$(1))" \
178176
AR="$$(AR_$(1))" \
@@ -183,8 +181,8 @@ $$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
183181
else
184182
$$(LIBUV_LIB_$(1)): $$(LIBUV_DEPS)
185183
$$(Q)$$(MAKE) -C $$(S)src/libuv/ \
186-
CFLAGS="$$(CFG_GCCISH_CFLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
187-
LDFLAGS="$$(CFG_GCCISH_LINK_FLAGS) $$(LIBUV_FLAGS_$$(HOST_$(1)))" \
184+
CFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1))) $$(SNAP_DEFINES)" \
185+
LDFLAGS="$$(LIBUV_FLAGS_$$(HOST_$(1)))" \
188186
CC="$$(CC_$(1))" \
189187
CXX="$$(CXX_$(1))" \
190188
AR="$$(AR_$(1))" \

branches/dist-snap/src/etc/unicode.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,6 @@ def emit_decomp_module(f, canon, compat):
235235
rf = open(r, "w")
236236

237237
(canon_decomp, compat_decomp, gencats) = load_unicode_data("UnicodeData.txt")
238-
239-
# Explain that the source code was generated by this script.
240-
rf.write('// The following code was generated by "src/etc/unicode.py"\n\n')
241-
242238
emit_property_module(rf, "general_category", gencats)
243239

244240
#emit_decomp_module(rf, canon_decomp, compat_decomp)

branches/dist-snap/src/libcore/bool.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ mod tests {
108108

109109
#[test]
110110
fn test_bool_from_str() {
111-
use from_str::FromStr;
112-
113111
do all_values |v| {
114112
assert!(Some(v) == FromStr::from_str(to_str(v)))
115113
}

branches/dist-snap/src/libcore/cast.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
//! Unsafe casting functions
1212
13+
#[cfg(not(stage0))]
1314
use sys;
15+
#[cfg(not(stage0))]
1416
use unstable;
1517

1618
pub mod rusti {

branches/dist-snap/src/libcore/core.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ pub use num::{Bitwise, BitCount, Bounded};
111111
pub use num::{Primitive, Int, Float};
112112

113113
pub use ptr::Ptr;
114+
pub use from_str::FromStr;
114115
pub use to_str::ToStr;
115116
pub use clone::Clone;
116117

branches/dist-snap/src/libcore/flate.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Simple compression
1616

1717
use libc;
1818
use libc::{c_void, size_t, c_int};
19-
use ptr;
2019
use vec;
2120

2221
#[cfg(test)] use rand;

branches/dist-snap/src/libcore/hashmap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ pub impl <T:Hash + Eq> HashSet<T> {
833833
}
834834
}
835835

836-
#[cfg(test)]
836+
#[test]
837837
mod test_map {
838838
use container::{Container, Map, Set};
839839
use option::{None, Some};
@@ -1009,7 +1009,7 @@ mod test_map {
10091009
}
10101010
}
10111011

1012-
#[cfg(test)]
1012+
#[test]
10131013
mod test_set {
10141014
use super::*;
10151015
use container::{Container, Map, Set};

branches/dist-snap/src/libcore/iterator.rs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub trait Iterator<A> {
2929
///
3030
/// In the future these will be default methods instead of a utility trait.
3131
pub trait IteratorUtil<A> {
32-
fn chain<U: Iterator<A>>(self, other: U) -> ChainIterator<Self, U>;
32+
fn chain(self, other: Self) -> ChainIterator<Self>;
3333
fn zip<B, U: Iterator<B>>(self, other: U) -> ZipIterator<Self, U>;
3434
// FIXME: #5898: should be called map
3535
fn transform<'r, B>(self, f: &'r fn(A) -> B) -> MapIterator<'r, A, B, Self>;
@@ -50,7 +50,7 @@ pub trait IteratorUtil<A> {
5050
/// In the future these will be default methods instead of a utility trait.
5151
impl<A, T: Iterator<A>> IteratorUtil<A> for T {
5252
#[inline(always)]
53-
fn chain<U: Iterator<A>>(self, other: U) -> ChainIterator<T, U> {
53+
fn chain(self, other: T) -> ChainIterator<T> {
5454
ChainIterator{a: self, b: other, flag: false}
5555
}
5656

@@ -115,13 +115,13 @@ impl<A, T: Iterator<A>> IteratorUtil<A> for T {
115115
}
116116
}
117117

118-
pub struct ChainIterator<T, U> {
118+
pub struct ChainIterator<T> {
119119
priv a: T,
120-
priv b: U,
120+
priv b: T,
121121
priv flag: bool
122122
}
123123

124-
impl<A, T: Iterator<A>, U: Iterator<A>> Iterator<A> for ChainIterator<T, U> {
124+
impl<A, T: Iterator<A>> Iterator<A> for ChainIterator<T> {
125125
#[inline]
126126
fn next(&mut self) -> Option<A> {
127127
if self.flag {
@@ -385,7 +385,7 @@ mod tests {
385385
#[test]
386386
fn test_iterator_chain() {
387387
let xs = [0u, 1, 2, 3, 4, 5];
388-
let ys = [30u, 40, 50, 60];
388+
let ys = [30, 40, 50, 60];
389389
let expected = [0, 1, 2, 3, 4, 5, 30, 40, 50, 60];
390390
let mut it = xs.iter().chain(ys.iter());
391391
let mut i = 0;
@@ -394,15 +394,6 @@ mod tests {
394394
i += 1;
395395
}
396396
assert_eq!(i, expected.len());
397-
398-
let ys = Counter::new(30u, 10).take(4);
399-
let mut it = xs.iter().transform(|&x| x).chain(ys);
400-
let mut i = 0;
401-
for it.advance |x: uint| {
402-
assert_eq!(x, expected[i]);
403-
i += 1;
404-
}
405-
assert_eq!(i, expected.len());
406397
}
407398

408399
#[test]

branches/dist-snap/src/libcore/libc.rs

Lines changed: 4 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -582,16 +582,12 @@ pub mod types {
582582

583583
pub type LPWSTR = *mut WCHAR;
584584
pub type LPSTR = *mut CHAR;
585-
pub type LPTSTR = *mut CHAR;
586585

587586
// Not really, but opaque to us.
588587
pub type LPSECURITY_ATTRIBUTES = LPVOID;
589588

590589
pub type LPVOID = *mut c_void;
591-
pub type LPBYTE = *mut BYTE;
592590
pub type LPWORD = *mut WORD;
593-
pub type LPDWORD = *mut DWORD;
594-
pub type LPHANDLE = *mut HANDLE;
595591

596592
pub type LRESULT = LONG_PTR;
597593
pub type PBOOL = *mut BOOL;
@@ -600,36 +596,6 @@ pub mod types {
600596

601597
pub type time64_t = i64;
602598
pub type int64 = i64;
603-
604-
pub struct STARTUPINFO {
605-
cb: DWORD,
606-
lpReserved: LPTSTR,
607-
lpDesktop: LPTSTR,
608-
lpTitle: LPTSTR,
609-
dwX: DWORD,
610-
dwY: DWORD,
611-
dwXSize: DWORD,
612-
dwYSize: DWORD,
613-
dwXCountChars: DWORD,
614-
dwYCountCharts: DWORD,
615-
dwFillAttribute: DWORD,
616-
dwFlags: DWORD,
617-
wShowWindow: WORD,
618-
cbReserved2: WORD,
619-
lpReserved2: LPBYTE,
620-
hStdInput: HANDLE,
621-
hStdOutput: HANDLE,
622-
hStdError: HANDLE
623-
}
624-
pub type LPSTARTUPINFO = *mut STARTUPINFO;
625-
626-
pub struct PROCESS_INFORMATION {
627-
hProcess: HANDLE,
628-
hThread: HANDLE,
629-
dwProcessId: DWORD,
630-
dwThreadId: DWORD
631-
}
632-
pub type LPPROCESS_INFORMATION = *mut PROCESS_INFORMATION;
633599
}
634600
}
635601
}
@@ -882,62 +848,13 @@ pub mod consts {
882848
pub mod bsd44 {
883849
}
884850
pub mod extra {
885-
use libc::types::os::arch::extra::{DWORD, BOOL};
886-
887-
pub static TRUE : BOOL = 1;
888-
pub static FALSE : BOOL = 0;
889-
890851
pub static O_TEXT : int = 16384;
891852
pub static O_BINARY : int = 32768;
892853
pub static O_NOINHERIT: int = 128;
893854

894855
pub static ERROR_SUCCESS : int = 0;
895856
pub static ERROR_INSUFFICIENT_BUFFER : int = 122;
896857
pub static INVALID_HANDLE_VALUE: int = -1;
897-
898-
pub static DELETE : DWORD = 0x00010000;
899-
pub static READ_CONTROL : DWORD = 0x00020000;
900-
pub static SYNCHRONIZE : DWORD = 0x00100000;
901-
pub static WRITE_DAC : DWORD = 0x00040000;
902-
pub static WRITE_OWNER : DWORD = 0x00080000;
903-
904-
pub static PROCESS_CREATE_PROCESS : DWORD = 0x0080;
905-
pub static PROCESS_CREATE_THREAD : DWORD = 0x0002;
906-
pub static PROCESS_DUP_HANDLE : DWORD = 0x0040;
907-
pub static PROCESS_QUERY_INFORMATION : DWORD = 0x0400;
908-
pub static PROCESS_QUERY_LIMITED_INFORMATION : DWORD = 0x1000;
909-
pub static PROCESS_SET_INFORMATION : DWORD = 0x0200;
910-
pub static PROCESS_SET_QUOTA : DWORD = 0x0100;
911-
pub static PROCESS_SUSPEND_RESUME : DWORD = 0x0800;
912-
pub static PROCESS_TERMINATE : DWORD = 0x0001;
913-
pub static PROCESS_VM_OPERATION : DWORD = 0x0008;
914-
pub static PROCESS_VM_READ : DWORD = 0x0010;
915-
pub static PROCESS_VM_WRITE : DWORD = 0x0020;
916-
917-
pub static STARTF_FORCEONFEEDBACK : DWORD = 0x00000040;
918-
pub static STARTF_FORCEOFFFEEDBACK : DWORD = 0x00000080;
919-
pub static STARTF_PREVENTPINNING : DWORD = 0x00002000;
920-
pub static STARTF_RUNFULLSCREEN : DWORD = 0x00000020;
921-
pub static STARTF_TITLEISAPPID : DWORD = 0x00001000;
922-
pub static STARTF_TITLEISLINKNAME : DWORD = 0x00000800;
923-
pub static STARTF_USECOUNTCHARS : DWORD = 0x00000008;
924-
pub static STARTF_USEFILLATTRIBUTE : DWORD = 0x00000010;
925-
pub static STARTF_USEHOTKEY : DWORD = 0x00000200;
926-
pub static STARTF_USEPOSITION : DWORD = 0x00000004;
927-
pub static STARTF_USESHOWWINDOW : DWORD = 0x00000001;
928-
pub static STARTF_USESIZE : DWORD = 0x00000002;
929-
pub static STARTF_USESTDHANDLES : DWORD = 0x00000100;
930-
931-
pub static WAIT_ABANDONED : DWORD = 0x00000080;
932-
pub static WAIT_OBJECT_0 : DWORD = 0x00000000;
933-
pub static WAIT_TIMEOUT : DWORD = 0x00000102;
934-
pub static WAIT_FAILED : DWORD = -1;
935-
936-
pub static DUPLICATE_CLOSE_SOURCE : DWORD = 0x00000001;
937-
pub static DUPLICATE_SAME_ACCESS : DWORD = 0x00000002;
938-
939-
pub static INFINITE : DWORD = -1;
940-
pub static STILL_ACTIVE : DWORD = 259;
941858
}
942859
}
943860

@@ -1834,24 +1751,12 @@ pub mod funcs {
18341751

18351752
unsafe fn sysctlnametomib(name: *c_char, mibp: *mut c_int,
18361753
sizep: *mut size_t) -> c_int;
1837-
1838-
unsafe fn getdtablesize() -> c_int;
18391754
}
18401755
}
18411756

18421757

18431758
#[cfg(target_os = "linux")]
18441759
#[cfg(target_os = "android")]
1845-
pub mod bsd44 {
1846-
use libc::types::os::arch::c95::{c_int};
1847-
1848-
#[abi = "cdecl"]
1849-
pub extern {
1850-
unsafe fn getdtablesize() -> c_int;
1851-
}
1852-
}
1853-
1854-
18551760
#[cfg(target_os = "win32")]
18561761
pub mod bsd44 {
18571762
}
@@ -1885,11 +1790,9 @@ pub mod funcs {
18851790
pub mod kernel32 {
18861791
use libc::types::os::arch::c95::{c_uint};
18871792
use libc::types::os::arch::extra::{BOOL, DWORD, HMODULE};
1888-
use libc::types::os::arch::extra::{LPCWSTR, LPWSTR, LPCTSTR,
1889-
LPTSTR, LPTCH, LPDWORD, LPVOID};
1890-
use libc::types::os::arch::extra::{LPSECURITY_ATTRIBUTES, LPSTARTUPINFO,
1891-
LPPROCESS_INFORMATION};
1892-
use libc::types::os::arch::extra::{HANDLE, LPHANDLE};
1793+
use libc::types::os::arch::extra::{LPCWSTR, LPWSTR, LPTCH};
1794+
use libc::types::os::arch::extra::{LPSECURITY_ATTRIBUTES};
1795+
use libc::types::os::arch::extra::{HANDLE};
18931796

18941797
#[abi = "stdcall"]
18951798
pub extern "stdcall" {
@@ -1926,45 +1829,19 @@ pub mod funcs {
19261829
findFileData: HANDLE)
19271830
-> BOOL;
19281831
unsafe fn FindClose(findFile: HANDLE) -> BOOL;
1929-
unsafe fn DuplicateHandle(hSourceProcessHandle: HANDLE,
1930-
hSourceHandle: HANDLE,
1931-
hTargetProcessHandle: HANDLE,
1932-
lpTargetHandle: LPHANDLE,
1933-
dwDesiredAccess: DWORD,
1934-
bInheritHandle: BOOL,
1935-
dwOptions: DWORD) -> BOOL;
19361832
unsafe fn CloseHandle(hObject: HANDLE) -> BOOL;
1937-
unsafe fn OpenProcess(dwDesiredAccess: DWORD,
1938-
bInheritHandle: BOOL,
1939-
dwProcessId: DWORD) -> HANDLE;
1940-
unsafe fn GetCurrentProcess() -> HANDLE;
1941-
unsafe fn CreateProcessA(lpApplicationName: LPCTSTR,
1942-
lpCommandLine: LPTSTR,
1943-
lpProcessAttributes: LPSECURITY_ATTRIBUTES,
1944-
lpThreadAttributes: LPSECURITY_ATTRIBUTES,
1945-
bInheritHandles: BOOL,
1946-
dwCreationFlags: DWORD,
1947-
lpEnvironment: LPVOID,
1948-
lpCurrentDirectory: LPCTSTR,
1949-
lpStartupInfo: LPSTARTUPINFO,
1950-
lpProcessInformation: LPPROCESS_INFORMATION) -> BOOL;
1951-
unsafe fn WaitForSingleObject(hHandle: HANDLE, dwMilliseconds: DWORD) -> DWORD;
19521833
unsafe fn TerminateProcess(hProcess: HANDLE, uExitCode: c_uint) -> BOOL;
1953-
unsafe fn GetExitCodeProcess(hProcess: HANDLE, lpExitCode: LPDWORD) -> BOOL;
19541834
}
19551835
}
19561836

19571837
pub mod msvcrt {
1958-
use libc::types::os::arch::c95::{c_int, c_long};
1838+
use libc::types::os::arch::c95::c_int;
19591839

19601840
#[abi = "cdecl"]
19611841
#[nolink]
19621842
pub extern {
19631843
#[link_name = "_commit"]
19641844
unsafe fn commit(fd: c_int) -> c_int;
1965-
1966-
#[link_name = "_get_osfhandle"]
1967-
unsafe fn get_osfhandle(fd: c_int) -> c_long;
19681845
}
19691846
}
19701847
}

branches/dist-snap/src/libcore/num/f32.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
//! Operations and constants for `f32`
1212
13-
use from_str;
1413
use num::{Zero, One, strconv};
1514
use prelude::*;
1615

@@ -798,7 +797,7 @@ pub fn from_str_radix(num: &str, rdx: uint) -> Option<f32> {
798797
strconv::ExpNone, false, false)
799798
}
800799
801-
impl from_str::FromStr for f32 {
800+
impl FromStr for f32 {
802801
#[inline(always)]
803802
fn from_str(val: &str) -> Option<f32> { from_str(val) }
804803
}

0 commit comments

Comments
 (0)