11/*
2- * Copyright (c) 1996, 2022 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1996, 2023 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3737class StackMapData extends MemberData <CodeData > {
3838 EAttributeType type ;
3939 StackMap .FrameType stackFrameType = null ;
40+ // stack frame type value
41+ int stackFrameTypeValue ;
4042 int frame_pc ;
4143 int offset ;
4244 int [] lockMap ;
@@ -61,52 +63,52 @@ public StackMapData(EAttributeType type, boolean firstStackMap, int prevFrame_pc
6163 environment .traceln (" stack_map_entry:pc=%d numloc=%s numstack=%s" ,
6264 frame_pc , mapToHexString (lockMap ), mapToHexString (stackMap ));
6365 } else { // if (type == EDataType.STACKMAPTABLE)
64- int ft_val = in .readUnsignedByte ();
65- StackMap .FrameType frame_type = StackMap .stackMapFrameType (ft_val );
66+ stackFrameTypeValue = in .readUnsignedByte ();
67+ StackMap .FrameType frame_type = StackMap .stackMapFrameType (stackFrameTypeValue );
6668 switch (frame_type ) {
6769 case SAME_FRAME -> {
6870 // verificationType is same_frame;
69- offset = ft_val ;
70- environment .traceln (" same_frame=%d" , ft_val );
71+ offset = stackFrameTypeValue ;
72+ environment .traceln (" same_frame=%d" , stackFrameTypeValue );
7173 }
7274 case SAME_FRAME_EX -> {
7375 // verificationType is same_frame_extended;
7476 offset = in .readUnsignedShort ();
75- environment .traceln (" same_frame_extended=%d, offset=%d" , ft_val , offset );
77+ environment .traceln (" same_frame_extended=%d, offset=%d" , stackFrameTypeValue , offset );
7678 }
7779 case SAME_LOCALS_1_STACK_ITEM_FRAME -> {
7880 // verificationType is same_locals_1_stack_item_frame
79- offset = ft_val - 64 ;
81+ offset = stackFrameTypeValue - 64 ;
8082 stackMap = readMapElements (in , 1 );
8183 environment .traceln (" same_locals_1_stack_item_frame=%d, offset=%d, numstack=%s" ,
82- ft_val , offset , mapToHexString (stackMap ));
84+ stackFrameTypeValue , offset , mapToHexString (stackMap ));
8385 }
8486 case SAME_LOCALS_1_STACK_ITEM_EXTENDED_FRAME -> {
8587 // verificationType is same_locals_1_stack_item_frame_extended
8688 offset = in .readUnsignedShort ();
8789 stackMap = readMapElements (in , 1 );
8890 environment .traceln (" same_locals_1_stack_item_frame_extended=%d, offset=%d, numstack=%s" ,
89- ft_val , offset , mapToHexString (stackMap ));
91+ stackFrameTypeValue , offset , mapToHexString (stackMap ));
9092 }
9193 case CHOP_1_FRAME , CHOP_2_FRAME , CHOP_3_FRAME -> {
9294 // verificationType is chop_frame
9395 offset = in .readUnsignedShort ();
94- environment .traceln (" chop_frame=%d offset=%d" , ft_val , offset );
96+ environment .traceln (" chop_frame=%d offset=%d" , stackFrameTypeValue , offset );
9597 }
9698 case APPEND_FRAME -> {
9799 // verificationType is append_frame
98100 offset = in .readUnsignedShort ();
99- lockMap = readMapElements (in , ft_val - 251 );
101+ lockMap = readMapElements (in , stackFrameTypeValue - 251 );
100102 environment .traceln (" append_frame=%d offset=%d numlock=%s" ,
101- ft_val , offset , mapToHexString (lockMap ));
103+ stackFrameTypeValue , offset , mapToHexString (lockMap ));
102104 }
103105 case FULL_FRAME -> {
104106 // verificationType is full_frame
105107 offset = in .readUnsignedShort ();
106108 lockMap = readMap (in );
107109 stackMap = readMap (in );
108110 environment .traceln (" full_frame=%d offset=%d numloc=%s numstack=%s" ,
109- ft_val , offset , mapToHexString (lockMap ), mapToHexString (stackMap ));
111+ stackFrameTypeValue , offset , mapToHexString (lockMap ), mapToHexString (stackMap ));
110112 }
111113 default -> environment .traceln ("incorrect frame_type argument" );
112114 }
0 commit comments