|
@@ -35,86 +35,88 @@ public class JavaCompiler {
|
35
|
35
|
LONG_GET_MIN_VALUE.setTag(JavaFieldInfo.class, new JavaFieldInfo(jLong, "MIN_VALUE", "J"));
|
36
|
36
|
LONG_GET_MAX_VALUE.setTag(JavaFieldInfo.class, new JavaFieldInfo(jLong, "MAX_VALUE", "J"));
|
37
|
37
|
|
38
|
|
- implement(BOOL_NOT, writer -> writer.iNot());
|
39
|
|
-
|
40
|
|
- implement(BYTE_NOT, writer -> writer.iNot());
|
41
|
|
- implement(SBYTE_NOT, writer -> writer.iNot());
|
42
|
|
- implement(SHORT_NOT, writer -> writer.iNot());
|
43
|
|
- implement(USHORT_NOT, writer -> writer.iNot());
|
44
|
|
- implement(INT_NOT, writer -> writer.iNot());
|
45
|
|
- implement(UINT_NOT, writer -> writer.iNot());
|
46
|
|
- implement(LONG_NOT, writer -> writer.lNot());
|
47
|
|
- implement(ULONG_NOT, writer -> writer.lNot());
|
48
|
|
-
|
49
|
|
- implement(BYTE_NEG, writer -> writer.iNeg());
|
50
|
|
- implement(SBYTE_NEG, writer -> writer.iNeg());
|
51
|
|
- implement(SHORT_NEG, writer -> writer.iNeg());
|
52
|
|
- implement(USHORT_NEG, writer -> writer.iNeg());
|
53
|
|
- implement(INT_NEG, writer -> writer.iNeg());
|
54
|
|
- implement(UINT_NEG, writer -> writer.iNeg());
|
55
|
|
- implement(LONG_NEG, writer -> writer.lNeg());
|
56
|
|
- implement(ULONG_NEG, writer -> writer.lNeg());
|
57
|
|
- implement(FLOAT_NEG, writer -> writer.fNeg());
|
58
|
|
- implement(DOUBLE_NEG, writer -> writer.dNeg());
|
59
|
|
-
|
60
|
|
- implement(BYTE_ADD_BYTE, writer -> writer.iAdd());
|
61
|
|
- implement(SBYTE_ADD_SBYTE, writer -> writer.iAdd());
|
62
|
|
- implement(SHORT_ADD_SHORT, writer -> writer.iAdd());
|
63
|
|
- implement(USHORT_ADD_USHORT, writer -> writer.iAdd());
|
64
|
|
- implement(INT_ADD_INT, writer -> writer.iAdd());
|
65
|
|
- implement(UINT_ADD_UINT, writer -> writer.iAdd());
|
66
|
|
- implement(LONG_ADD_LONG, writer -> writer.lAdd());
|
67
|
|
- implement(ULONG_ADD_ULONG, writer -> writer.lAdd());
|
68
|
|
- implement(FLOAT_ADD_FLOAT, writer -> writer.fAdd());
|
69
|
|
- implement(DOUBLE_ADD_DOUBLE, writer -> writer.dAdd());
|
|
38
|
+ implement(BOOL_NOT, JavaWriter::iNot);
|
|
39
|
+
|
|
40
|
+ implement(BYTE_NOT, JavaWriter::iNot);
|
|
41
|
+ implement(SBYTE_NOT, JavaWriter::iNot);
|
|
42
|
+ implement(SHORT_NOT, JavaWriter::iNot);
|
|
43
|
+ implement(USHORT_NOT, JavaWriter::iNot);
|
|
44
|
+ implement(INT_NOT, JavaWriter::iNot);
|
|
45
|
+ implement(UINT_NOT, JavaWriter::iNot);
|
|
46
|
+ implement(LONG_NOT, JavaWriter::lNot);
|
|
47
|
+ implement(ULONG_NOT, JavaWriter::lNot);
|
|
48
|
+
|
|
49
|
+ implement(BYTE_NEG, JavaWriter::iNeg);
|
|
50
|
+ implement(SBYTE_NEG, JavaWriter::iNeg);
|
|
51
|
+ implement(SHORT_NEG, JavaWriter::iNeg);
|
|
52
|
+ implement(USHORT_NEG, JavaWriter::iNeg);
|
|
53
|
+ implement(INT_NEG, JavaWriter::iNeg);
|
|
54
|
+ implement(UINT_NEG, JavaWriter::iNeg);
|
|
55
|
+ implement(LONG_NEG, JavaWriter::lNeg);
|
|
56
|
+ implement(ULONG_NEG, JavaWriter::lNeg);
|
|
57
|
+ implement(FLOAT_NEG, JavaWriter::fNeg);
|
|
58
|
+ implement(DOUBLE_NEG, JavaWriter::dNeg);
|
|
59
|
+
|
|
60
|
+ implement(BYTE_ADD_BYTE, JavaWriter::iAdd);
|
|
61
|
+ implement(SBYTE_ADD_SBYTE, JavaWriter::iAdd);
|
|
62
|
+ implement(SHORT_ADD_SHORT, JavaWriter::iAdd);
|
|
63
|
+ implement(USHORT_ADD_USHORT, JavaWriter::iAdd);
|
|
64
|
+ implement(INT_ADD_INT, JavaWriter::iAdd);
|
|
65
|
+ implement(UINT_ADD_UINT, JavaWriter::iAdd);
|
|
66
|
+ implement(LONG_ADD_LONG, JavaWriter::lAdd);
|
|
67
|
+ implement(ULONG_ADD_ULONG, JavaWriter::lAdd);
|
|
68
|
+ implement(FLOAT_ADD_FLOAT, JavaWriter::fAdd);
|
|
69
|
+ implement(DOUBLE_ADD_DOUBLE, JavaWriter::dAdd);
|
70
|
70
|
// TODO: STRING_ADD_STRING
|
71
|
|
-
|
72
|
|
- implement(BYTE_SUB_BYTE, writer -> writer.iSub());
|
73
|
|
- implement(SBYTE_SUB_SBYTE, writer -> writer.iSub());
|
74
|
|
- implement(SHORT_SUB_SHORT, writer -> writer.iSub());
|
75
|
|
- implement(USHORT_SUB_USHORT, writer -> writer.iSub());
|
76
|
|
- implement(INT_SUB_INT, writer -> writer.iSub());
|
77
|
|
- implement(UINT_SUB_UINT, writer -> writer.iSub());
|
78
|
|
- implement(LONG_SUB_LONG, writer -> writer.lSub());
|
79
|
|
- implement(ULONG_SUB_ULONG, writer -> writer.lSub());
|
80
|
|
- implement(FLOAT_SUB_FLOAT, writer -> writer.fSub());
|
81
|
|
- implement(DOUBLE_SUB_DOUBLE, writer -> writer.dSub());
|
82
|
|
-
|
83
|
|
- implement(BYTE_MUL_BYTE, writer -> writer.iMul());
|
84
|
|
- implement(SBYTE_MUL_SBYTE, writer -> writer.iMul());
|
85
|
|
- implement(SHORT_MUL_SHORT, writer -> writer.iMul());
|
86
|
|
- implement(USHORT_MUL_USHORT, writer -> writer.iMul());
|
87
|
|
- implement(INT_MUL_INT, writer -> writer.iMul());
|
88
|
|
- implement(UINT_MUL_UINT, writer -> writer.iMul());
|
89
|
|
- implement(LONG_MUL_LONG, writer -> writer.lMul());
|
90
|
|
- implement(ULONG_MUL_ULONG, writer -> writer.lMul());
|
91
|
|
- implement(FLOAT_MUL_FLOAT, writer -> writer.fMul());
|
92
|
|
- implement(DOUBLE_MUL_DOUBLE, writer -> writer.dMul());
|
93
|
|
-
|
94
|
|
- implement(INT_DIV_INT, writer -> writer.iDiv());
|
95
|
|
- implement(INT_MOD_INT, writer -> writer.iRem());
|
96
|
|
-
|
97
|
|
- implement(INT_TO_BYTE, writer -> writer.i2b());
|
98
|
|
- implement(INT_TO_SBYTE, writer -> writer.i2b());
|
99
|
|
- implement(INT_TO_SHORT, writer -> writer.i2s());
|
100
|
|
- implement(INT_TO_USHORT, writer -> writer.i2s());
|
|
71
|
+
|
|
72
|
+ implement(STRING_ADD_STRING, JavaWriter::stringAdd);
|
|
73
|
+
|
|
74
|
+ implement(BYTE_SUB_BYTE, JavaWriter::iSub);
|
|
75
|
+ implement(SBYTE_SUB_SBYTE, JavaWriter::iSub);
|
|
76
|
+ implement(SHORT_SUB_SHORT, JavaWriter::iSub);
|
|
77
|
+ implement(USHORT_SUB_USHORT, JavaWriter::iSub);
|
|
78
|
+ implement(INT_SUB_INT, JavaWriter::iSub);
|
|
79
|
+ implement(UINT_SUB_UINT, JavaWriter::iSub);
|
|
80
|
+ implement(LONG_SUB_LONG, JavaWriter::lSub);
|
|
81
|
+ implement(ULONG_SUB_ULONG, JavaWriter::lSub);
|
|
82
|
+ implement(FLOAT_SUB_FLOAT, JavaWriter::fSub);
|
|
83
|
+ implement(DOUBLE_SUB_DOUBLE, JavaWriter::dSub);
|
|
84
|
+
|
|
85
|
+ implement(BYTE_MUL_BYTE, JavaWriter::iMul);
|
|
86
|
+ implement(SBYTE_MUL_SBYTE, JavaWriter::iMul);
|
|
87
|
+ implement(SHORT_MUL_SHORT, JavaWriter::iMul);
|
|
88
|
+ implement(USHORT_MUL_USHORT, JavaWriter::iMul);
|
|
89
|
+ implement(INT_MUL_INT, JavaWriter::iMul);
|
|
90
|
+ implement(UINT_MUL_UINT, JavaWriter::iMul);
|
|
91
|
+ implement(LONG_MUL_LONG, JavaWriter::lMul);
|
|
92
|
+ implement(ULONG_MUL_ULONG, JavaWriter::lMul);
|
|
93
|
+ implement(FLOAT_MUL_FLOAT, JavaWriter::fMul);
|
|
94
|
+ implement(DOUBLE_MUL_DOUBLE, JavaWriter::dMul);
|
|
95
|
+
|
|
96
|
+ implement(INT_DIV_INT, JavaWriter::iDiv);
|
|
97
|
+ implement(INT_MOD_INT, JavaWriter::iRem);
|
|
98
|
+
|
|
99
|
+ implement(INT_TO_BYTE, JavaWriter::i2b);
|
|
100
|
+ implement(INT_TO_SBYTE, JavaWriter::i2b);
|
|
101
|
+ implement(INT_TO_SHORT, JavaWriter::i2s);
|
|
102
|
+ implement(INT_TO_USHORT, JavaWriter::i2s);
|
101
|
103
|
implement(INT_TO_UINT, writer -> {});
|
102
|
|
- implement(INT_TO_LONG, writer -> writer.i2l());
|
103
|
|
- implement(INT_TO_ULONG, writer -> writer.i2l());
|
104
|
|
- implement(INT_TO_FLOAT, writer -> writer.i2f());
|
105
|
|
- implement(INT_TO_DOUBLE, writer -> writer.i2d());
|
106
|
|
- implement(INT_TO_CHAR, writer -> writer.i2s());
|
|
104
|
+ implement(INT_TO_LONG, JavaWriter::i2l);
|
|
105
|
+ implement(INT_TO_ULONG, JavaWriter::i2l);
|
|
106
|
+ implement(INT_TO_FLOAT, JavaWriter::i2f);
|
|
107
|
+ implement(INT_TO_DOUBLE, JavaWriter::i2d);
|
|
108
|
+ implement(INT_TO_CHAR, JavaWriter::i2s);
|
107
|
109
|
INT_TO_STRING.setTag(JavaMethodInfo.class, new JavaMethodInfo(jInteger, "toString", "(I)Ljava/lang/String;", true));
|
108
|
110
|
|
109
|
111
|
implement(LONG_TO_BYTE, writer -> { writer.l2i(); writer.i2b(); });
|
110
|
112
|
implement(LONG_TO_SBYTE, writer -> { writer.l2i(); writer.i2b(); });
|
111
|
113
|
implement(LONG_TO_SHORT, writer -> { writer.l2i(); writer.i2s(); });
|
112
|
114
|
implement(LONG_TO_USHORT, writer -> { writer.l2i(); writer.i2s(); });
|
113
|
|
- implement(LONG_TO_INT, writer -> writer.l2i());
|
114
|
|
- implement(LONG_TO_UINT, writer -> writer.l2i());
|
|
115
|
+ implement(LONG_TO_INT, JavaWriter::l2i);
|
|
116
|
+ implement(LONG_TO_UINT, JavaWriter::l2i);
|
115
|
117
|
implement(LONG_TO_ULONG, writer -> {});
|
116
|
|
- implement(LONG_TO_FLOAT, writer -> writer.l2f());
|
117
|
|
- implement(LONG_TO_DOUBLE, writer -> writer.l2d());
|
|
118
|
+ implement(LONG_TO_FLOAT, JavaWriter::l2f);
|
|
119
|
+ implement(LONG_TO_DOUBLE, JavaWriter::l2d);
|
118
|
120
|
implement(LONG_TO_CHAR, writer -> { writer.l2i(); writer.i2s(); });
|
119
|
121
|
LONG_TO_STRING.setTag(JavaMethodInfo.class, new JavaMethodInfo(jLong, "toString", "(J)Ljava/lang/String;", true));
|
120
|
122
|
|