Skip to content

Commit 114e155

Browse files
committed
---
yaml --- r: 89683 b: refs/heads/master c: e6dde28 h: refs/heads/master i: 89681: 1743f7a 89679: 0f7d408 v: v3
1 parent f7b5669 commit 114e155

File tree

165 files changed

+1320
-1976
lines changed

Some content is hidden

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

165 files changed

+1320
-1976
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: acbcb9ed2e24137040a4c0a4f87034e943036ecb
2+
refs/heads/master: e6dde28c95b66a46a0dc05bfc9a5586b64e08575
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/doc/po/ja/rust.md.po

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -678,13 +678,6 @@ msgid ""
678678
"and continues as any mixture hex digits and underscores."
679679
msgstr ""
680680

681-
#. type: Bullet: ' * '
682-
#: doc/rust.md:326
683-
msgid ""
684-
"An _octal literal_ starts with the character sequence `U+0030` `U+006F` (`0o`) "
685-
"and continues as any mixture octal digits and underscores."
686-
msgstr ""
687-
688681
#. type: Bullet: ' * '
689682
#: doc/rust.md:326
690683
msgid ""
@@ -747,7 +740,6 @@ msgid ""
747740
"123u; // type uint\n"
748741
"123_u; // type uint\n"
749742
"0xff_u8; // type u8\n"
750-
"0o70_i16; // type i16\n"
751743
"0b1111_1111_1001_0000_i32; // type i32\n"
752744
"~~~~\n"
753745
msgstr ""

trunk/doc/po/ja/tutorial.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ msgstr "## プリミティブ型とリテラル"
849849
msgid ""
850850
"There are general signed and unsigned integer types, `int` and `uint`, as "
851851
"well as 8-, 16-, 32-, and 64-bit variants, `i8`, `u16`, etc. Integers can "
852-
"be written in decimal (`144`), hexadecimal (`0x90`), octal (`0o70`), or binary "
852+
"be written in decimal (`144`), hexadecimal (`0x90`), or binary "
853853
"(`0b10010000`) base. Each integral type has a corresponding literal suffix "
854854
"that can be used to indicate the type of a literal: `i` for `int`, `u` for "
855855
"`uint`, `i8` for the `i8` type."

trunk/doc/po/rust.md.pot

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ msgstr ""
661661

662662
#. type: Plain text
663663
#: doc/rust.md:319
664-
msgid "An _integer literal_ has one of four forms:"
664+
msgid "An _integer literal_ has one of three forms:"
665665
msgstr ""
666666

667667
#. type: Bullet: ' * '
@@ -678,13 +678,6 @@ msgid ""
678678
"and continues as any mixture hex digits and underscores."
679679
msgstr ""
680680

681-
#. type: Bullet: ' * '
682-
#: doc/rust.md:326
683-
msgid ""
684-
"An _octal literal_ starts with the character sequence `U+0030` `U+006F` (`0o`) "
685-
"and continues as any mixture octal digits and underscores."
686-
msgstr ""
687-
688681
#. type: Bullet: ' * '
689682
#: doc/rust.md:326
690683
msgid ""
@@ -747,7 +740,6 @@ msgid ""
747740
"123u; // type uint\n"
748741
"123_u; // type uint\n"
749742
"0xff_u8; // type u8\n"
750-
"0o70_i16; // type i16\n"
751743
"0b1111_1111_1001_0000_i32; // type i32\n"
752744
"~~~~\n"
753745
msgstr ""

trunk/doc/po/tutorial.md.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ msgstr ""
646646
msgid ""
647647
"There are general signed and unsigned integer types, `int` and `uint`, as "
648648
"well as 8-, 16-, 32-, and 64-bit variants, `i8`, `u16`, etc. Integers can "
649-
"be written in decimal (`144`), hexadecimal (`0x90`), octal (`0o70`), or binary "
649+
"be written in decimal (`144`), hexadecimal (`0x90`), or binary "
650650
"(`0b10010000`) base. Each integral type has a corresponding literal suffix "
651651
"that can be used to indicate the type of a literal: `i` for `int`, `u` for "
652652
"`uint`, `i8` for the `i8` type."

trunk/doc/rust.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,14 +340,12 @@ as they are differentiated by suffixes.
340340

341341
##### Integer literals
342342

343-
An _integer literal_ has one of four forms:
343+
An _integer literal_ has one of three forms:
344344

345345
* A _decimal literal_ starts with a *decimal digit* and continues with any
346346
mixture of *decimal digits* and _underscores_.
347347
* A _hex literal_ starts with the character sequence `U+0030` `U+0078`
348348
(`0x`) and continues as any mixture hex digits and underscores.
349-
* An _octal literal_ starts with the character sequence `U+0030` `U+006F`
350-
(`0o`) and continues as any mixture octal digits and underscores.
351349
* A _binary literal_ starts with the character sequence `U+0030` `U+0062`
352350
(`0b`) and continues as any mixture binary digits and underscores.
353351

@@ -378,7 +376,6 @@ Examples of integer literals of various forms:
378376
123u; // type uint
379377
123_u; // type uint
380378
0xff_u8; // type u8
381-
0o70_i16; // type i16
382379
0b1111_1111_1001_0000_i32; // type i32
383380
~~~~
384381

trunk/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ fn is_four(x: int) -> bool {
305305

306306
There are general signed and unsigned integer types, `int` and `uint`,
307307
as well as 8-, 16-, 32-, and 64-bit variants, `i8`, `u16`, etc.
308-
Integers can be written in decimal (`144`), hexadecimal (`0x90`), octal (`0o70`), or
308+
Integers can be written in decimal (`144`), hexadecimal (`0x90`), or
309309
binary (`0b10010000`) base. Each integral type has a corresponding literal
310310
suffix that can be used to indicate the type of a literal: `i` for `int`,
311311
`u` for `uint`, `i8` for the `i8` type.

trunk/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ CFG_RUN_TARG_i686-unknown-linux-gnu=$(call CFG_RUN_i686-unknown-linux-gnu,,$(2))
195195

196196
# arm-apple-darwin configuration
197197
ifeq ($(CFG_OSTYPE),apple-darwin)
198-
CFG_IOS_SDK = $(shell xcrun --show-sdk-path -sdk iphoneos 2>/dev/null)
199-
CFG_IOS_FLAGS = -target arm-apple-darwin -isysroot $(CFG_IOS_SDK) -I$(CFG_IOS_SDK)/usr/include -I$(CFG_IOS_SDK)/usr/include/c++/4.2.1
198+
CFG_IOS_SDK = $(shell xcrun --show-sdk-path -sdk iphoneos)
199+
CFG_IOS_FLAGS = -target arm-apple-darwin -isysroot $(CFG_IOS_SDK) -I $(CFG_IOS_SDK)/usr/include -I $(CFG_IOS_SDK)/usr/include/c++/4.2.1 -I /usr/include
200200
CC_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang)
201201
CXX_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang++)
202202
CPP_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang++)

trunk/mk/rt.mk

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,6 @@ LIBUV_FLAGS_i386 = -m32 -fPIC -I$(S)src/etc/mingw-fix-include
2828
LIBUV_FLAGS_x86_64 = -m64 -fPIC
2929
ifeq ($(OSTYPE_$(1)), linux-androideabi)
3030
LIBUV_FLAGS_arm = -fPIC -DANDROID -std=gnu99
31-
else ifeq ($(OSTYPE_$(1)), apple-darwin)
32-
ifeq ($(HOST_$(1)), arm)
33-
IOS_SDK := $(shell xcrun --show-sdk-path -sdk iphoneos 2>/dev/null)
34-
LIBUV_FLAGS_arm := -fPIC -std=gnu99 -I$(IOS_SDK)/usr/include -I$(IOS_SDK)/usr/include/c++/4.2.1
35-
else
36-
LIBUV_FLAGS_arm := -fPIC -std=gnu99
37-
endif
3831
else
3932
LIBUV_FLAGS_arm = -fPIC -std=gnu99
4033
endif
@@ -91,6 +84,7 @@ endif
9184

9285
RUNTIME_CXXS_$(1)_$(2) := \
9386
rt/sync/lock_and_signal.cpp \
87+
rt/sync/rust_thread.cpp \
9488
rt/rust_builtin.cpp \
9589
rt/rust_upcall.cpp \
9690
rt/miniz.cpp \

trunk/src/compiletest/compiletest.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -220,19 +220,6 @@ pub fn mode_str(mode: mode) -> ~str {
220220
}
221221

222222
pub fn run_tests(config: &config) {
223-
if config.target == ~"arm-linux-androideabi" {
224-
match config.mode{
225-
mode_debug_info => {
226-
println("arm-linux-androideabi debug-info \
227-
test uses tcp 5039 port. please reserve it");
228-
//arm-linux-androideabi debug-info test uses remote debugger
229-
//so, we test 1 task at once
230-
os::setenv("RUST_TEST_TASKS","1");
231-
}
232-
_ =>{}
233-
}
234-
}
235-
236223
let opts = test_opts(config);
237224
let tests = make_tests(config);
238225
// sadly osx needs some file descriptor limits raised for running tests in

trunk/src/compiletest/errors.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ fn parse_expected(line_num: uint, line: ~str) -> ~[ExpectedError] {
5252
let start_kind = idx;
5353
while idx < len && line[idx] != (' ' as u8) { idx += 1u; }
5454

55+
// FIXME: #4318 Instead of to_ascii and to_str_ascii, could use
56+
// to_ascii_consume and to_str_consume to not do a unnecessary copy.
5557
let kind = line.slice(start_kind, idx);
56-
let kind = kind.to_ascii().to_lower().into_str();
58+
let kind = kind.to_ascii().to_lower().to_str_ascii();
5759

5860
// Extract msg:
5961
while idx < len && line[idx] == (' ' as u8) { idx += 1u; }

trunk/src/compiletest/procsrv.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -67,26 +67,3 @@ pub fn run(lib_path: &str,
6767
err: str::from_utf8(output.error)
6868
}
6969
}
70-
71-
pub fn run_background(lib_path: &str,
72-
prog: &str,
73-
args: &[~str],
74-
env: ~[(~str, ~str)],
75-
input: Option<~str>) -> run::Process {
76-
77-
let env = env + target_env(lib_path, prog);
78-
let mut process = run::Process::new(prog, args, run::ProcessOptions {
79-
env: Some(env),
80-
dir: None,
81-
in_fd: None,
82-
out_fd: None,
83-
err_fd: None
84-
});
85-
86-
for input in input.iter() {
87-
process.input().write(input.as_bytes());
88-
}
89-
90-
return process;
91-
}
92-

trunk/src/compiletest/runtest.rs

Lines changed: 22 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ use std::rt::io::File;
2626
use std::os;
2727
use std::str;
2828
use std::vec;
29-
use std::rt::io::net::tcp;
30-
use std::rt::io::net::ip::{Ipv4Addr, SocketAddr};
31-
use std::task;
32-
use std::rt::io::timer;
3329

3430
use extra::test::MetricMap;
3531

@@ -249,7 +245,6 @@ actual:\n\
249245
}
250246

251247
fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
252-
253248
// do not optimize debuginfo tests
254249
let mut config = match config.rustcflags {
255250
Some(ref flags) => config {
@@ -259,125 +254,39 @@ fn run_debuginfo_test(config: &config, props: &TestProps, testfile: &Path) {
259254
None => (*config).clone()
260255
};
261256
let config = &mut config;
257+
let cmds = props.debugger_cmds.connect("\n");
262258
let check_lines = &props.check_lines;
263-
let mut cmds = props.debugger_cmds.connect("\n");
264259

265260
// compile test file (it shoud have 'compile-flags:-g' in the header)
266261
let mut ProcRes = compile_test(config, props, testfile);
267262
if ProcRes.status != 0 {
268263
fatal_ProcRes(~"compilation failed!", &ProcRes);
269264
}
270265

266+
// write debugger script
267+
let script_str = [~"set charset UTF-8",
268+
cmds,
269+
~"quit\n"].connect("\n");
270+
debug!("script_str = {}", script_str);
271+
dump_output_file(config, testfile, script_str, "debugger.script");
272+
273+
// run debugger script with gdb
274+
#[cfg(windows)]
275+
fn debugger() -> ~str { ~"gdb.exe" }
276+
#[cfg(unix)]
277+
fn debugger() -> ~str { ~"gdb" }
278+
let debugger_script = make_out_name(config, testfile, "debugger.script");
271279
let exe_file = make_exe_name(config, testfile);
272-
273-
let mut ProcArgs;
274-
match config.target {
275-
~"arm-linux-androideabi" => {
276-
if (config.adb_device_status) {
277-
278-
cmds = cmds.replace("run","continue");
279-
280-
// write debugger script
281-
let script_str = [~"set charset UTF-8",
282-
format!("file {}",exe_file.as_str().unwrap().to_owned()),
283-
~"target remote :5039",
284-
cmds,
285-
~"quit"].connect("\n");
286-
debug!("script_str = {}", script_str);
287-
dump_output_file(config, testfile, script_str, "debugger.script");
288-
289-
290-
procsrv::run("", config.adb_path.clone(),
291-
[~"push", exe_file.as_str().unwrap().to_owned(), config.adb_test_dir.clone()],
292-
~[(~"",~"")], Some(~""));
293-
294-
procsrv::run("", config.adb_path,
295-
[~"forward", ~"tcp:5039", ~"tcp:5039"],
296-
~[(~"",~"")], Some(~""));
297-
298-
let adb_arg = format!("export LD_LIBRARY_PATH={}; gdbserver :5039 {}/{}",
299-
config.adb_test_dir.clone(), config.adb_test_dir.clone(),
300-
str::from_utf8(exe_file.filename().unwrap())).clone();
301-
302-
let mut process = procsrv::run_background("", config.adb_path.clone(),
303-
[~"shell",adb_arg.clone()],~[(~"",~"")], Some(~""));
304-
loop {
305-
//waiting 1 second for gdbserver start
306-
timer::sleep(1000);
307-
let result = do task::try {
308-
tcp::TcpStream::connect(
309-
SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 5039 });
310-
};
311-
if result.is_err() {
312-
continue;
313-
}
314-
break;
315-
}
316-
317-
let args = split_maybe_args(&config.rustcflags);
318-
let mut tool_path:~str = ~"";
319-
for arg in args.iter() {
320-
if arg.contains("--android-cross-path=") {
321-
tool_path = arg.replace("--android-cross-path=","");
322-
break;
323-
}
324-
}
325-
326-
if tool_path.equals(&~"") {
327-
fatal(~"cannot found android cross path");
328-
}
329-
330-
let debugger_script = make_out_name(config, testfile, "debugger.script");
331-
// FIXME (#9639): This needs to handle non-utf8 paths
332-
let debugger_opts = ~[~"-quiet", ~"-batch", ~"-nx",
333-
"-command=" + debugger_script.as_str().unwrap().to_owned()];
334-
335-
let procsrv::Result{ out, err, status }=
336-
procsrv::run("",
337-
tool_path.append("/bin/arm-linux-androideabi-gdb"),
338-
debugger_opts, ~[(~"",~"")], None);
339-
let cmdline = {
340-
let cmdline = make_cmdline("", "arm-linux-androideabi-gdb", debugger_opts);
341-
logv(config, format!("executing {}", cmdline));
342-
cmdline
343-
};
344-
345-
ProcRes = ProcRes {status: status,
346-
stdout: out,
347-
stderr: err,
348-
cmdline: cmdline};
349-
process.force_destroy();
350-
}
351-
}
352-
353-
_=> {
354-
// write debugger script
355-
let script_str = [~"set charset UTF-8",
356-
cmds,
357-
~"quit\n"].connect("\n");
358-
debug!("script_str = {}", script_str);
359-
dump_output_file(config, testfile, script_str, "debugger.script");
360-
361-
// run debugger script with gdb
362-
#[cfg(windows)]
363-
fn debugger() -> ~str { ~"gdb.exe" }
364-
#[cfg(unix)]
365-
fn debugger() -> ~str { ~"gdb" }
366-
367-
let debugger_script = make_out_name(config, testfile, "debugger.script");
368-
369-
// FIXME (#9639): This needs to handle non-utf8 paths
370-
let debugger_opts = ~[~"-quiet", ~"-batch", ~"-nx",
371-
"-command=" + debugger_script.as_str().unwrap().to_owned(),
372-
exe_file.as_str().unwrap().to_owned()];
373-
ProcArgs = ProcArgs {prog: debugger(), args: debugger_opts};
374-
ProcRes = compose_and_run(config, testfile, ProcArgs, ~[], "", None);
375-
}
376-
}
377-
280+
// FIXME (#9639): This needs to handle non-utf8 paths
281+
let debugger_opts = ~[~"-quiet", ~"-batch", ~"-nx",
282+
~"-command=" + debugger_script.as_str().unwrap().to_owned(),
283+
exe_file.as_str().unwrap().to_owned()];
284+
let ProcArgs = ProcArgs {prog: debugger(), args: debugger_opts};
285+
ProcRes = compose_and_run(config, testfile, ProcArgs, ~[], "", None);
378286
if ProcRes.status != 0 {
379287
fatal(~"gdb failed to execute");
380288
}
289+
381290
let num_check_lines = check_lines.len();
382291
if num_check_lines > 0 {
383292
// Allow check lines to leave parts unspecified (e.g., uninitialized
@@ -925,6 +834,7 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
925834
for tv in args.args.iter() {
926835
runargs.push(tv.to_owned());
927836
}
837+
928838
procsrv::run("", config.adb_path, runargs, ~[(~"",~"")], Some(~""));
929839

930840
// get exitcode of result

trunk/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,18 +224,13 @@
224224
[0-9a-fA-F]
225225
</define-regex>
226226

227-
<define-regex id="oct_digit" extended="true">
228-
[0-7]
229-
</define-regex>
230-
231227
<context id="number" style-ref="number">
232228
<match extended="true">
233229
((?&lt;=\.\.)|(?&lt;![\w\.]))
234230
(
235231
[1-9][0-9_]*\%{num_suffix}?|
236232
0[0-9_]*\%{num_suffix}?|
237233
0b[01_]+\%{int_suffix}?|
238-
0o(\%{oct_digit}|_)+\%{int_suffix}?|
239234
0x(\%{hex_digit}|_)+\%{int_suffix}?
240235
)
241236
((?![\w\.].)|(?=\.\.))

0 commit comments

Comments
 (0)