@@ -31,50 +31,59 @@ std::vector<typet> parse_list_types(
31
31
32
32
signedbv_typet java_int_type ()
33
33
{
34
- return signedbv_typet (32 );
34
+ static const auto result = signedbv_typet (32 );
35
+ return result;
35
36
}
36
37
37
38
void_typet java_void_type ()
38
39
{
39
- return void_typet ();
40
+ static const auto result = void_typet ();
41
+ return result;
40
42
}
41
43
42
44
signedbv_typet java_long_type ()
43
45
{
44
- return signedbv_typet (64 );
46
+ static const auto result = signedbv_typet (64 );
47
+ return result;
45
48
}
46
49
47
50
signedbv_typet java_short_type ()
48
51
{
49
- return signedbv_typet (16 );
52
+ static const auto result = signedbv_typet (16 );
53
+ return result;
50
54
}
51
55
52
56
signedbv_typet java_byte_type ()
53
57
{
54
- return signedbv_typet (8 );
58
+ static const auto result = signedbv_typet (8 );
59
+ return result;
55
60
}
56
61
57
62
unsignedbv_typet java_char_type ()
58
63
{
59
- return unsignedbv_typet (16 );
64
+ static const auto result = unsignedbv_typet (16 );
65
+ return result;
60
66
}
61
67
62
68
floatbv_typet java_float_type ()
63
69
{
64
- return ieee_float_spect::single_precision ().to_type ();
70
+ static const auto result = ieee_float_spect::single_precision ().to_type ();
71
+ return result;
65
72
}
66
73
67
74
floatbv_typet java_double_type ()
68
75
{
69
- return ieee_float_spect::double_precision ().to_type ();
76
+ static const auto result = ieee_float_spect::double_precision ().to_type ();
77
+ return result;
70
78
}
71
79
72
80
c_bool_typet java_boolean_type ()
73
81
{
74
82
// The Java standard doesn't really prescribe the width
75
83
// of a boolean. However, JNI suggests that it's 8 bits.
76
84
// http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/types.html
77
- return c_bool_typet (8 );
85
+ static const auto result = c_bool_typet (8 );
86
+ return result;
78
87
}
79
88
80
89
reference_typet java_reference_type (const typet &subtype)
@@ -84,7 +93,9 @@ reference_typet java_reference_type(const typet &subtype)
84
93
85
94
reference_typet java_lang_object_type ()
86
95
{
87
- return java_reference_type (struct_tag_typet (" java::java.lang.Object" ));
96
+ static const auto result =
97
+ java_reference_type (struct_tag_typet (" java::java.lang.Object" ));
98
+ return result;
88
99
}
89
100
90
101
// / Construct an array pointer type. It is a pointer to a symbol with identifier
0 commit comments