Skip to content

Conversation

@alexcrichton
Copy link
Member

This lifts various restrictions on the runtime, for example the character limit
when logging a message. Right now the old debug!-style macros still involve
allocating (because they use fmt! syntax), but the new debug2! macros don't
involve allocating at all (unless the formatter for a type requires allocation.

@alexcrichton
Copy link
Member Author

This will fail to bootstrap unless #9257 lands first.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loosely related to this change: these actually allocate a new buffer, would it be possible for begin_unwind_ to be passed Rust strings and uints rather than C ones?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be a nice change actually, it seems fairly nicely separable from this change, however, so I think I'd attempt to do it in a later commit.

@flaper87
Copy link
Contributor

bump, This may need to be rebased.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this become something like

let name = task.name.map(|s| s.as_slice()).unwrap_or("<unnamed>"); 
format_args!(|arg| { ... }, "...", name, msg, file, line);

This lifts various restrictions on the runtime, for example the character limit
when logging a message. Right now the old debug!-style macros still involve
allocating (because they use fmt! syntax), but the new debug2! macros don't
involve allocating at all (unless the formatter for a type requires allocation.
@alexcrichton
Copy link
Member Author

This is blocked on #9484

bors added a commit that referenced this pull request Sep 27, 2013
This lifts various restrictions on the runtime, for example the character limit
when logging a message. Right now the old debug!-style macros still involve
allocating (because they use fmt! syntax), but the new debug2! macros don't
involve allocating at all (unless the formatter for a type requires allocation.
@bors bors closed this Sep 27, 2013
@bors bors merged commit eb2b25d into rust-lang:master Sep 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants