ENHANCED: much faster format/3 for text streams

This is now also used by format/2 to emit output on the terminal,
and significantly speeds up toplevel output of long strings.
This commit is contained in:
Markus Triska
2020-06-16 21:13:03 +02:00
parent d3563c30e7
commit 8958ea036e
3 changed files with 66 additions and 63 deletions

View File

@@ -229,8 +229,8 @@ pub enum SystemClauseType {
PeekCode,
PointsToContinuationResetMarker,
PutByte,
PutBytes,
PutChar,
PutChars,
PutCode,
REPL(REPLCodePtr),
ReadQueryTerm,
@@ -419,12 +419,12 @@ impl SystemClauseType {
&SystemClauseType::PutByte => {
clause_name!("$put_byte")
}
&SystemClauseType::PutBytes => {
clause_name!("$put_bytes")
}
&SystemClauseType::PutChar => {
clause_name!("$put_char")
}
&SystemClauseType::PutChars => {
clause_name!("$put_chars")
}
&SystemClauseType::PutCode => {
clause_name!("$put_code")
}
@@ -560,12 +560,12 @@ impl SystemClauseType {
("$put_byte", 2) => {
Some(SystemClauseType::PutByte)
}
("$put_bytes", 2) => {
Some(SystemClauseType::PutBytes)
}
("$put_char", 2) => {
Some(SystemClauseType::PutChar)
}
("$put_chars", 2) => {
Some(SystemClauseType::PutChars)
}
("$put_code", 2) => {
Some(SystemClauseType::PutCode)
}