Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/vmTestbase/jit/graph/test1.java
40948 views
1
/*
2
* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
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
package jit.graph;
25
26
import nsk.share.TestFailure;
27
28
import java.lang.reflect.InvocationTargetException;
29
import java.util.Vector;
30
31
class test1 {
32
private final int classID = Globals.MethodID_Array[0];
33
34
public void callMe(Vector summation, Vector ID, Long functionDepth, Integer staticFunctionDepth)
35
throws InvocationTargetException {
36
Globals.appendSumToSummationVector(classID, summation);
37
38
if (CGT.shouldFinish()) {
39
return;
40
}
41
42
if (Globals.VERBOSE) {
43
System.out.println("test1.callMe");
44
}
45
46
if ((functionDepth.longValue() <= 0) && (staticFunctionDepth.intValue() <= 0)) {
47
return;
48
}
49
50
MethodData methodCallStr;
51
Long numFcalls;
52
Integer staticFcalls;
53
54
if (staticFunctionDepth.intValue() > 0) {
55
numFcalls = functionDepth;
56
staticFcalls = Integer.valueOf(staticFunctionDepth.intValue() - 1);
57
methodCallStr = Globals.returnNextStaticMethod(classID);
58
} else {
59
numFcalls = Long.valueOf(functionDepth.longValue() - 1);
60
staticFcalls = staticFunctionDepth;
61
methodCallStr = Globals.nextRandomMethod();
62
}
63
64
Globals.addFunctionIDToVector(methodCallStr.id, ID);
65
66
try {
67
methodCallStr.nextMethod.invoke(methodCallStr.instance,
68
new Object[]{summation, ID, numFcalls, staticFcalls});
69
} catch (IllegalAccessException iax) {
70
throw new TestFailure("Illegal Access Exception");
71
}
72
}
73
}
74
75