RFR: 8294293: Remove unused _width and _newlines field in outputStream [v2]
Johan Sjölen
jsjolen at openjdk.org
Mon Sep 26 08:44:44 UTC 2022
> 1. `_width` is unused so I deleted it
> 2. `_newlines` was used in one place, and only to check if any new lines had been seen. I removed `_newlines` and instead used `update_position`'s unused return value to indicate whether any newlines has been seen. This required expanding the call of `xmlTextStream::write` in `defaultStream`.
>
> This removes some cruft from `outputStream` and saves us 8 bytes on the size of `outputStream`.
>
> I also noted that `_position` isn't number of chars into a line, but rather a "visual position". It's a bit surprising, which is why I added this comment. This can be seen in the `\t` case in `update_position`.
Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
Remove include
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/10411/files
- new: https://git.openjdk.org/jdk/pull/10411/files/18847c61..11977a50
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=10411&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=10411&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/10411.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10411/head:pull/10411
PR: https://git.openjdk.org/jdk/pull/10411
More information about the hotspot-dev
mailing list