mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
6892658: C2 should optimize some stringbuilder patterns
Reviewed-by: kvn, twisti
This commit is contained in:
parent
63cc2211ed
commit
9db2092b1b
35 changed files with 2245 additions and 115 deletions
|
@ -221,6 +221,14 @@ void Parse::do_new() {
|
|||
|
||||
// Push resultant oop onto stack
|
||||
push(obj);
|
||||
|
||||
// Keep track of whether opportunities exist for StringBuilder
|
||||
// optimizations.
|
||||
if (OptimizeStringConcat &&
|
||||
(klass == C->env()->StringBuilder_klass() ||
|
||||
klass == C->env()->StringBuffer_klass())) {
|
||||
C->set_has_stringbuilder(true);
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue