Skip to content

Commit ff10057

Browse files
committed
---
yaml --- r: 146062 b: refs/heads/try2 c: df6225b h: refs/heads/master v: v3
1 parent 7645918 commit ff10057

File tree

4 files changed

+26
-14
lines changed

4 files changed

+26
-14
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: cd59a7c464811e164f3a1c87d8fa31fdaa5fbafa
8+
refs/heads/try2: df6225b8c3c981a686e5590dc59a7a5865476862
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/back/link.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ pub mod write {
297297
if !sess.no_prepopulate_passes() {
298298
llvm::LLVMRustAddAnalysisPasses(tm, fpm, llmod);
299299
llvm::LLVMRustAddAnalysisPasses(tm, mpm, llmod);
300-
populate_llvm_passes(fpm, mpm, llmod, OptLevel);
300+
populate_llvm_passess(fpm, mpm, llmod, OptLevel);
301301
}
302302

303303
for pass in sess.opts.custom_passes.iter() {
@@ -422,10 +422,10 @@ pub mod write {
422422
}
423423
}
424424

425-
unsafe fn populate_llvm_passes(fpm: lib::llvm::PassManagerRef,
426-
mpm: lib::llvm::PassManagerRef,
427-
llmod: ModuleRef,
428-
opt: lib::llvm::CodeGenOptLevel) {
425+
unsafe fn populate_llvm_passess(fpm: lib::llvm::PassManagerRef,
426+
mpm: lib::llvm::PassManagerRef,
427+
llmod: ModuleRef,
428+
opt: lib::llvm::CodeGenOptLevel) {
429429
// Create the PassManagerBuilder for LLVM. We configure it with
430430
// reasonable defaults and prepare it to actually populate the pass
431431
// manager.

branches/try2/src/libstd/rt/io/stdio.rs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use fmt;
1112
use libc;
1213
use option::{Option, Some, None};
1314
use result::{Ok, Err};
@@ -56,7 +57,9 @@ pub fn stderr() -> StdWriter {
5657
pub fn print(s: &str) {
5758
// XXX: need to see if not caching stdin() is the cause of performance
5859
// issues, it should be possible to cache a stdout handle in each Task
59-
// and then re-use that across calls to print/println
60+
// and then re-use that across calls to print/println. Note that the
61+
// resolution of this comment will affect all of the prints below as
62+
// well.
6063
stdout().write(s.as_bytes());
6164
}
6265

@@ -68,6 +71,20 @@ pub fn println(s: &str) {
6871
out.write(['\n' as u8]);
6972
}
7073

74+
/// Similar to `print`, but takes a `fmt::Arguments` structure to be compatible
75+
/// with the `format_args!` macro.
76+
pub fn print_args(fmt: &fmt::Arguments) {
77+
let mut out = stdout();
78+
fmt::write(&mut out as &mut Writer, fmt);
79+
}
80+
81+
/// Similar to `println`, but takes a `fmt::Arguments` structure to be
82+
/// compatible with the `format_args!` macro.
83+
pub fn println_args(fmt: &fmt::Arguments) {
84+
let mut out = stdout();
85+
fmt::writeln(&mut out as &mut Writer, fmt);
86+
}
87+
7188
/// Representation of a reader of a standard input stream
7289
pub struct StdReader {
7390
priv inner: ~RtioFileStream

branches/try2/src/libsyntax/ext/expand.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -999,16 +999,11 @@ pub fn std_macros() -> @str {
999999
macro_rules! writeln(($dst:expr, $($arg:tt)*) => (
10001000
format_args!(|args| { ::std::fmt::writeln($dst, args) }, $($arg)*)
10011001
))
1002-
// FIXME(#6846) once stdio is redesigned, this shouldn't perform an
1003-
// allocation but should rather delegate to an invocation of
1004-
// write! instead of format!
10051002
macro_rules! print (
1006-
($($arg:tt)*) => (::std::io::print(format!($($arg)*)))
1003+
($($arg:tt)*) => (format_args!(::std::rt::io::stdio::print_args, $($arg)*))
10071004
)
1008-
// FIXME(#6846) once stdio is redesigned, this shouldn't perform an
1009-
// allocation but should rather delegate to an io::Writer
10101005
macro_rules! println (
1011-
($($arg:tt)*) => (::std::io::println(format!($($arg)*)))
1006+
($($arg:tt)*) => (format_args!(::std::rt::io::stdio::println_args, $($arg)*))
10121007
)
10131008

10141009
macro_rules! local_data_key (

0 commit comments

Comments
 (0)