Path: blob/master/test/hotspot/jtreg/vmTestbase/jit/graph/test1.java
40948 views
/*1* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223package jit.graph;2425import nsk.share.TestFailure;2627import java.lang.reflect.InvocationTargetException;28import java.util.Vector;2930class test1 {31private final int classID = Globals.MethodID_Array[0];3233public void callMe(Vector summation, Vector ID, Long functionDepth, Integer staticFunctionDepth)34throws InvocationTargetException {35Globals.appendSumToSummationVector(classID, summation);3637if (CGT.shouldFinish()) {38return;39}4041if (Globals.VERBOSE) {42System.out.println("test1.callMe");43}4445if ((functionDepth.longValue() <= 0) && (staticFunctionDepth.intValue() <= 0)) {46return;47}4849MethodData methodCallStr;50Long numFcalls;51Integer staticFcalls;5253if (staticFunctionDepth.intValue() > 0) {54numFcalls = functionDepth;55staticFcalls = Integer.valueOf(staticFunctionDepth.intValue() - 1);56methodCallStr = Globals.returnNextStaticMethod(classID);57} else {58numFcalls = Long.valueOf(functionDepth.longValue() - 1);59staticFcalls = staticFunctionDepth;60methodCallStr = Globals.nextRandomMethod();61}6263Globals.addFunctionIDToVector(methodCallStr.id, ID);6465try {66methodCallStr.nextMethod.invoke(methodCallStr.instance,67new Object[]{summation, ID, numFcalls, staticFcalls});68} catch (IllegalAccessException iax) {69throw new TestFailure("Illegal Access Exception");70}71}72}737475