2 * Copyright (C) 2014, United States Government, as represented by the
3 * Administrator of the National Aeronautics and Space Administration.
6 * The Java Pathfinder core (jpf-core) platform is licensed under the
7 * Apache License, Version 2.0 (the "License"); you may not use this file except
8 * in compliance with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0.
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 package gov.nasa.jpf.jvm;
21 import gov.nasa.jpf.vm.DirectCallStackFrame;
22 import gov.nasa.jpf.vm.MethodInfo;
25 * a direct call stackframe that supports JVM calling conventions
27 public class JVMDirectCallStackFrame extends DirectCallStackFrame {
29 JVMDirectCallStackFrame (MethodInfo miDirectCall, MethodInfo callee){
30 super( miDirectCall, callee);
33 //--- return value handling
36 public int getResult(){
41 public int getReferenceResult(){
46 public long getLongResult(){
51 public Object getResultAttr(){
52 return getOperandAttr();
56 public Object getLongResultAttr(){
57 return getLongOperandAttr();
61 public void setExceptionReference (int exRef){
67 public int getExceptionReference(){
72 public void setExceptionReferenceAttribute (Object attr){
77 public Object getExceptionReferenceAttribute (){
78 return getOperandAttr();
81 //--- direct call argument initialization
82 // NOTE - we don't support out-of-order arguments yet, i.e. the slotIdx is ignored
86 public int setArgument (int slotIdx, int v, Object attr){
96 public int setReferenceArgument (int slotIdx, int ref, Object attr){
106 public int setLongArgument (int slotIdx, long v, Object attr){
109 setLongOperandAttr(attr);
115 //--- DirectCallStackFrame methods don't have arguments
118 public void setArgumentLocal (int argIdx, int v, Object attr){
119 throw new UnsupportedOperationException("direct call methods don't have arguments");
122 public void setReferenceArgumentLocal (int argIdx, int v, Object attr){
123 throw new UnsupportedOperationException("direct call methods don't have arguments");
126 public void setLongArgumentLocal (int argIdx, long v, Object attr){
127 throw new UnsupportedOperationException("direct call methods don't have arguments");