We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 31e7382 + 9d74906 commit e64d9c9Copy full SHA for e64d9c9
src/java_bytecode/java_utils.cpp
@@ -28,20 +28,21 @@ bool java_is_array_type(const typet &type)
28
29
unsigned java_local_variable_slots(const typet &t)
30
{
31
+
32
+ // Even on a 64-bit platform, Java pointers occupy one slot:
33
+ if(t.id()==ID_pointer)
34
+ return 1;
35
36
unsigned bitwidth;
37
38
bitwidth=t.get_unsigned_int(ID_width);
39
INVARIANT(
- bitwidth==0 ||
40
bitwidth==8 ||
41
bitwidth==16 ||
42
bitwidth==32 ||
43
bitwidth==64,
44
"all types constructed in java_types.cpp encode JVM types "
45
"with these bit widths");
- INVARIANT(
- bitwidth!=0 || t.id()==ID_pointer,
- "if bitwidth is 0, then this a reference to a class, which is 1 slot");
46
47
return bitwidth==64 ? 2 : 1;
48
}
0 commit comments