Skip to content

Commit 1fefb9a

Browse files
committed
---
yaml --- r: 137663 b: refs/heads/auto c: 1c6fd76 h: refs/heads/master i: 137661: 8c8cba0 137659: 0f1861c 137655: 382fd8c 137647: e256337 137631: e98999b 137599: 1aa336c v: v3
1 parent c898b79 commit 1fefb9a

Some content is hidden

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

46 files changed

+198
-549
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 1b46b007d7d1acbbfb59c7e0f1307e6a378ab584
16+
refs/heads/auto: 1c6fd76f8073a420a82d85c45ea1697fb94d214b
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/configure

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,17 +535,13 @@ probe CFG_LLDB lldb
535535

536536
if [ ! -z "$CFG_GDB" ]
537537
then
538-
# Store GDB's version
538+
# Extract the version
539539
CFG_GDB_VERSION=$($CFG_GDB --version 2>/dev/null | head -1)
540540
putvar CFG_GDB_VERSION
541541
fi
542542

543543
if [ ! -z "$CFG_LLDB" ]
544544
then
545-
# Store LLDB's version
546-
CFG_LLDB_VERSION=$($CFG_LLDB --version 2>/dev/null | head -1)
547-
putvar CFG_LLDB_VERSION
548-
549545
# If CFG_LLDB_PYTHON_DIR is not already set from the outside and valid, try to read it from
550546
# LLDB via the -P commandline options.
551547
if [ -z "$CFG_LLDB_PYTHON_DIR" ] || [ ! -d "$CFG_LLDB_PYTHON_DIR" ]

branches/auto/mk/tests.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
625625
--target $(2) \
626626
--host $(3) \
627627
--gdb-version="$(CFG_GDB_VERSION)" \
628-
--lldb-version="$(CFG_LLDB_VERSION)" \
629628
--android-cross-path=$(CFG_ANDROID_CROSS_PATH) \
630629
--adb-path=$(CFG_ADB) \
631630
--adb-test-dir=$(CFG_ADB_TEST_DIR) \

branches/auto/src/compiletest/common.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ pub struct Config {
133133
// Version of GDB
134134
pub gdb_version: Option<String>,
135135

136-
// Version of LLDB
137-
pub lldb_version: Option<String>,
138-
139136
// Path to the android tools
140137
pub android_cross_path: Path,
141138

branches/auto/src/compiletest/compiletest.rs

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
7171
optflag("", "jit", "run tests under the JIT"),
7272
optopt("", "target", "the target to build for", "TARGET"),
7373
optopt("", "host", "the host to build for", "HOST"),
74-
optopt("", "gdb-version", "the version of GDB used", "VERSION STRING"),
75-
optopt("", "lldb-version", "the version of LLDB used", "VERSION STRING"),
74+
optopt("", "gdb-version", "the version of GDB used", "MAJOR.MINOR"),
7675
optopt("", "android-cross-path", "Android NDK standalone path", "PATH"),
7776
optopt("", "adb-path", "path to the android debugger", "PATH"),
7877
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
@@ -150,7 +149,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
150149
target: opt_str2(matches.opt_str("target")),
151150
host: opt_str2(matches.opt_str("host")),
152151
gdb_version: extract_gdb_version(matches.opt_str("gdb-version")),
153-
lldb_version: extract_lldb_version(matches.opt_str("lldb-version")),
154152
android_cross_path: opt_path(matches, "android-cross-path"),
155153
adb_path: opt_str2(matches.opt_str("adb-path")),
156154
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")),
@@ -393,37 +391,3 @@ fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
393391
_ => None
394392
}
395393
}
396-
397-
fn extract_lldb_version(full_version_line: Option<String>) -> Option<String> {
398-
// Extract the major LLDB version from the given version string.
399-
// LLDB version strings are different for Apple and non-Apple platforms.
400-
// At the moment, this function only supports the Apple variant, which looks
401-
// like this:
402-
//
403-
// LLDB-179.5 (older versions)
404-
// lldb-300.2.51 (new versions)
405-
//
406-
// We are only interested in the major version number, so this function
407-
// will return `Some("179")` and `Some("300")` respectively.
408-
409-
match full_version_line {
410-
Some(ref full_version_line)
411-
if full_version_line.as_slice().trim().len() > 0 => {
412-
let full_version_line = full_version_line.as_slice().trim();
413-
414-
let re = Regex::new(r"[Ll][Ll][Dd][Bb]-([0-9]+)").unwrap();
415-
416-
match re.captures(full_version_line) {
417-
Some(captures) => {
418-
Some(captures.at(1).to_string())
419-
}
420-
None => {
421-
println!("Could not extract LLDB version from line '{}'",
422-
full_version_line);
423-
None
424-
}
425-
}
426-
},
427-
_ => None
428-
}
429-
}

branches/auto/src/compiletest/header.rs

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -181,42 +181,14 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
181181
}
182182
}
183183

184-
fn ignore_lldb(config: &Config, line: &str) -> bool {
185-
if config.mode != common::DebugInfoLldb {
186-
return false;
187-
}
188-
189-
if parse_name_directive(line, "ignore-lldb") {
190-
return true;
191-
}
192-
193-
match config.lldb_version {
194-
Some(ref actual_version) => {
195-
if line.contains("min-lldb-version") {
196-
let min_version = line.trim()
197-
.split(' ')
198-
.last()
199-
.expect("Malformed lldb version directive");
200-
// Ignore if actual version is smaller the minimum required
201-
// version
202-
lldb_version_to_int(actual_version.as_slice()) <
203-
lldb_version_to_int(min_version.as_slice())
204-
} else {
205-
false
206-
}
207-
}
208-
None => false
209-
}
210-
}
211-
212184
let val = iter_header(testfile, |ln| {
213185
!parse_name_directive(ln, "ignore-test") &&
214186
!parse_name_directive(ln, ignore_target(config).as_slice()) &&
215187
!parse_name_directive(ln, ignore_stage(config).as_slice()) &&
216188
!(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) &&
217189
!(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&
218190
!ignore_gdb(config, ln) &&
219-
!ignore_lldb(config, ln)
191+
!(config.mode == common::DebugInfoLldb && parse_name_directive(ln, "ignore-lldb"))
220192
});
221193

222194
!val
@@ -358,12 +330,3 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
358330

359331
return major * 1000 + minor;
360332
}
361-
362-
pub fn lldb_version_to_int(version_string: &str) -> int {
363-
let error_string = format!(
364-
"Encountered LLDB version string with unexpected format: {}",
365-
version_string);
366-
let error_string = error_string.as_slice();
367-
let major: int = FromStr::from_str(version_string).expect(error_string);
368-
return major;
369-
}

branches/auto/src/compiletest/runtest.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -626,17 +626,6 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
626626

627627
let exe_file = make_exe_name(config, testfile);
628628

629-
match config.lldb_version {
630-
Some(ref version) => {
631-
println!("NOTE: compiletest thinks it is using LLDB version {}",
632-
version.as_slice());
633-
}
634-
_ => {
635-
println!("NOTE: compiletest does not know which version of \
636-
LLDB it is using");
637-
}
638-
}
639-
640629
// Parse debugger commands etc from test files
641630
let DebuggerCommands {
642631
commands,

branches/auto/src/doc/guide-macros.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ forbidden.
8787

8888
Otherwise, the invocation syntax is free-form.
8989

90-
To take a fragment of Rust code as an argument, write `$` followed by a name
90+
To take as an argument a fragment of Rust code, write `$` followed by a name
9191
(for use on the right-hand side), followed by a `:`, followed by a *fragment
9292
specifier*. The fragment specifier denotes the sort of fragment to match. The
9393
most common fragment specifiers are:

branches/auto/src/doc/guide.md

Lines changed: 55 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5212,8 +5212,8 @@ We can check this out using a special flag to `rustc`. This code, in a file
52125212

52135213
```{rust}
52145214
fn main() {
5215-
let x = 5i;
5216-
println!("x is: {}", x);
5215+
let x = "Hello";
5216+
println!("x is: {:s}", x);
52175217
}
52185218
```
52195219

@@ -5225,19 +5225,32 @@ give us this huge result:
52255225
#![no_std]
52265226
#![feature(globs)]
52275227
#[phase(plugin, link)]
5228-
extern crate "std" as std;
5229-
extern crate "native" as rt;
5230-
#[prelude_import]
5228+
extern crate std = "std";
5229+
extern crate rt = "native";
52315230
use std::prelude::*;
52325231
fn main() {
5233-
let x = 5i;
5232+
let x = "Hello";
52345233
match (&x,) {
52355234
(__arg0,) => {
52365235
#[inline]
52375236
#[allow(dead_code)]
5238-
static __STATIC_FMTSTR: [&'static str, ..1u] = ["x is: "];
5237+
static __STATIC_FMTSTR: [::std::fmt::rt::Piece<'static>, ..2u] =
5238+
[::std::fmt::rt::String("x is: "),
5239+
::std::fmt::rt::Argument(::std::fmt::rt::Argument{position:
5240+
::std::fmt::rt::ArgumentNext,
5241+
format:
5242+
::std::fmt::rt::FormatSpec{fill:
5243+
' ',
5244+
align:
5245+
::std::fmt::rt::AlignUnknown,
5246+
flags:
5247+
0u,
5248+
precision:
5249+
::std::fmt::rt::CountImplied,
5250+
width:
5251+
::std::fmt::rt::CountImplied,},})];
52395252
let __args_vec =
5240-
&[::std::fmt::argument(::std::fmt::secret_show, __arg0)];
5253+
&[::std::fmt::argument(::std::fmt::secret_string, __arg0)];
52415254
let __args =
52425255
unsafe {
52435256
::std::fmt::Arguments::new(__STATIC_FMTSTR, __args_vec)
@@ -5248,16 +5261,45 @@ fn main() {
52485261
}
52495262
```
52505263

5264+
Intense. Here's a trimmed down version that's a bit easier to read:
5265+
5266+
```{rust,ignore}
5267+
fn main() {
5268+
let x = 5i;
5269+
match (&x,) {
5270+
(__arg0,) => {
5271+
static __STATIC_FMTSTR: =
5272+
[String("x is: "),
5273+
Argument(Argument {
5274+
position: ArgumentNext,
5275+
format: FormatSpec {
5276+
fill: ' ',
5277+
align: AlignUnknown,
5278+
flags: 0u,
5279+
precision: CountImplied,
5280+
width: CountImplied,
5281+
},
5282+
},
5283+
];
5284+
let __args_vec = &[argument(secret_string, __arg0)];
5285+
let __args = unsafe { Arguments::new(__STATIC_FMTSTR, __args_vec) };
5286+
5287+
println_args(&__args)
5288+
}
5289+
};
5290+
}
5291+
```
5292+
52515293
Whew! This isn't too terrible. You can see that we still `let x = 5i`,
52525294
but then things get a little bit hairy. Three more bindings get set: a
52535295
static format string, an argument vector, and the arguments. We then
52545296
invoke the `println_args` function with the generated arguments.
52555297

5256-
This is the code that Rust actually compiles. You can see all of the extra
5257-
information that's here. We get all of the type safety and options that it
5258-
provides, but at compile time, and without needing to type all of this out.
5259-
This is how macros are powerful. Without them, you would need to type all of
5260-
this by hand to get a type checked `println`.
5298+
This is the code (well, the full version) that Rust actually compiles. You can
5299+
see all of the extra information that's here. We get all of the type safety and
5300+
options that it provides, but at compile time, and without needing to type all
5301+
of this out. This is how macros are powerful. Without them, you would need to
5302+
type all of this by hand to get a type checked `println`.
52615303

52625304
For more on macros, please consult [the Macros Guide](guide-macros.html).
52635305
Macros are a very advanced and still slightly experimental feature, but don't

branches/auto/src/doc/reference.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,6 @@ grammar as double-quoted strings. Other tokens have exact rules given.
187187

188188
The keywords are the following strings, organized by first letter:
189189

190-
<div id="keywords">
191-
| | | | |
192190
|----------|--------|--------|-------|
193191
| as | | | |
194192
|----------|--------|--------|-------|
@@ -218,7 +216,6 @@ The keywords are the following strings, organized by first letter:
218216
|----------|--------|--------|-------|
219217
| while | | | |
220218
|----------|--------|--------|-------|
221-
</div>
222219

223220
Each of these keywords has special meaning in its grammar, and all of them are
224221
excluded from the `ident` rule.
@@ -1897,7 +1894,7 @@ type int8_t = i8;
18971894
18981895
### Crate-only attributes
18991896

1900-
- `crate_name` - specify the this crate's crate name.
1897+
- `crate_id` - specify the this crate's crate ID.
19011898
- `crate_type` - see [linkage](#linkage).
19021899
- `feature` - see [compiler features](#compiler-features).
19031900
- `no_builtins` - disable optimizing certain code patterns to invocations of
@@ -1927,8 +1924,6 @@ type int8_t = i8;
19271924
- `start` - indicates that this function should be used as the entry point,
19281925
overriding the "start" language item. See the "start" [language
19291926
item](#language-items) for more details.
1930-
- `test` - indicates that this function is a test function, to only be compiled
1931-
in case of `--test`.
19321927

19331928
### Static-only attributes
19341929

branches/auto/src/doc/rust.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,5 +392,3 @@ pre.rust { position: relative; }
392392
background-color: #fff !important;
393393
}
394394
}
395-
396-
#keywords table td { border: none; }

branches/auto/src/etc/gdb_rust_pretty_printing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def classify_struct(type):
196196
if field_count == 0:
197197
return STRUCT_KIND_REGULAR_STRUCT
198198

199-
if fields[0].name == "RUST$ENUM$DISR":
199+
if fields[0].artificial:
200200
if field_count == 1:
201201
return STRUCT_KIND_CSTYLE_VARIANT
202202
elif fields[1].name == None:

branches/auto/src/etc/lldb_rust_formatters.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,11 @@ def print_enum_val(val, internal_dict):
117117

118118
assert val.GetType().GetTypeClass() == lldb.eTypeClassUnion
119119

120-
121120
if val.num_children == 1:
122-
# This is either an enum with just one variant, or it is an Option-like enum
123-
# where the discriminant is encoded in a non-nullable pointer field. We find
124-
# out which one it is by looking at the member name of the sole union
125-
# variant. If it starts with "RUST$ENCODED$ENUM$" then we have an
126-
# Option-like enum.
127121
first_variant_name = val.GetChildAtIndex(0).GetName()
128122
if first_variant_name and first_variant_name.startswith("RUST$ENCODED$ENUM$"):
123+
# Try to extract the
129124

130-
# This is an Option-like enum. The position of the discriminator field is
131-
# encoded in the name which has the format:
132-
# RUST$ENCODED$ENUM$<index of discriminator field>$<name of null variant>
133125
last_separator_index = first_variant_name.rfind("$")
134126
if last_separator_index == -1:
135127
return "<invalid enum encoding: %s>" % first_variant_name
@@ -138,30 +130,25 @@ def print_enum_val(val, internal_dict):
138130
if second_last_separator_index == -1:
139131
return "<invalid enum encoding: %s>" % first_variant_name
140132

141-
# Extract index of the discriminator field
142133
try:
143134
disr_field_index = first_variant_name[second_last_separator_index + 1 :
144135
last_separator_index]
145136
disr_field_index = int(disr_field_index)
146137
except:
147138
return "<invalid enum encoding: %s>" % first_variant_name
148139

149-
# Read the discriminant
150140
disr_val = val.GetChildAtIndex(0).GetChildAtIndex(disr_field_index).GetValueAsUnsigned()
151141

152142
if disr_val == 0:
153-
# Null case: Print the name of the null-variant
154143
null_variant_name = first_variant_name[last_separator_index + 1:]
155144
return null_variant_name
156145
else:
157-
# Non-null case: Interpret the data as a value of the non-null variant type
158146
return print_struct_val_starting_from(0, val.GetChildAtIndex(0), internal_dict)
159147
else:
160-
# This is just a regular uni-variant enum without discriminator field
161148
return print_struct_val_starting_from(0, val.GetChildAtIndex(0), internal_dict)
162149

163-
# If we are here, this is a regular enum with more than one variant
164-
disr_val = val.GetChildAtIndex(0).GetChildMemberWithName("RUST$ENUM$DISR")
150+
# extract the discriminator value by
151+
disr_val = val.GetChildAtIndex(0).GetChildAtIndex(0)
165152
disr_type = disr_val.GetType()
166153

167154
if disr_type.GetTypeClass() != lldb.eTypeClassEnumeration:

branches/auto/src/etc/vim/syntax/rust.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ syn match rustMacroRepeatCount ".\?[*+]" contained
5454
syn match rustMacroVariable "$\w\+"
5555

5656
" Reserved (but not yet used) keywords {{{2
57-
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield abstract final override
57+
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield
5858

5959
" Built-in types {{{2
6060
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32

0 commit comments

Comments
 (0)