5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "incls/_precompiled.incl" 26 #include "incls/_stringopts.cpp.incl" 27 28 #define __ kit. 29 30 class StringConcat : public ResourceObj { 31 private: 32 PhaseStringOpts* _stringopts; 33 Node* _string_alloc; 34 AllocateNode* _begin; // The allocation the begins the pattern 35 CallStaticJavaNode* _end; // The final call of the pattern. Will either be 36 // SB.toString or or String.<init>(SB.toString) 37 bool _multiple; // indicates this is a fusion of two or more 38 // separate StringBuilders 39 40 Node* _arguments; // The list of arguments to be concatenated 41 GrowableArray<int> _mode; // into a String along with a mode flag 42 // indicating how to treat the value. 43 44 Node_List _control; // List of control nodes that will be deleted 45 Node_List _uncommon_traps; // Uncommon traps that needs to be rewritten 46 // to restart at the initial JVMState. | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "compiler/compileLog.hpp" 27 #include "opto/addnode.hpp" 28 #include "opto/callGenerator.hpp" 29 #include "opto/callnode.hpp" 30 #include "opto/divnode.hpp" 31 #include "opto/graphKit.hpp" 32 #include "opto/idealKit.hpp" 33 #include "opto/rootnode.hpp" 34 #include "opto/runtime.hpp" 35 #include "opto/stringopts.hpp" 36 #include "opto/subnode.hpp" 37 38 #define __ kit. 39 40 class StringConcat : public ResourceObj { 41 private: 42 PhaseStringOpts* _stringopts; 43 Node* _string_alloc; 44 AllocateNode* _begin; // The allocation the begins the pattern 45 CallStaticJavaNode* _end; // The final call of the pattern. Will either be 46 // SB.toString or or String.<init>(SB.toString) 47 bool _multiple; // indicates this is a fusion of two or more 48 // separate StringBuilders 49 50 Node* _arguments; // The list of arguments to be concatenated 51 GrowableArray<int> _mode; // into a String along with a mode flag 52 // indicating how to treat the value. 53 54 Node_List _control; // List of control nodes that will be deleted 55 Node_List _uncommon_traps; // Uncommon traps that needs to be rewritten 56 // to restart at the initial JVMState. |