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/_ciTypeFlow.cpp.incl" 27 28 // ciTypeFlow::JsrSet 29 // 30 // A JsrSet represents some set of JsrRecords. This class 31 // is used to record a set of all jsr routines which we permit 32 // execution to return (ret) from. 33 // 34 // During abstract interpretation, JsrSets are used to determine 35 // whether two paths which reach a given block are unique, and 36 // should be cloned apart, or are compatible, and should merge 37 // together. 38 39 // ------------------------------------------------------------------ 40 // ciTypeFlow::JsrSet::JsrSet 41 ciTypeFlow::JsrSet::JsrSet(Arena* arena, int default_len) { 42 if (arena != NULL) { 43 // Allocate growable array in Arena. 44 _set = new (arena) GrowableArray<JsrRecord*>(arena, default_len, 0, NULL); 45 } else { 46 // Allocate growable array in current ResourceArea. | 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 "ci/ciConstant.hpp" 27 #include "ci/ciField.hpp" 28 #include "ci/ciMethod.hpp" 29 #include "ci/ciMethodData.hpp" 30 #include "ci/ciObjArrayKlass.hpp" 31 #include "ci/ciStreams.hpp" 32 #include "ci/ciTypeArrayKlass.hpp" 33 #include "ci/ciTypeFlow.hpp" 34 #include "compiler/compileLog.hpp" 35 #include "interpreter/bytecode.hpp" 36 #include "interpreter/bytecodes.hpp" 37 #include "memory/allocation.inline.hpp" 38 #include "runtime/deoptimization.hpp" 39 #include "utilities/growableArray.hpp" 40 41 // ciTypeFlow::JsrSet 42 // 43 // A JsrSet represents some set of JsrRecords. This class 44 // is used to record a set of all jsr routines which we permit 45 // execution to return (ret) from. 46 // 47 // During abstract interpretation, JsrSets are used to determine 48 // whether two paths which reach a given block are unique, and 49 // should be cloned apart, or are compatible, and should merge 50 // together. 51 52 // ------------------------------------------------------------------ 53 // ciTypeFlow::JsrSet::JsrSet 54 ciTypeFlow::JsrSet::JsrSet(Arena* arena, int default_len) { 55 if (arena != NULL) { 56 // Allocate growable array in Arena. 57 _set = new (arena) GrowableArray<JsrRecord*>(arena, default_len, 0, NULL); 58 } else { 59 // Allocate growable array in current ResourceArea. |