Skip to content

Commit e6906b7

Browse files
committed
---
yaml --- r: 140536 b: refs/heads/try2 c: 3a34e93 h: refs/heads/master v: v3
1 parent c547550 commit e6906b7

31 files changed

+840
-232
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: 930908aa90af3635af3744b08bf2aaaee4e3b381
8+
refs/heads/try2: 3a34e93651cb84536a23f9cdb6290bdee6446264
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/install.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ ifeq ($(CFG_ADB_DEVICE_STATUS),true)
192192
ifdef VERBOSE
193193
ADB = adb $(1)
194194
ADB_PUSH = adb push $(1) $(2)
195-
ADB_SHELL = adb shell $(1) $(2)
195+
ADB_SHELL = adb shell $(1) $(2)
196196
else
197-
ADB = $(Q)$(call E, adb $(1)) && adb $(1) 1>/dev/null
197+
ADB = $(Q)$(call E, adb $(1)) && adb $(1) 1>/dev/null
198198
ADB_PUSH = $(Q)$(call E, adb push $(1)) && adb push $(1) $(2) 1>/dev/null
199199
ADB_SHELL = $(Q)$(call E, adb shell $(1) $(2)) && adb shell $(1) $(2) 1>/dev/null
200200
endif
@@ -222,8 +222,8 @@ install-runtime-target: \
222222
install-runtime-target-arm-linux-androideabi-cleanup \
223223
install-runtime-target-arm-linux-androideabi-host-$(CFG_BUILD_TRIPLE)
224224
else
225-
install-runtime-target:
225+
install-runtime-target:
226226
@echo "No device to install runtime library"
227-
@echo
227+
@echo
228228
endif
229229
endif

branches/try2/mk/tests.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ endef
9292
$(foreach target,$(CFG_TARGET_TRIPLES), \
9393
$(eval $(call DEF_TARGET_COMMANDS,$(target))))
9494

95-
# Target platform specific variables
95+
# Target platform specific variables
9696
# for arm-linux-androidabi
9797
define DEF_ADB_DEVICE_STATUS
9898
CFG_ADB_DEVICE_STATUS=$(1)
@@ -402,7 +402,7 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
402402
$(eval $(call DEF_TEST_CRATE_RULES_null,$(stage),$(target),$(host),$(crate))) \
403403
), \
404404
$(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))) \
405-
))))))
405+
))))))
406406

407407

408408
######################################################################

branches/try2/src/libcore/cell.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ A dynamic, mutable location.
1919
Similar to a mutable option type, but friendlier.
2020
*/
2121

22+
#[mutable]
2223
pub struct Cell<T> {
2324
priv value: Option<T>
2425
}

branches/try2/src/libcore/char.rs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use option::{None, Option, Some};
1616
use str;
1717
use u32;
1818
use uint;
19-
use unicode;
19+
use unicode::{derived_property, general_category};
2020

2121
#[cfg(notest)] use cmp::Eq;
2222

@@ -53,18 +53,17 @@ use unicode;
5353
Cn Unassigned a reserved unassigned code point or a noncharacter
5454
*/
5555

56-
pub use is_alphabetic = unicode::derived_property::Alphabetic;
57-
pub use is_XID_start = unicode::derived_property::XID_Start;
58-
pub use is_XID_continue = unicode::derived_property::XID_Continue;
59-
56+
pub fn is_alphabetic(c: char) -> bool { derived_property::Alphabetic(c) }
57+
pub fn is_XID_start(c: char) -> bool { derived_property::XID_Start(c) }
58+
pub fn is_XID_continue(c: char) -> bool { derived_property::XID_Continue(c) }
6059

6160
/**
6261
* Indicates whether a character is in lower case, defined
6362
* in terms of the Unicode General Category 'Ll'
6463
*/
6564
#[inline(always)]
6665
pub fn is_lowercase(c: char) -> bool {
67-
return unicode::general_category::Ll(c);
66+
return general_category::Ll(c);
6867
}
6968

7069
/**
@@ -73,7 +72,7 @@ pub fn is_lowercase(c: char) -> bool {
7372
*/
7473
#[inline(always)]
7574
pub fn is_uppercase(c: char) -> bool {
76-
return unicode::general_category::Lu(c);
75+
return general_category::Lu(c);
7776
}
7877

7978
/**
@@ -84,9 +83,9 @@ pub fn is_uppercase(c: char) -> bool {
8483
#[inline(always)]
8584
pub fn is_whitespace(c: char) -> bool {
8685
return ('\x09' <= c && c <= '\x0d')
87-
|| unicode::general_category::Zs(c)
88-
|| unicode::general_category::Zl(c)
89-
|| unicode::general_category::Zp(c);
86+
|| general_category::Zs(c)
87+
|| general_category::Zl(c)
88+
|| general_category::Zp(c);
9089
}
9190

9291
/**
@@ -96,18 +95,18 @@ pub fn is_whitespace(c: char) -> bool {
9695
*/
9796
#[inline(always)]
9897
pub fn is_alphanumeric(c: char) -> bool {
99-
return unicode::derived_property::Alphabetic(c) ||
100-
unicode::general_category::Nd(c) ||
101-
unicode::general_category::Nl(c) ||
102-
unicode::general_category::No(c);
98+
return derived_property::Alphabetic(c) ||
99+
general_category::Nd(c) ||
100+
general_category::Nl(c) ||
101+
general_category::No(c);
103102
}
104103

105104
/// Indicates whether the character is numeric (Nd, Nl, or No)
106105
#[inline(always)]
107106
pub fn is_digit(c: char) -> bool {
108-
return unicode::general_category::Nd(c) ||
109-
unicode::general_category::Nl(c) ||
110-
unicode::general_category::No(c);
107+
return general_category::Nd(c) ||
108+
general_category::Nl(c) ||
109+
general_category::No(c);
111110
}
112111

113112
/**

branches/try2/src/libcore/container.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ pub trait Map<K, V>: Mutable {
5555
/// Remove a key-value pair from the map. Return true if the key
5656
/// was present in the map, otherwise false.
5757
fn remove(&mut self, key: &K) -> bool;
58+
59+
/// Insert a key-value pair from the map. If the key already had a value
60+
/// present in the map, that value is returned. Otherwise None is returned.
61+
fn swap(&mut self, k: K, v: V) -> Option<V>;
62+
63+
/// Removes a key from the map, returning the value at the key if the key
64+
/// was previously in the map.
65+
fn pop(&mut self, k: &K) -> Option<V>;
5866
}
5967

6068
pub trait Set<T>: Mutable {

branches/try2/src/libcore/core.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@ pub mod unstable;
244244

245245
/* For internal use, not exported */
246246

247-
pub mod unicode;
247+
mod unicode;
248248
#[path = "num/cmath.rs"]
249-
pub mod cmath;
250-
pub mod stackwalk;
249+
mod cmath;
250+
mod stackwalk;
251251
#[path = "rt/mod.rs"]
252-
pub mod rt;
252+
mod rt;
253253

254254
// A curious inner-module that's not exported that contains the binding
255255
// 'core' so that macro-expanded references to core::error and such

branches/try2/src/libcore/gc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use libc::{size_t, uintptr_t};
4444
use option::{None, Option, Some};
4545
use ptr;
4646
use hashmap::HashSet;
47-
use stackwalk;
47+
use stackwalk::walk_stack;
4848
use sys;
4949

5050
pub use stackwalk::Word;
@@ -230,7 +230,7 @@ unsafe fn walk_gc_roots(mem: Memory, sentinel: **Word, visitor: Visitor) {
230230
// frame is marked by a sentinel, which is a box pointer stored on
231231
// the stack.
232232
let mut reached_sentinel = ptr::is_null(sentinel);
233-
for stackwalk::walk_stack |frame| {
233+
for walk_stack |frame| {
234234
let pc = last_ret;
235235
let Segment {segment: next_segment, boundary: boundary} =
236236
find_segment_for_frame(frame.fp, segment);

0 commit comments

Comments
 (0)