Integrated: 8293251: Use stringStream::base() instead of as_string() when applicable

Johan Sjölen jsjolen at openjdk.org
Fri Sep 16 19:57:51 UTC 2022


On Fri, 2 Sep 2022 11:20:59 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:

> Hi!
> 
> Please review this PR swapping out stringStream::as_string() with ::base() when applicable. With this change we avoid allocating a resource managed string copy. I also attempt to document the base function, as it is not safe to use any result returned from it if you subsequently call the stringStream's methods.
> 
> When I've left ResourceMarks in place I've also commented which calls requires them.
> 
> This passes tier1, tier2 tests.

This pull request has now been integrated.

Changeset: 4b8399b5
Author:    Johan Sjölen <jsjolen at openjdk.org>
Committer: Thomas Stuefe <stuefe at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/4b8399b5f0b4dec2fa9452019cc9292bc6b57738
Stats:     76 lines in 27 files changed: 13 ins; 7 del; 56 mod

8293251: Use stringStream::base() instead of as_string() when applicable

Reviewed-by: rehn

-------------

PR: https://git.openjdk.org/jdk/pull/10142


More information about the shenandoah-dev mailing list