• R/O
  • SSH

kink: Commit

Kink runtime


Commit MetaInfo

Revision3d5fff6af795b4673fc739b019186e422b9566d3 (tree)
Time2020-02-10 23:32:18
Authormiyakawataku
Commitermiyakawataku

Log Message

rename JAVA.java? to JAVA.is?

Change Summary

Incremental Difference

diff -r a4153abd001b -r 3d5fff6af795 src/kinkdoc-for-host-mod/kink/host_lang/java/JAVA.kn
--- a/src/kinkdoc-for-host-mod/kink/host_lang/java/JAVA.kn Mon Feb 10 23:19:02 2020 +0900
+++ b/src/kinkdoc-for-host-mod/kink/host_lang/java/JAVA.kn Mon Feb 10 23:32:18 2020 +0900
@@ -730,10 +730,10 @@
730730
731731 :Mod_syms <- []
732732
733-## JAVA.java?(Val)
733+## JAVA.is?(Val)
734734 #
735-# JAVA.java? returns whether Val is a java_val.
736-Mod_syms.push_back('java?')
735+# JAVA.is? returns whether Val is a java_val.
736+Mod_syms.push_back('is?')
737737
738738 ## JAVA.string(Str)
739739 #
diff -r a4153abd001b -r 3d5fff6af795 src/main/java/org/kink_lang/kink/internal/mod/java/JavaMod.java
--- a/src/main/java/org/kink_lang/kink/internal/mod/java/JavaMod.java Mon Feb 10 23:19:02 2020 +0900
+++ b/src/main/java/org/kink_lang/kink/internal/mod/java/JavaMod.java Mon Feb 10 23:32:18 2020 +0900
@@ -41,8 +41,8 @@
4141 */
4242 private Val makeMod() {
4343 Val javaMod = vm.newVal();
44- javaMod.setVar(vm.sym.getHandle("java?"),
45- vm.fun.make("JAVA.java?")
44+ javaMod.setVar(vm.sym.getHandle("is?"),
45+ vm.fun.make("JAVA.is?(Val)")
4646 .take(1).action(c -> vm.bool.of(c.getArg(0) instanceof JavaVal)));
4747 javaMod.setVar(vm.sym.getHandle("string"),
4848 vm.fun.make("JAVA.string(Str)").take(1).action(this::stringFun));
diff -r a4153abd001b -r 3d5fff6af795 src/main/resources/kink-mods/kink/host_lang/java/JAVA_EXCEPTION.kn
--- a/src/main/resources/kink-mods/kink/host_lang/java/JAVA_EXCEPTION.kn Mon Feb 10 23:19:02 2020 +0900
+++ b/src/main/resources/kink-mods/kink/host_lang/java/JAVA_EXCEPTION.kn Mon Feb 10 23:32:18 2020 +0900
@@ -12,7 +12,7 @@
1212 #
1313 # Raises an exception made from the Java throwable object.
1414 :raise_throwable <- {(:Th)
15- JAVA.java?(Th) && Th.typable_as?(Throwable_class) || raise(
15+ JAVA.is?(Th) && Th.typable_as?(Throwable_class) || raise(
1616 'JAVA_EXCEPTION.raise_throwable(Th): required a Java throwable, but got {}'
1717 .format(Th.repr))
1818 :Msg = Th.call_method('toString' []).to_kink_str
@@ -26,7 +26,7 @@
2626 #
2727 # The vec is ordered from the oldest to the newest.
2828 :traces_from_throwable <- {(:Th)
29- JAVA.java?(Th) && Th.typable_as?(Throwable_class) || raise(
29+ JAVA.is?(Th) && Th.typable_as?(Throwable_class) || raise(
3030 'JAVA_EXCEPTION.traces_from_throwable(Th): required a Java throwable, but got {}'
3131 .format(Th.repr))
3232 :List = Trace_helper.call_method('tracesFrom' [Th.as(Throwable_class)])
diff -r a4153abd001b -r 3d5fff6af795 src/test/java/org/kink_lang/kink/internal/mod/java/JavaModTest.java
--- a/src/test/java/org/kink_lang/kink/internal/mod/java/JavaModTest.java Mon Feb 10 23:19:02 2020 +0900
+++ b/src/test/java/org/kink_lang/kink/internal/mod/java/JavaModTest.java Mon Feb 10 23:32:18 2020 +0900
@@ -30,21 +30,21 @@
3030 JavaModTest.vm = null;
3131 }
3232
33- // test JAVA.java?(Val) {{{1
33+ // test JAVA.is??(Val) {{{1
3434
3535 @Test
36- public void test_java_java_p_true() {
36+ public void test_java_is_p_true() {
3737 JavaVal java = vm.java.of(new Object(), Object.class);
3838 Val result = vm.run(
39- c -> c.call("kink/host_lang/java/JAVA", vm.sym.getHandle("java?")).args(java),
39+ c -> c.call("kink/host_lang/java/JAVA", vm.sym.getHandle("is?")).args(java),
4040 v -> v, (msg, traces) -> { throw new AssertionError(msg); });
4141 assertThat(result).isEqualTo(vm.bool.trueVal);
4242 }
4343
4444 @Test
45- public void test_java_java_p_false() {
45+ public void test_java_is_p_false() {
4646 Val result = vm.run(
47- c -> c.call("kink/host_lang/java/JAVA", vm.sym.getHandle("java?")).args(vm.nada),
47+ c -> c.call("kink/host_lang/java/JAVA", vm.sym.getHandle("is?")).args(vm.nada),
4848 v -> v, (msg, traces) -> { throw new AssertionError(msg); });
4949 assertThat(result).isEqualTo(vm.bool.falseVal);
5050 }
Show on old repository browser