nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compiler: handle multi-iterators
[nit.git]
/
src
/
ffi
/
java.nit
diff --git
a/src/ffi/java.nit
b/src/ffi/java.nit
index
74d421e
..
eca32ac
100644
(file)
--- a/
src/ffi/java.nit
+++ b/
src/ffi/java.nit
@@
-362,7
+362,7
@@
class JavaFile
super ExternFile
redef fun makefile_rule_name do return "{filename.basename(".java")}.class"
super ExternFile
redef fun makefile_rule_name do return "{filename.basename(".java")}.class"
- redef fun makefile_rule_content do return "javac {filename.basename("")} -d ."
+ redef fun makefile_rule_content do return "javac {filename.basename} -d ."
redef fun add_to_jar do return true
end
redef fun add_to_jar do return true
end
@@
-457,7
+457,7
@@
redef class MType
# JNI type name (in C)
#
# So this is a C type, usually defined in `jni.h`
# JNI type name (in C)
#
# So this is a C type, usually defined in `jni.h`
- private fun jni_type: String do return "jint"
+ private fun jni_type: String do return "long"
# JNI short type name (for signatures)
#
# JNI short type name (for signatures)
#
@@
-483,6
+483,11
@@
redef class MClassType
if mclass.name == "Int" then return "long"
if mclass.name == "Float" then return "double"
if mclass.name == "Byte" then return "byte"
if mclass.name == "Int" then return "long"
if mclass.name == "Float" then return "double"
if mclass.name == "Byte" then return "byte"
+ if mclass.name == "Int8" then return "byte"
+ if mclass.name == "Int16" then return "short"
+ if mclass.name == "UInt16" then return "short"
+ if mclass.name == "Int32" then return "int"
+ if mclass.name == "UInt32" then return "int"
return super
end
return super
end
@@
-495,6
+500,11
@@
redef class MClassType
if mclass.name == "Int" then return "jlong"
if mclass.name == "Float" then return "jdouble"
if mclass.name == "Byte" then return "jbyte"
if mclass.name == "Int" then return "jlong"
if mclass.name == "Float" then return "jdouble"
if mclass.name == "Byte" then return "jbyte"
+ if mclass.name == "Int8" then return "jbyte"
+ if mclass.name == "Int16" then return "jshort"
+ if mclass.name == "UInt16" then return "jshort"
+ if mclass.name == "Int32" then return "jint"
+ if mclass.name == "UInt32" then return "jint"
return super
end
return super
end
@@
-555,6
+565,11
@@
redef class MClassType
if mclass.name == "Int" then return "J"
if mclass.name == "Float" then return "D"
if mclass.name == "Byte" then return "B"
if mclass.name == "Int" then return "J"
if mclass.name == "Float" then return "D"
if mclass.name == "Byte" then return "B"
+ if mclass.name == "Int8" then return "B"
+ if mclass.name == "Int16" then return "S"
+ if mclass.name == "UInt16" then return "S"
+ if mclass.name == "Int32" then return "I"
+ if mclass.name == "UInt32" then return "I"
return super
end
return super
end
@@
-568,6
+583,11
@@
redef class MClassType
if mclass.name == "Int" then return "Long"
if mclass.name == "Float" then return "Double"
if mclass.name == "Byte" then return "Byte"
if mclass.name == "Int" then return "Long"
if mclass.name == "Float" then return "Double"
if mclass.name == "Byte" then return "Byte"
+ if mclass.name == "Int8" then return "Byte"
+ if mclass.name == "Int16" then return "Short"
+ if mclass.name == "UInt16" then return "Short"
+ if mclass.name == "Int32" then return "Int"
+ if mclass.name == "UInt32" then return "Int"
return super
end
end
return super
end
end