diff --git a/coroutine-transform/build/classes/kotlin/main/META-INF/coroutine-transform.kotlin_module b/coroutine-transform/build/classes/kotlin/main/META-INF/coroutine-transform.kotlin_module
new file mode 100644
index 00000000..f4250531
Binary files /dev/null and b/coroutine-transform/build/classes/kotlin/main/META-INF/coroutine-transform.kotlin_module differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab
new file mode 100644
index 00000000..a122981f
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream
new file mode 100644
index 00000000..1ba9388c
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len
new file mode 100644
index 00000000..7b791563
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len
new file mode 100644
index 00000000..eb0b8a06
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values
new file mode 100644
index 00000000..4594f7ec
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at
new file mode 100644
index 00000000..154373f5
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.s b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.s
new file mode 100644
index 00000000..f16aae3e
--- /dev/null
+++ b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.s
@@ -0,0 +1 @@
+äþþþþþÂÂÂÂããñññññþñññ
\ No newline at end of file
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i
new file mode 100644
index 00000000..056bac4a
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab
new file mode 100644
index 00000000..655e399f
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream
new file mode 100644
index 00000000..3c77bb13
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len
new file mode 100644
index 00000000..2f149345
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len
new file mode 100644
index 00000000..a123325d
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at
new file mode 100644
index 00000000..7925fc60
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i
new file mode 100644
index 00000000..072794d8
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab
new file mode 100644
index 00000000..439ae23a
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream
new file mode 100644
index 00000000..3c77bb13
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len
new file mode 100644
index 00000000..2f149345
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len
new file mode 100644
index 00000000..a123325d
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at
new file mode 100644
index 00000000..b4078fc2
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i
new file mode 100644
index 00000000..072794d8
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab
new file mode 100644
index 00000000..8c9d386e
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream
new file mode 100644
index 00000000..68af7e9a
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len
new file mode 100644
index 00000000..8c81f1d5
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len
new file mode 100644
index 00000000..2a17e6e5
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at
new file mode 100644
index 00000000..f89197ee
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i
new file mode 100644
index 00000000..9714acdf
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab
new file mode 100644
index 00000000..4362f9c4
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.keystream
new file mode 100644
index 00000000..49c87676
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.keystream.len
new file mode 100644
index 00000000..541378f2
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.len
new file mode 100644
index 00000000..2a17e6e5
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.values.at
new file mode 100644
index 00000000..87d133d4
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab_i
new file mode 100644
index 00000000..898a2900
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/inline-functions.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab
new file mode 100644
index 00000000..9939f2c8
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream
new file mode 100644
index 00000000..7da49a6c
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len
new file mode 100644
index 00000000..dd2020d7
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len
new file mode 100644
index 00000000..f6d81fed
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values
new file mode 100644
index 00000000..29857705
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at
new file mode 100644
index 00000000..f3326a89
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.s b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.s
new file mode 100644
index 00000000..7ef75c89
--- /dev/null
+++ b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.s
@@ -0,0 +1 @@
+ÅãçÛÛÛ
\ No newline at end of file
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i
new file mode 100644
index 00000000..7f049f33
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab
new file mode 100644
index 00000000..bf8f5042
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream
new file mode 100644
index 00000000..41f21b89
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len
new file mode 100644
index 00000000..81438499
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len
new file mode 100644
index 00000000..01bdaa1d
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at
new file mode 100644
index 00000000..16dbbf48
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i
new file mode 100644
index 00000000..d165c9cc
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab
new file mode 100644
index 00000000..574d0936
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream
new file mode 100644
index 00000000..4e352355
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len
new file mode 100644
index 00000000..5ca716ff
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len
new file mode 100644
index 00000000..817b326d
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at
new file mode 100644
index 00000000..ff6a6800
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i
new file mode 100644
index 00000000..f47bbbc2
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab
new file mode 100644
index 00000000..1a4611ae
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream
new file mode 100644
index 00000000..5b8904ce
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len
new file mode 100644
index 00000000..23a1a929
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len
new file mode 100644
index 00000000..31ed51e2
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values
new file mode 100644
index 00000000..149c516b
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at
new file mode 100644
index 00000000..14f5a2f9
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s
new file mode 100644
index 00000000..39170a21
--- /dev/null
+++ b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s
@@ -0,0 +1 @@
+ýoÝoâoâoâoäoÅoÇoÇoÄoäoÅoÇoÇoÇoÓo×oÉoÜoÖoÖoÖoÖoÖoÖoÉoÏoÜoÉoÜoÖoÖoÖoèoäsÎqîqÎqÝqÖoÖoçoèrÂrñpÔoÿoÓuóqØoóqÎr÷qÙrÄuÉoÉoÉoÉoâoÜsëoëo÷oÖyÃuÃuÃuìtÛtèrÝrÝrÝrþnénÑmÑmÑmÑmølÎjÑmÑmÑm
\ No newline at end of file
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i
new file mode 100644
index 00000000..98d9a462
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab
new file mode 100644
index 00000000..442c1b93
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream
new file mode 100644
index 00000000..8338d178
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len
new file mode 100644
index 00000000..4aec85e8
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len
new file mode 100644
index 00000000..a5413564
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at
new file mode 100644
index 00000000..7ae9d99d
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i
new file mode 100644
index 00000000..47c9e2e2
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab
new file mode 100644
index 00000000..8b5077eb
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream
new file mode 100644
index 00000000..ced5c57c
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len
new file mode 100644
index 00000000..14d4caa3
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len
new file mode 100644
index 00000000..a363176c
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values
new file mode 100644
index 00000000..70320386
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at
new file mode 100644
index 00000000..a1f389a2
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.s b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.s
new file mode 100644
index 00000000..cfc1a52f
--- /dev/null
+++ b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.s
@@ -0,0 +1 @@
+Ö
ÌÃå
É
÷õîÐ
\ No newline at end of file
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i
new file mode 100644
index 00000000..c9023818
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab
new file mode 100644
index 00000000..db74b836
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream
new file mode 100644
index 00000000..5afd91fa
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len
new file mode 100644
index 00000000..e6543bb3
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len
new file mode 100644
index 00000000..fa432244
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values
new file mode 100644
index 00000000..503eeecf
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at
new file mode 100644
index 00000000..78e72ae4
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.s b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.s
new file mode 100644
index 00000000..d3089bfc
--- /dev/null
+++ b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.s
@@ -0,0 +1 @@
+áÿÿÿÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÆÎÊûü                                                                              ôôôôôôððððïïíííííóííí
\ No newline at end of file
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i
new file mode 100644
index 00000000..18879ed2
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab
new file mode 100644
index 00000000..a4903774
--- /dev/null
+++ b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/counters.tab
@@ -0,0 +1,2 @@
+304
+0
\ No newline at end of file
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab
new file mode 100644
index 00000000..c232331b
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream
new file mode 100644
index 00000000..fdd14fa6
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len
new file mode 100644
index 00000000..7b791563
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len
new file mode 100644
index 00000000..eb0b8a06
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at
new file mode 100644
index 00000000..2338353a
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i
new file mode 100644
index 00000000..218c17ac
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab
new file mode 100644
index 00000000..e0072130
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream
new file mode 100644
index 00000000..41ef0796
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len
new file mode 100644
index 00000000..c580238d
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len
new file mode 100644
index 00000000..441535af
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at
new file mode 100644
index 00000000..f0f869e1
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i
new file mode 100644
index 00000000..ac12eb40
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len
new file mode 100644
index 00000000..131e2657
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab
new file mode 100644
index 00000000..360d79e4
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream
new file mode 100644
index 00000000..f68d02c2
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len
new file mode 100644
index 00000000..1d5d8b30
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len
new file mode 100644
index 00000000..6f4c5c86
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values
new file mode 100644
index 00000000..e6bda9ce
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at
new file mode 100644
index 00000000..89b2db32
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s
new file mode 100644
index 00000000..cf3b95b8
--- /dev/null
+++ b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s
@@ -0,0 +1 @@
+ÈFÒQÔJÂCûFÚIèM£÷BÝõÚùÕ*Ë!óÌü÷ÛöÙÁ3Ï$ÍÍÓÄÄÁÌÌÓøÜðæã-Ï#àæßßÿõßÄý0ý"ÃØÃÕÝä-Â6Ô*Ù#ýôÂÜìóüý0í:Æ-å#ñÄúòòòòÐ×î<ã$ûæ9×"æÚ÷/Éêâ"ùþêÅÅÜïÆÔæüÃïÌÌÙÉÁÜ:ë#èÜé\ËSïW×kÒmáVÙVâVÓVÓVÓVÓVÓVÓVÀY÷VÛV×XäXÃXúWécÀ]×û\ìxãyË{ØqÊmäjÇpÞoÙnØjÞuÇròsÿqíqÃrévÍtço÷oÔrþkÎpþ{ÒôzýzÕréoüzã|âyÄ|éxÔlØlÒlälÛuïuÅwÎkÐjôzáxÈyånÚkølÝqÙoÐføeÓhßfÐfÐfÐfõhðkÏkÿjåfÏšÚ›ëƒ×æ„ä…çŠÊ”ÄŒÀîÎþÉñÀȶá¹ÈºõÞ€Ô‰ÀjÕlæjükõkÞt÷ZÍ[è‡èÍuètäwÈró…ÀsörÿrÖ›ñ“ê‰ùz×yÃ{Ó}ãÛÌ|åy
\ No newline at end of file
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i
new file mode 100644
index 00000000..6329b103
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len
new file mode 100644
index 00000000..44244062
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/cacheable/last-build.bin b/coroutine-transform/build/kotlin/compileKotlin/cacheable/last-build.bin
new file mode 100644
index 00000000..25ac7309
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/cacheable/last-build.bin differ
diff --git a/coroutine-transform/build/kotlin/compileKotlin/local-state/build-history.bin b/coroutine-transform/build/kotlin/compileKotlin/local-state/build-history.bin
new file mode 100644
index 00000000..39a9780d
Binary files /dev/null and b/coroutine-transform/build/kotlin/compileKotlin/local-state/build-history.bin differ
diff --git a/coroutine-transform/build/kotlin/coroutinetransformjar-classes.txt b/coroutine-transform/build/kotlin/coroutinetransformjar-classes.txt
new file mode 100644
index 00000000..366d745b
--- /dev/null
+++ b/coroutine-transform/build/kotlin/coroutinetransformjar-classes.txt
@@ -0,0 +1 @@
+/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/java/main/cc/squiddev/cobalt/coroutine/lib/Demo.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/java/main/cc/squiddev/cobalt/coroutine/lib/Pause.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/java/main/cc/squiddev/cobalt/coroutine/lib/StateL1O0.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Block$Companion.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Block$DefaultImpls.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Block$dumpInstructions$1.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Block$iterator$1.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Block$reversed$1$iterator$1.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Block$reversed$1.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Block.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/BlockKt$extractBlocks$createBlock$1.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/BlockKt.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/DefinedValue.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Definition$Argument.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Definition$GetField.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Definition$Load.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Definition$Phi.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Definition$Unset.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Definition$Value.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/Definition.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/DefinitionData.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/DefinitionInterpreter.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/DefinitionScanner$DefinitionScanner.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/DefinitionScanner$Desc.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/DefinitionScanner.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/ExtensionsKt$asDebugString$1.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/ExtensionsKt.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/LocalValue$Default.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/LocalValue$Saved.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/LocalValue$Skip.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/LocalValue.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/MainKt.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/MethodRewriter.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/MethodRewriterKt.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/MutableBlock.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/PauseInstrumentation$visitMethod$1.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/PauseInstrumentation.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/StackValue$Constant.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/StackValue$Default.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/StackValue$Field.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/StackValue$Local.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/StackValue.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/StateClass.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/YieldPoint.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/YieldPointImpl.class:/home/squid/Documents/software/Cobalt/coroutine-transform/build/classes/kotlin/main/cc/squiddev/cobalt/coroutine/YieldPointKt.class
\ No newline at end of file
diff --git a/src/main/java/org/squiddev/cobalt/Constants.java b/src/main/java/org/squiddev/cobalt/Constants.java
index 1e20fca3..5099ec9f 100644
--- a/src/main/java/org/squiddev/cobalt/Constants.java
+++ b/src/main/java/org/squiddev/cobalt/Constants.java
@@ -241,6 +241,11 @@ public class Constants {
*/
public static final LuaString EMPTYSTRING = valueOf("");
+ /**
+ * The global loaded package table.
+ */
+ public static final LuaString LOADED = valueOf("_LOADED");
+
/**
* Constant limiting metatag loop processing
*/
diff --git a/src/main/java/org/squiddev/cobalt/GlobalRegistry.java b/src/main/java/org/squiddev/cobalt/GlobalRegistry.java
new file mode 100644
index 00000000..0f9f6cc0
--- /dev/null
+++ b/src/main/java/org/squiddev/cobalt/GlobalRegistry.java
@@ -0,0 +1,36 @@
+package org.squiddev.cobalt;
+
+/**
+ * The global registry, a store of Lua values
+ */
+public final class GlobalRegistry {
+ private final LuaTable table = new LuaTable();
+
+ GlobalRegistry() {
+ }
+
+ /**
+ * Get the underlying registry table.
+ *
+ * @return The global debug registry.
+ */
+ public LuaTable get() {
+ return table;
+ }
+
+ /**
+ * Get a subtable in the global {@linkplain #get()} registry table}. If the key exists but is not a table, then
+ * it will be overridden.
+ *
+ * @param name The name of the registry table.
+ * @return The subentry.
+ */
+ public LuaTable getSubTable(LuaString name) {
+ LuaValue value = table.rawget(name);
+ if (value.isTable()) return (LuaTable) value;
+
+ LuaTable newValue = new LuaTable();
+ table.rawset(name, newValue);
+ return newValue;
+ }
+}
diff --git a/src/main/java/org/squiddev/cobalt/LuaState.java b/src/main/java/org/squiddev/cobalt/LuaState.java
index 0c669d66..7a353604 100644
--- a/src/main/java/org/squiddev/cobalt/LuaState.java
+++ b/src/main/java/org/squiddev/cobalt/LuaState.java
@@ -28,12 +28,7 @@
import org.squiddev.cobalt.compiler.LuaC;
import org.squiddev.cobalt.debug.DebugHandler;
import org.squiddev.cobalt.debug.DebugHelpers;
-import org.squiddev.cobalt.lib.platform.FileResourceManipulator;
-import org.squiddev.cobalt.lib.platform.ResourceManipulator;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.util.TimeZone;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicInteger;
@@ -44,16 +39,6 @@
* Global lua state
*/
public final class LuaState {
- /**
- * The active input stream
- */
- public InputStream stdin;
-
- /**
- * The active output stream
- */
- public PrintStream stdout;
-
/**
* The metatable for all strings
*/
@@ -84,16 +69,6 @@ public final class LuaState {
*/
public LuaTable threadMetatable;
- /**
- * Lookup of loaded packages
- */
- public final LuaTable loadedPackages = new LuaTable();
-
- /**
- * The active resource manipulator
- */
- public final ResourceManipulator resourceManipulator;
-
/**
* The compiler for this threstate
*/
@@ -104,11 +79,6 @@ public final class LuaState {
*/
public final DebugHandler debug;
- /**
- * The timezone for this state, as used by {@code os}.
- */
- public final TimeZone timezone;
-
/**
* The currently executing thread
*/
@@ -136,29 +106,31 @@ public final class LuaState {
*/
private final ErrorReporter reportError;
+ private final GlobalRegistry registry = new GlobalRegistry();
+
public LuaState() {
this(new LuaState.Builder());
}
private LuaState(Builder builder) {
- stdin = builder.stdin;
- stdout = builder.stdout;
- stringMetatable = builder.stringMetatable;
- booleanMetatable = builder.booleanMetatable;
- numberMetatable = builder.numberMetatable;
- nilMetatable = builder.nilMetatable;
- functionMetatable = builder.functionMetatable;
- threadMetatable = builder.threadMetatable;
- resourceManipulator = builder.resourceManipulator;
compiler = builder.compiler;
debug = builder.debug;
- timezone = builder.timezone;
threader = new YieldThreader(builder.coroutineExecutor);
reportError = builder.reportError;
mainThread = currentThread = new LuaThread(this, new LuaTable());
}
+ /**
+ * Get the global registry, a Lua table used to store Lua values.
+ *
+ * @return The global debug registry.
+ */
+ public GlobalRegistry registry() {
+ return registry;
+ }
+
+
/**
* Abandon this state, instructing any pending thread to terminate.
*/
@@ -247,18 +219,8 @@ public static class Builder {
return thread;
});
- private InputStream stdin = System.in;
- private PrintStream stdout = System.out;
- private LuaTable stringMetatable;
- private LuaTable booleanMetatable;
- private LuaTable numberMetatable;
- private LuaTable nilMetatable;
- private LuaTable functionMetatable;
- private LuaTable threadMetatable;
- private ResourceManipulator resourceManipulator = new FileResourceManipulator();
private LoadState.LuaCompiler compiler = LuaC.INSTANCE;
private DebugHandler debug = DebugHandler.INSTANCE;
- private TimeZone timezone = TimeZone.getDefault();
private Executor coroutineExecutor = defaultCoroutineExecutor;
private ErrorReporter reportError;
@@ -271,111 +233,6 @@ public LuaState build() {
return new LuaState(this);
}
- /**
- * Set the initial standard input for this Lua state. This defaults to {@link System#in}.
- *
- * @param stdin The new standard input
- * @return This builder
- * @see LuaState#stdin
- */
- public Builder stdin(InputStream stdin) {
- if (stdin == null) throw new NullPointerException("stdin cannot be null");
- this.stdin = stdin;
- return this;
- }
-
- /**
- * Set the initial standard output for this Lua state. This defaults to {@link System#out}.
- *
- * @param stdout The new standard output
- * @return This builder
- * @see LuaState#stdout
- */
- public Builder stdout(PrintStream stdout) {
- if (stdout == null) throw new NullPointerException("stdout cannot be null");
- this.stdout = stdout;
- return this;
- }
-
- /**
- * Set the initial metatable for string values within this Lua State. This defaults to {@code null}.
- *
- * @param metatable The initial metatable
- * @return This builder
- */
- public Builder stringMetatable(LuaTable metatable) {
- stringMetatable = metatable;
- return this;
- }
-
- /**
- * Set the initial metatable for boolean values within this Lua State. This defaults to {@code null}.
- *
- * @param metatable The initial metatable
- * @return This builder
- */
- public Builder booleanMetatable(LuaTable metatable) {
- booleanMetatable = metatable;
- return this;
- }
-
- /**
- * Set the initial metatable for numeric values within this Lua State. This defaults to {@code null}.
- *
- * @param metatable The initial metatable
- * @return This builder
- */
- public Builder numberMetatable(LuaTable metatable) {
- numberMetatable = metatable;
- return this;
- }
-
- /**
- * Set the initial metatable for nil values within this Lua State. This defaults to {@code null}.
- *
- * @param metatable The initial metatable
- * @return This builder
- */
- public Builder nilMetatable(LuaTable metatable) {
- nilMetatable = metatable;
- return this;
- }
-
- /**
- * Set the initial metatable for functions within this Lua State. This defaults to {@code null}.
- *
- * @param metatable The initial metatable
- * @return This builder
- */
- public Builder functionMetatable(LuaTable metatable) {
- functionMetatable = metatable;
- return this;
- }
-
- /**
- * Set the initial metatable for threads within this Lua State. This defaults to {@code null}.
- *
- * @param metatable The initial metatable
- * @return This builder
- */
- public Builder threadMetatable(LuaTable metatable) {
- threadMetatable = metatable;
- return this;
- }
-
- /**
- * Set the resource manipulator that the {@code os} and {@code io} libraries will use. This defaults to a
- * {@link FileResourceManipulator}, which uses the default file system.
- *
- * @param resourceManipulator The new resource manipulator
- * @return This builder
- */
- public Builder resourceManipulator(ResourceManipulator resourceManipulator) {
- if (this.resourceManipulator == null) throw new NullPointerException("resourceManipulator cannot be null");
- this.resourceManipulator = resourceManipulator;
- return this;
- }
-
/**
* Set the compiler for this Lua state. This defaults to using the {@link LuaC} compiler.
*
@@ -400,18 +257,6 @@ public Builder debug(DebugHandler debug) {
return this;
}
- /**
- * Set the timezone for this Lua state.
- *
- * @param zone The new timezone
- * @return This builder
- */
- public Builder timezone(TimeZone zone) {
- if (zone == null) throw new NullPointerException("zone cannot be null");
- timezone = zone;
- return this;
- }
-
/**
* Set the coroutine executor for this state.
*
diff --git a/src/main/java/org/squiddev/cobalt/LuaTable.java b/src/main/java/org/squiddev/cobalt/LuaTable.java
index 48fa5bb9..956e6af6 100644
--- a/src/main/java/org/squiddev/cobalt/LuaTable.java
+++ b/src/main/java/org/squiddev/cobalt/LuaTable.java
@@ -24,9 +24,6 @@
*/
package org.squiddev.cobalt;
-import org.squiddev.cobalt.function.LuaFunction;
-import org.squiddev.cobalt.lib.LuaLibrary;
-
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
@@ -716,19 +713,6 @@ public LuaValue[] keys() throws LuaError {
return l.toArray(new LuaValue[l.size()]);
}
- /**
- * Load a library instance by setting its environment to {@code this}
- * and calling it, which should initialize the library instance and
- * install itself into this instance.
- *
- * @param state The current lua state
- * @param library The callable {@link LuaFunction} to load into {@code this}
- * @return {@link LuaValue} containing the result of the initialization call.
- */
- public LuaValue load(LuaState state, LuaLibrary library) {
- return library.add(state, this);
- }
-
//region Resizing
/**
diff --git a/src/main/java/org/squiddev/cobalt/LuaThread.java b/src/main/java/org/squiddev/cobalt/LuaThread.java
index 7e1c56a1..c82c3ed5 100644
--- a/src/main/java/org/squiddev/cobalt/LuaThread.java
+++ b/src/main/java/org/squiddev/cobalt/LuaThread.java
@@ -29,7 +29,7 @@
import org.squiddev.cobalt.debug.DebugState;
import org.squiddev.cobalt.function.LuaFunction;
import org.squiddev.cobalt.lib.CoroutineLib;
-import org.squiddev.cobalt.lib.jse.JsePlatform;
+import org.squiddev.cobalt.lib.CoreLibraries;
import java.lang.ref.WeakReference;
import java.util.Objects;
@@ -45,7 +45,7 @@
* A LuaThread is typically created in response to a scripted call to
* {@code coroutine.create()}
*
- * The utility class {@link JsePlatform}
+ * The utility class {@link CoreLibraries}
* sees to it that this initialization is done properly.
* For this reason it is highly recommended to use one of these classes
* when initializing globals.
@@ -55,7 +55,7 @@
* to manage call state, it is possible to yield from anywhere in luaj.
*
* @see LuaValue
- * @see JsePlatform
+ * @see CoreLibraries
* @see CoroutineLib
*/
public class LuaThread extends LuaValue {
diff --git a/src/main/java/org/squiddev/cobalt/LuaValue.java b/src/main/java/org/squiddev/cobalt/LuaValue.java
index 49811f1c..08617840 100644
--- a/src/main/java/org/squiddev/cobalt/LuaValue.java
+++ b/src/main/java/org/squiddev/cobalt/LuaValue.java
@@ -27,7 +27,7 @@
import org.squiddev.cobalt.compiler.LoadState;
import org.squiddev.cobalt.function.LuaClosure;
import org.squiddev.cobalt.function.LuaFunction;
-import org.squiddev.cobalt.lib.jse.JsePlatform;
+import org.squiddev.cobalt.lib.CoreLibraries;
import static org.squiddev.cobalt.Constants.*;
@@ -85,14 +85,14 @@
* }
* For this to work the file must be in the current directory, or in the class path,
* depending on the platform.
- * See {@link JsePlatform} for details.
+ * See {@link CoreLibraries} for details.
*
* In general a {@link LuaError} may be thrown on any operation when the
* types supplied to any operation are illegal from a lua perspective.
* Examples could be attempting to concatenate a NIL value, or attempting arithmetic
* on values that are not number.
*
- * @see JsePlatform
+ * @see CoreLibraries
* @see LoadState
* @see Varargs
*/
@@ -1132,15 +1132,13 @@ public LuaValue getfenv() {
/**
* Set the environment on an object.
*
- * Typically the environment is created once per application via a platform
- * helper method such as {@link JsePlatform#standardGlobals(LuaState)}
* However, any object can serve as an environment if it contains suitable metatag
* values to implement {@link OperationHelper#getTable(LuaState, LuaValue, LuaValue)} to provide the environment
* values.
*
* @param env {@link LuaValue} (typically a {@link LuaTable}) containing the environment.
* @return If the environment could be changed.
- * @see JsePlatform
+ * @see CoreLibraries
*/
public boolean setfenv(LuaTable env) {
return false;
diff --git a/src/main/java/org/squiddev/cobalt/cmd/lua.java b/src/main/java/org/squiddev/cobalt/cmd/lua.java
deleted file mode 100644
index 5bd5836e..00000000
--- a/src/main/java/org/squiddev/cobalt/cmd/lua.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Original Source: Copyright (c) 2009-2011 Luaj.org. All rights reserved.
- * Modifications: Copyright (c) 2015-2020 SquidDev
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-package org.squiddev.cobalt.cmd;
-
-import org.squiddev.cobalt.*;
-import org.squiddev.cobalt.compiler.CompileException;
-import org.squiddev.cobalt.compiler.LoadState;
-import org.squiddev.cobalt.function.LuaFunction;
-import org.squiddev.cobalt.lib.LuaLibrary;
-import org.squiddev.cobalt.lib.jse.JsePlatform;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.squiddev.cobalt.Constants.NONE;
-import static org.squiddev.cobalt.ValueFactory.*;
-
-/**
- * org.squiddev.cobalt.cmd.lua command for use in java se environments.
- */
-public class lua {
- private static final String version = Lua._VERSION + "Copyright (c) 2009 Luaj.org.org";
-
- private static final String usage =
- "usage: java -cp luaj-jse.jar org.squiddev.cobalt.cmd.lua [options] [script [args]].\n" +
- "Available options are:\n" +
- " -e stat execute string 'stat'\n" +
- " -l name require library 'name'\n" +
- " -i enter interactive mode after executing 'script'\n" +
- " -v show version information\n" +
- " -n nodebug - do not load debug library by default\n" +
- " -- stop handling options\n" +
- " - execute stdin and stop handling options";
-
- private static void usageExit() {
- System.out.println(usage);
- System.exit(-1);
- }
-
- private static LuaTable _G;
-
- public static void main(String[] args) throws IOException {
-
- // process args
- boolean interactive = (args.length == 0);
- boolean versioninfo = false;
- boolean processing = true;
- List libs = null;
- try {
- // stateful argument processing
- for (int i = 0; i < args.length; i++) {
- if (!processing || !args[i].startsWith("-")) {
- // input file - defer to last stage
- break;
- } else if (args[i].length() <= 1) {
- // input file - defer to last stage
- break;
- } else {
- switch (args[i].charAt(1)) {
- case 'e':
- if (++i >= args.length) {
- usageExit();
- }
- // input script - defer to last stage
- break;
- case 'l':
- if (++i >= args.length) {
- usageExit();
- }
- if (libs == null) libs = new ArrayList<>();
- libs.add(args[i]);
- break;
- case 'i':
- interactive = true;
- break;
- case 'v':
- versioninfo = true;
- break;
- case '-':
- if (args[i].length() > 2) {
- usageExit();
- }
- processing = false;
- break;
- default:
- usageExit();
- break;
- }
- }
- }
-
- // echo version
- if (versioninfo) {
- System.out.println(version);
- }
-
- // new org.squiddev.cobalt.cmd.lua state
- LuaState state = new LuaState();
- _G = JsePlatform.debugGlobals(state);
- for (int i = 0, n = libs != null ? libs.size() : 0; i < n; i++) {
- loadLibrary(state, libs.get(i));
- }
-
- // input script processing
- processing = true;
- for (int i = 0; i < args.length; i++) {
- if (!processing || !args[i].startsWith("-")) {
- processScript(state, new FileInputStream(args[i]), args[i], args, i, false);
- break;
- } else if ("-".equals(args[i])) {
- processScript(state, System.in, "=stdin", args, i, false);
- break;
- } else {
- switch (args[i].charAt(1)) {
- case 'l':
- ++i;
- break;
- case 'e':
- ++i;
- processScript(state, new ByteArrayInputStream(args[i].getBytes()), "string", args, i, false);
- break;
- case '-':
- processing = false;
- break;
- }
- }
- }
-
- if (interactive) {
- interactiveMode(state);
- }
-
- } catch (IOException ioe) {
- System.err.println(ioe.toString());
- System.exit(-2);
- }
- }
-
- private static void loadLibrary(LuaState state, String libname) throws IOException {
- LuaValue slibname = valueOf(libname);
- try {
- // load via plain require
- OperationHelper.noUnwind(state, () ->
- OperationHelper.call(state, OperationHelper.getTable(state, _G, valueOf("require")), slibname));
- } catch (Exception e) {
- try {
- // load as java class
- LuaLibrary v = Class.forName(libname).asSubclass(LuaLibrary.class).newInstance();
- v.add(state, _G);
- } catch (Exception f) {
- throw new IOException("loadLibrary(" + libname + ") failed: " + e + "," + f);
- }
- }
- }
-
- private static void processScript(LuaState state, InputStream script, String chunkname, String[] args, int firstarg, boolean printValue) throws IOException {
- try {
- LuaFunction c;
- try {
- c = LoadState.load(state, script, valueOf(chunkname), _G);
- } finally {
- script.close();
- }
- Varargs scriptargs = (args != null ? setGlobalArg(args, firstarg) : NONE);
- Varargs result = LuaThread.runMain(state, c, scriptargs);
-
- if (printValue && result != NONE) {
- OperationHelper.noUnwind(state, () ->
- OperationHelper.invoke(state, OperationHelper.getTable(state, _G, valueOf("print")), result));
- }
- } catch (CompileException e) {
- System.out.println();
- System.out.println(e.getMessage());
- } catch (LuaError e) {
- System.out.println();
- System.out.println(e.traceback);
- if (e.getCause() != null && e.getCause() != e) e.getCause().printStackTrace(System.out);
- } catch (Exception e) {
- System.out.println();
- e.printStackTrace(System.out);
- }
- }
-
- private static Varargs setGlobalArg(String[] args, int i) {
- LuaTable arg = tableOf();
- LuaValue[] values = new LuaValue[args.length];
- for (int j = 0; j < args.length; j++) {
- arg.rawset(j - i, values[j] = valueOf(args[j]));
- }
- _G.rawset("arg", arg);
- return varargsOf(values);
- }
-
- private static void interactiveMode(LuaState state) throws IOException {
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- while (true) {
- System.out.print("> ");
- System.out.flush();
- String line = reader.readLine();
- if (line == null) {
- return;
- }
- processScript(state, new ByteArrayInputStream(line.getBytes()), "=stdin", null, 0, true);
- }
- }
-}
diff --git a/src/main/java/org/squiddev/cobalt/cmd/luac.java b/src/main/java/org/squiddev/cobalt/cmd/luac.java
deleted file mode 100644
index 6ca2407e..00000000
--- a/src/main/java/org/squiddev/cobalt/cmd/luac.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Original Source: Copyright (c) 2009-2011 Luaj.org. All rights reserved.
- * Modifications: Copyright (c) 2015-2020 SquidDev
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-package org.squiddev.cobalt.cmd;
-
-import org.squiddev.cobalt.Lua;
-import org.squiddev.cobalt.LuaState;
-import org.squiddev.cobalt.Print;
-import org.squiddev.cobalt.Prototype;
-import org.squiddev.cobalt.compiler.DumpState;
-import org.squiddev.cobalt.compiler.LuaC;
-import org.squiddev.cobalt.lib.jse.JsePlatform;
-
-import java.io.*;
-
-import static org.squiddev.cobalt.ValueFactory.valueOf;
-
-
-/**
- * Compiler for org.squiddev.cobalt.cmd.lua files to org.squiddev.cobalt.cmd.lua bytecode.
- */
-public class luac {
- private static final String version = Lua._VERSION + "Copyright (C) 2009 luaj.org";
-
- private static final String usage =
- "usage: java -cp luaj-jse.jar org.squiddev.cobalt.cmd.luac [options] [filenames].\n" +
- "Available options are:\n" +
- " - process stdin\n" +
- " -l list\n" +
- " -o name output to file 'name' (default is \"org.squiddev.cobalt.cmd.luac.out\")\n" +
- " -p parse only\n" +
- " -s strip debug information\n" +
- " -E big endian format for numbers\n" +
- " -i number format 'n', (n=0,1 or 4, default=" + DumpState.NUMBER_FORMAT_DEFAULT + ")\n" +
- " -v show version information\n" +
- " -- stop handling options\n";
-
- private static void usageExit() {
- System.out.println(usage);
- System.exit(-1);
- }
-
- private boolean list = false;
- private String output = "luac.out";
- private boolean parseonly = false;
- private boolean stripdebug = false;
- private boolean littleendian = true;
- private int numberformat = DumpState.NUMBER_FORMAT_DEFAULT;
- private boolean versioninfo = false;
- private boolean processing = true;
-
- public static void main(String[] args) throws IOException {
- new luac(args);
- }
-
- private luac(String[] args) throws IOException {
-
- // process args
- try {
- // get stateful args
- for (int i = 0; i < args.length; i++) {
- if (!processing || !args[i].startsWith("-")) {
- // input file - defer to next stage
- } else if (args[i].length() <= 1) {
- // input file - defer to next stage
- } else {
- switch (args[i].charAt(1)) {
- case 'l':
- list = true;
- break;
- case 'o':
- if (++i >= args.length) {
- usageExit();
- }
- output = args[i];
- break;
- case 'p':
- parseonly = true;
- break;
- case 's':
- stripdebug = true;
- break;
- case 'E':
- littleendian = false;
- break;
- case 'i':
- if (args[i].length() <= 2) {
- usageExit();
- }
- numberformat = Integer.parseInt(args[i].substring(2));
- break;
- case 'v':
- versioninfo = true;
- break;
- case '-':
- if (args[i].length() > 2) {
- usageExit();
- }
- processing = false;
- break;
- default:
- usageExit();
- break;
- }
- }
- }
-
- // echo version
- if (versioninfo) {
- System.out.println(version);
- }
-
- // open output file
-
- // process input files
- OutputStream fos = new FileOutputStream(output);
- try {
- JsePlatform.standardGlobals(new LuaState());
- processing = true;
- for (int i = 0; i < args.length; i++) {
- if (!processing || !args[i].startsWith("-")) {
- processScript(new FileInputStream(args[i]), "@" + args[i], fos);
- } else if (args[i].length() <= 1) {
- processScript(System.in, "=stdin", fos);
- } else {
- switch (args[i].charAt(1)) {
- case 'o':
- ++i;
- break;
- case '-':
- processing = false;
- break;
- }
- }
- }
- } finally {
- fos.close();
- }
-
- } catch (IOException ioe) {
- System.err.println(ioe.toString());
- System.exit(-2);
- }
- }
-
- private void processScript(InputStream script, String chunkname, OutputStream out) throws IOException {
- try {
- // create the chunk
- Prototype chunk = LuaC.compile(script, valueOf(chunkname));
-
- // list the chunk
- if (list) {
- Print.printCode(new PrintWriter(System.out), chunk, false);
- }
-
- // write out the chunk
- if (!parseonly) {
- DumpState.dump(chunk, out, stripdebug, numberformat, littleendian);
- }
-
- } catch (Exception e) {
- e.printStackTrace(System.err);
- } finally {
- script.close();
- }
- }
-}
diff --git a/src/main/java/org/squiddev/cobalt/compiler/LoadState.java b/src/main/java/org/squiddev/cobalt/compiler/LoadState.java
index 4b3b691d..20cbd110 100644
--- a/src/main/java/org/squiddev/cobalt/compiler/LoadState.java
+++ b/src/main/java/org/squiddev/cobalt/compiler/LoadState.java
@@ -31,7 +31,7 @@
import org.squiddev.cobalt.function.LuaClosure;
import org.squiddev.cobalt.function.LuaFunction;
import org.squiddev.cobalt.function.LuaInterpretedFunction;
-import org.squiddev.cobalt.lib.jse.JsePlatform;
+import org.squiddev.cobalt.lib.CoreLibraries;
import java.io.IOException;
import java.io.InputStream;
@@ -55,7 +55,7 @@
*
* Prior to loading code, a compiler should be installed.
*
- * By default, when using {@link JsePlatform} to construct globals, the {@link LuaC} compiler is installed.
+ * By default, when using {@link CoreLibraries} to construct globals, the {@link LuaC} compiler is installed.
*
* @see LuaCompiler
* @see LuaClosure
diff --git a/src/main/java/org/squiddev/cobalt/compiler/LuaC.java b/src/main/java/org/squiddev/cobalt/compiler/LuaC.java
index cfd47b86..fbba44a9 100644
--- a/src/main/java/org/squiddev/cobalt/compiler/LuaC.java
+++ b/src/main/java/org/squiddev/cobalt/compiler/LuaC.java
@@ -31,7 +31,7 @@
import org.squiddev.cobalt.function.LuaFunction;
import org.squiddev.cobalt.function.LuaInterpretedFunction;
import org.squiddev.cobalt.lib.BaseLib;
-import org.squiddev.cobalt.lib.jse.JsePlatform;
+import org.squiddev.cobalt.lib.CoreLibraries;
import java.io.IOException;
import java.io.InputStream;
@@ -53,7 +53,7 @@
* lua bytecode compiling and java bytecode compiling.
*
* The {@link LuaC} compiler is installed by default by the
- * {@link JsePlatform} class
+ * {@link CoreLibraries} class
* so in the following example, the default {@link LuaC} compiler
* will be used:
*
@@ -100,7 +99,7 @@
* data it needs to and place it into the environment if needed.
* In this case, it creates two function, 'sinh', and 'cosh', and puts
* them into a global table called 'hyperbolic.'
- * It placed the library table into the globals via the {@link #env}
+ * It placed the library table into the globals via the {@link #getfenv()}
* local variable which corresponds to the globals that apply when the
* library is loaded.
*
@@ -130,20 +129,12 @@
* such as {@link BaseLib} or {@link TableLib} for other examples.
*/
public abstract class LibFunction extends LuaFunction {
-
- /**
- * User-defined opcode to differentiate between instances of the library function class.
- *
- * Subclass will typicall switch on this value to provide the specific behavior for each function.
- */
- protected int opcode;
-
/**
* The common name for this function, useful for debugging.
*
* Binding functions initialize this to the name to which it is bound.
*/
- protected String name;
+ String name;
/**
* Default constructor for use by subclasses
@@ -156,22 +147,8 @@ public String debugName() {
return name != null ? name : super.toString();
}
- /**
- * Bind a set of library functions.
- *
- * An array of names is provided, and the first name is bound
- * with opcode = 0, second with 1, etc.
- *
- * @param env The environment to apply to each bound function
- * @param factory The factory to provide a new instance each time
- * @param names Array of function names
- */
- public static void bind(LuaTable env, Supplier factory, String[] names) {
- for (int i = 0; i < names.length; i++) {
- LibFunction f = factory.get();
- f.opcode = i;
- f.name = names[i];
- env.rawset(f.name, f);
- }
+ public static void setGlobalLibrary(LuaState state, LuaTable env, String name, LuaValue library) {
+ env.rawset(name, library);
+ state.registry().getSubTable(Constants.LOADED).rawset(name, library);
}
}
diff --git a/src/main/java/org/squiddev/cobalt/lib/BaseLib.java b/src/main/java/org/squiddev/cobalt/lib/BaseLib.java
index 7ca24d3c..5ef79a91 100644
--- a/src/main/java/org/squiddev/cobalt/lib/BaseLib.java
+++ b/src/main/java/org/squiddev/cobalt/lib/BaseLib.java
@@ -30,63 +30,41 @@
import org.squiddev.cobalt.debug.DebugHandler;
import org.squiddev.cobalt.debug.DebugState;
import org.squiddev.cobalt.function.*;
-import org.squiddev.cobalt.lib.jse.JsePlatform;
-import org.squiddev.cobalt.lib.platform.ResourceManipulator;
+import org.squiddev.cobalt.lib.system.ResourceLoader;
import java.io.InputStream;
-import static org.squiddev.cobalt.OperationHelper.noUnwind;
import static org.squiddev.cobalt.ValueFactory.valueOf;
import static org.squiddev.cobalt.ValueFactory.varargsOf;
import static org.squiddev.cobalt.debug.DebugFrame.FLAG_ERROR;
import static org.squiddev.cobalt.debug.DebugFrame.FLAG_YPCALL;
/**
- * Subclass of {@link LibFunction} which implements the lua basic library functions.
- *
- * This contains all library functions listed as "basic functions" in the lua documentation for JME.
- * The functions dofile and loadfile use the
- * {@link LuaState#resourceManipulator} instance to find resource files.
- * The default loader chain in {@link PackageLib} will use these as well.
- *
- * This is a direct port of the corresponding library in C.
+ * The basic global libraries in the Lua runtime.
*
- * @see ResourceManipulator
+ * @see ResourceLoader
* @see LibFunction
- * @see JsePlatform
+ * @see CoreLibraries
* @see http://www.lua.org/manual/5.1/manual.html#5.1
*/
-public class BaseLib implements LuaLibrary {
- private static final LuaString STDIN_STR = valueOf("=stdin");
+public class BaseLib {
private static final LuaString FUNCTION_STR = valueOf("function");
private static final LuaString LOAD_MODE = valueOf("bt");
private LuaValue next;
private LuaValue inext;
- private static final String[] LIBR_KEYS = {
- "pcall", // (f, arg1, ...) -> status, result1, ...
- "xpcall", // (f, err) -> result1, ...
- "load", // ( func [,chunkname] ) -> chunk | nil, msg
- };
-
- @Override
- public LuaValue add(LuaState state, LuaTable env) {
+ public void add(LuaTable env) {
env.rawset("_G", env);
- env.rawset("_VERSION", valueOf(Lua._VERSION));
+ env.rawset("_VERSION", valueOf("Lua 5.1"));
RegisteredFunction.bind(env, new RegisteredFunction[]{
- RegisteredFunction.of("collectgarbage", BaseLib::collectgarbage),
RegisteredFunction.of("error", BaseLib::error),
RegisteredFunction.ofV("setfenv", BaseLib::setfenv),
RegisteredFunction.ofV("assert", BaseLib::assert_),
- RegisteredFunction.ofV("dofile", BaseLib::dofile),
RegisteredFunction.ofV("getfenv", BaseLib::getfenv),
RegisteredFunction.ofV("getmetatable", BaseLib::getmetatable),
- RegisteredFunction.ofV("loadfile", BaseLib::loadfile),
RegisteredFunction.ofV("loadstring", BaseLib::loadstring),
- RegisteredFunction.ofV("print", BaseLib::print),
RegisteredFunction.ofV("select", BaseLib::select),
- RegisteredFunction.ofV("unpack", BaseLib::unpack),
RegisteredFunction.ofV("type", BaseLib::type),
RegisteredFunction.ofV("rawequal", BaseLib::rawequal),
RegisteredFunction.ofV("rawget", BaseLib::rawget),
@@ -98,35 +76,14 @@ public LuaValue add(LuaState state, LuaTable env) {
RegisteredFunction.ofV("ipairs", this::ipairs),
RegisteredFunction.ofV("rawlen", BaseLib::rawlen),
RegisteredFunction.ofV("next", BaseLib::next),
+ RegisteredFunction.ofFactory("pcall", PCall::new),
+ RegisteredFunction.ofFactory("xpcall", XpCall::new),
+ RegisteredFunction.ofFactory("load", Load::new),
});
- LibFunction.bind(env, BaseLibR::new, LIBR_KEYS);
// remember next, and inext for use in pairs and ipairs
next = env.rawget("next");
inext = RegisteredFunction.ofV("inext", BaseLib::inext).create();
-
- env.rawset("_VERSION", valueOf("Lua 5.1"));
-
- return env;
- }
-
- private static LuaValue collectgarbage(LuaState state, LuaValue arg1, LuaValue arg2) throws LuaError {
- // collectgarbage( opt [,arg] ) -> value
- String s = arg1.optString("collect");
- switch (s) {
- case "collect":
- System.gc();
- return Constants.ZERO;
- case "count":
- Runtime rt = Runtime.getRuntime();
- long used = rt.totalMemory() - rt.freeMemory();
- return valueOf(used / 1024.);
- case "step":
- System.gc();
- return Constants.TRUE;
- default:
- throw ErrorFactory.argError(1, "invalid option");
- }
}
private static LuaValue error(LuaState state, LuaValue arg1, LuaValue arg2) throws LuaError {
@@ -169,17 +126,6 @@ private static Varargs assert_(LuaState state, Varargs args) throws LuaError {
return args;
}
- private static Varargs dofile(LuaState state, Varargs args) throws LuaError, UnwindThrowable {
- // dofile( filename ) -> result1, ...
- Varargs v = args.isNil(1) ?
- BaseLib.loadStream(state, state.stdin, STDIN_STR) :
- BaseLib.loadFile(state, args.arg(1).checkString());
- if (v.isNil(1)) {
- throw new LuaError(v.arg(2).toString());
- } else {
- return OperationHelper.invoke(state, v.first(), Constants.NONE);
- }
- }
private static Varargs getfenv(LuaState state, Varargs args) throws LuaError {
// getfenv( [f] ) -> env
@@ -197,34 +143,12 @@ private static Varargs getmetatable(LuaState state, Varargs args) throws LuaErro
return mt != null ? mt.rawget(Constants.METATABLE).optValue(mt) : Constants.NIL;
}
- private static Varargs loadfile(LuaState state, Varargs args) throws LuaError {
- // loadfile( [filename] ) -> chunk | nil, msg
- return args.isNil(1) ?
- BaseLib.loadStream(state, state.stdin, STDIN_STR) :
- BaseLib.loadFile(state, args.arg(1).checkString());
- }
-
private static Varargs loadstring(LuaState state, Varargs args) throws LuaError {
// loadstring( string [,chunkname] ) -> chunk | nil, msg
LuaString script = args.arg(1).checkLuaString();
return BaseLib.loadStream(state, script.toInputStream(), args.arg(2).optLuaString(script));
}
- private static Varargs print(LuaState state, Varargs args) throws LuaError {
- // print(...) -> void
- return noUnwind(state, () -> {
- LuaValue tostring = OperationHelper.getTable(state, state.getCurrentThread().getfenv(), valueOf("tostring"));
- for (int i = 1, n = args.count(); i <= n; i++) {
- if (i > 1) state.stdout.write('\t');
- LuaString s = OperationHelper.call(state, tostring, args.arg(i)).strvalue();
- int z = s.indexOf((byte) 0, 0);
- state.stdout.write(s.bytes, s.offset, z >= 0 ? z : s.length);
- }
- state.stdout.println();
- return Constants.NONE;
- });
- }
-
private static Varargs select(LuaState state, Varargs args) throws LuaError {
// select(f, ...) -> value1, ...
int n = args.count() - 1;
@@ -234,24 +158,6 @@ private static Varargs select(LuaState state, Varargs args) throws LuaError {
return args.subargs(i < 0 ? n + i + 2 : i + 1);
}
- private static Varargs unpack(LuaState state, Varargs args) throws LuaError {
- // unpack(list [,i [,j]]) -> result1, ...
- int na = args.count();
- LuaTable t = args.arg(1).checkTable();
- int n = t.length();
- int i = na >= 2 ? args.arg(2).optInteger(1) : 1;
- int j = na >= 3 ? args.arg(3).optInteger(n) : n;
- n = j - i + 1;
- if (n < 0) return Constants.NONE;
- if (n == 1) return t.rawget(i);
- if (n == 2) return varargsOf(t.rawget(i), t.rawget(j));
- LuaValue[] v = new LuaValue[n];
- for (int k = 0; k < n; k++) {
- v[k] = t.rawget(i + k);
- }
- return varargsOf(v);
- }
-
private static Varargs type(LuaState state, Varargs args) throws LuaError {
// type(v) -> value
return valueOf(args.checkValue(1).typeName());
@@ -348,93 +254,95 @@ private static Varargs inext(LuaState state, Varargs args) throws LuaError {
return args.arg(1).checkTable().inext(args.arg(2));
}
- private static class BaseLibR extends ResumableVarArgFunction {
+ // pcall(f, arg1, ...) -> status, result1, ...
+ private static class PCall extends ResumableVarArgFunction {
@Override
protected Varargs invoke(LuaState state, DebugFrame di, Varargs args) throws LuaError, UnwindThrowable {
- switch (opcode) {
- case 0: // "pcall", // (f, arg1, ...) -> status, result1, ...
- return pcall(state, di, args.checkValue(1), args.subargs(2), null);
- case 1: // "xpcall", // (f, err) -> result1, ...
- return pcall(state, di, args.checkValue(1), Constants.NONE, args.checkValue(2));
-
- case 2: // "load", // ( func|str [,chunkname[, mode[, env]]] ) -> chunk | nil, msg
- {
- LuaValue scriptGen = args.arg(1);
- LuaString chunkName = args.arg(2).optLuaString(null);
- LuaString mode = args.arg(3).optLuaString(LOAD_MODE);
- LuaTable funcEnv = args.arg(4).optTable(state.getCurrentThread().getfenv());
-
- // If we're a string, load as normal
- LuaValue script = scriptGen.toLuaString();
- if (!script.isNil()) {
- try {
- return LoadState.load(state, ((LuaString) script).toInputStream(), chunkName == null ? (LuaString) script : chunkName, mode, funcEnv);
- } catch (Exception e) {
- return varargsOf(Constants.NIL, LuaError.getMessage(e));
- }
- }
+ return pcallInit(state, di, args.checkValue(1), args.subargs(2), null);
+ }
- LuaFunction function = scriptGen.checkFunction();
- Varargs result = pcall(state, di, new ZeroArgFunction() {
- @Override
- public LuaValue call(LuaState state) throws LuaError {
- try {
- InputStream stream = new StringInputStream(state, function);
- return LoadState.load(state, stream, chunkName == null ? FUNCTION_STR : chunkName, mode, funcEnv);
- } catch (Exception e) {
- throw LuaError.wrapMessage(e);
- }
- }
- }, Constants.NONE, state.getCurrentThread().getErrorFunc());
-
- if (result.first().toBoolean()) {
- return result.arg(2);
- } else {
- return varargsOf(Constants.NIL, result.arg(2));
- }
- }
- default:
- return Constants.NONE;
- }
+ @Override
+ protected Varargs resumeThis(LuaState state, PCallState info, Varargs value) {
+ pcallFinishSuccess(state, info);
+ return info.errored ? varargsOf(Constants.FALSE, value.first()) : varargsOf(Constants.TRUE, value);
}
@Override
- protected Varargs resumeThis(LuaState state, PCallState pState, Varargs value) {
- state.getCurrentThread().setErrorFunc(pState.oldErrorFunc);
+ protected Varargs resumeErrorThis(LuaState state, PCallState object, LuaError error) throws UnwindThrowable {
+ LuaValue result = pcallFinishError(state, object, error);
+ return varargsOf(Constants.FALSE, result);
+ }
+ }
- if (pState.errored) closeUntil(state, pState.frame);
- return finish(pState, value);
+ // xpcall(f, err) -> result1, ...
+ private static class XpCall extends ResumableVarArgFunction {
+ @Override
+ protected Varargs invoke(LuaState state, DebugFrame di, Varargs args) throws LuaError, UnwindThrowable {
+ return pcallInit(state, di, args.checkValue(1), Constants.NONE, args.checkValue(2));
}
@Override
- public Varargs resumeErrorThis(LuaState state, PCallState pState, LuaError error) throws UnwindThrowable {
- LuaValue value;
- if (pState.errored) {
- value = valueOf("error in error handling");
+ protected Varargs resumeThis(LuaState state, PCallState info, Varargs value) {
+ pcallFinishSuccess(state, info);
+ return info.errored ? varargsOf(Constants.FALSE, value.first()) : varargsOf(Constants.TRUE, value);
+ }
+
+ @Override
+ protected Varargs resumeErrorThis(LuaState state, PCallState object, LuaError error) throws UnwindThrowable {
+ LuaValue result = pcallFinishError(state, object, error);
+ return varargsOf(Constants.FALSE, result);
+ }
+ }
+
+ // load( func|str [,chunkname[, mode[, env]]] ) -> chunk | nil, msg
+ private static class Load extends ResumableVarArgFunction {
+ @Override
+ protected Varargs invoke(LuaState state, DebugFrame di, Varargs args) throws LuaError, UnwindThrowable {
+ LuaValue scriptGen = args.arg(1);
+ LuaString chunkName = args.arg(2).optLuaString(null);
+ LuaString mode = args.arg(3).optLuaString(LOAD_MODE);
+ LuaTable funcEnv = args.arg(4).optTable(state.getCurrentThread().getfenv());
+
+ // If we're a string, load as normal
+ LuaValue script = scriptGen.toLuaString();
+ if (!script.isNil()) {
+ try {
+ return LoadState.load(state, ((LuaString) script).toInputStream(), chunkName == null ? (LuaString) script : chunkName, mode, funcEnv);
+ } catch (Exception e) {
+ return varargsOf(Constants.NIL, LuaError.getMessage(e));
+ }
+ }
+
+ LuaFunction function = scriptGen.checkFunction();
+ Varargs result = pcallInit(state, di, new ZeroArgFunction() {
+ @Override
+ public LuaValue call(LuaState state) throws LuaError {
+ try {
+ InputStream stream = new StringInputStream(state, function);
+ return LoadState.load(state, stream, chunkName == null ? FUNCTION_STR : chunkName, mode, funcEnv);
+ } catch (Exception e) {
+ throw LuaError.wrapMessage(e);
+ }
+ }
+ }, Constants.NONE, state.getCurrentThread().getErrorFunc());
+
+ if (result.first().toBoolean()) {
+ return result.arg(2);
} else {
- // Mark this frame as errored, meaning it will not be resumed.
- DebugHandler.getDebugState(state).getStackUnsafe().flags |= FLAG_ERROR;
- // And mark us as being in the error handler.
- pState.errored = true;
- error.fillTraceback(state);
- value = error.value;
+ return varargsOf(Constants.NIL, result.arg(2));
}
+ }
- state.getCurrentThread().setErrorFunc(pState.oldErrorFunc);
- closeUntil(state, pState.frame);
- return finish(pState, value);
+ @Override
+ protected Varargs resumeThis(LuaState state, PCallState pState, Varargs value) {
+ pcallFinishSuccess(state, pState);
+ return pState.errored ? varargsOf(Constants.NIL, value) : value;
}
- private Varargs finish(PCallState pState, Varargs value) {
- switch (opcode) {
- case 0:
- case 1:
- return pState.errored ? varargsOf(Constants.FALSE, value) : varargsOf(Constants.TRUE, value);
- case 2:
- return pState.errored ? varargsOf(Constants.NIL, value) : value;
- default:
- throw new NonResumableException("Cannot resume " + debugName());
- }
+ @Override
+ public Varargs resumeErrorThis(LuaState state, PCallState pState, LuaError error) throws UnwindThrowable {
+ LuaValue result = pcallFinishError(state, pState, error);
+ return varargsOf(Constants.NIL, result);
}
}
@@ -444,8 +352,10 @@ private static final class PCallState {
boolean errored = false;
}
- private static Varargs pcall(LuaState state, DebugFrame di, LuaValue func, Varargs args, LuaValue errFunc) throws
- UnwindThrowable {
+ private static Varargs pcallInit(LuaState state, DebugFrame di, LuaValue func, Varargs args, LuaValue errFunc) throws UnwindThrowable {
+ // FIXME: Move this into a core part of the runtime, so it's not part of library code!
+ // We really should clean up LuaError at the same time.
+
// Mark this frame as being an error handler
PCallState pState = new PCallState();
di.state = pState;
@@ -475,6 +385,30 @@ private static Varargs pcall(LuaState state, DebugFrame di, LuaValue func, Varar
}
}
+ private static void pcallFinishSuccess(LuaState state, PCallState pState) {
+ state.getCurrentThread().setErrorFunc(pState.oldErrorFunc);
+ if (pState.errored) closeUntil(state, pState.frame);
+ }
+
+ private static LuaValue pcallFinishError(LuaState state, PCallState pState, LuaError error) throws UnwindThrowable {
+ LuaValue value;
+ if (pState.errored) {
+ value = valueOf("error in error handling");
+ } else {
+ // Mark this frame as errored, meaning it will not be resumed.
+ DebugHandler.getDebugState(state).getStackUnsafe().flags |= FLAG_ERROR;
+ // And mark us as being in the error handler.
+ pState.errored = true;
+ error.fillTraceback(state);
+ value = error.value;
+ }
+
+ state.getCurrentThread().setErrorFunc(pState.oldErrorFunc);
+ closeUntil(state, pState.frame);
+
+ return value;
+ }
+
private static void closeUntil(LuaState state, DebugFrame top) {
DebugState ds = DebugHandler.getDebugState(state);
DebugHandler handler = state.debug;
@@ -486,30 +420,7 @@ private static void closeUntil(LuaState state, DebugFrame top) {
}
}
- /**
- * Load from a named file, returning the chunk or nil,error of can't load
- *
- * @param state The current lua state
- * @param filename Name of the file
- * @return Varargs containing chunk, or NIL,error-text on error
- */
- public static Varargs loadFile(LuaState state, String filename) {
- InputStream is = state.resourceManipulator.findResource(filename);
- if (is == null) {
- return varargsOf(Constants.NIL, valueOf("cannot open " + filename + ": No such file or directory"));
- }
- try {
- return loadStream(state, is, valueOf("@" + filename));
- } finally {
- try {
- is.close();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- private static Varargs loadStream(LuaState state, InputStream is, LuaString chunkname) {
+ public static Varargs loadStream(LuaState state, InputStream is, LuaString chunkname) {
try {
if (is == null) {
return varargsOf(Constants.NIL, valueOf("not found: " + chunkname));
diff --git a/src/main/java/org/squiddev/cobalt/lib/Bit32Lib.java b/src/main/java/org/squiddev/cobalt/lib/Bit32Lib.java
index 1af773fa..cb4953cf 100644
--- a/src/main/java/org/squiddev/cobalt/lib/Bit32Lib.java
+++ b/src/main/java/org/squiddev/cobalt/lib/Bit32Lib.java
@@ -25,6 +25,7 @@
package org.squiddev.cobalt.lib;
import org.squiddev.cobalt.*;
+import org.squiddev.cobalt.function.LibFunction;
import org.squiddev.cobalt.function.RegisteredFunction;
import static org.squiddev.cobalt.ErrorFactory.argError;
@@ -33,11 +34,9 @@
/**
* Subclass of LibFunction that implements the Lua standard {@code bit32} library.
*/
-public class Bit32Lib implements LuaLibrary {
- @Override
- public LuaValue add(LuaState state, LuaTable env) {
- LuaTable t = new LuaTable();
- RegisteredFunction.bind(t, new RegisteredFunction[]{
+public class Bit32Lib {
+ public static void add(LuaState state, LuaTable env) {
+ LibFunction.setGlobalLibrary(state, env, "bit32", RegisteredFunction.bind(new RegisteredFunction[]{
RegisteredFunction.ofV("band", Bit32Lib::band),
RegisteredFunction.of("bnot", Bit32Lib::bnot),
RegisteredFunction.ofV("bor", Bit32Lib::bor),
@@ -50,11 +49,7 @@ public LuaValue add(LuaState state, LuaTable env) {
RegisteredFunction.of("lshift", Bit32Lib::lshift),
RegisteredFunction.of("rrotate", Bit32Lib::rrotate),
RegisteredFunction.of("rshift", Bit32Lib::rshift),
- });
-
- env.rawset("bit32", t);
- state.loadedPackages.rawset("bit32", t);
- return t;
+ }));
}
private static Varargs band(LuaState state, Varargs args) throws LuaError {
diff --git a/src/main/java/org/squiddev/cobalt/lib/LuaLibrary.java b/src/main/java/org/squiddev/cobalt/lib/CoreLibraries.java
similarity index 51%
rename from src/main/java/org/squiddev/cobalt/lib/LuaLibrary.java
rename to src/main/java/org/squiddev/cobalt/lib/CoreLibraries.java
index ed210080..404a0599 100644
--- a/src/main/java/org/squiddev/cobalt/lib/LuaLibrary.java
+++ b/src/main/java/org/squiddev/cobalt/lib/CoreLibraries.java
@@ -26,18 +26,47 @@
import org.squiddev.cobalt.LuaState;
import org.squiddev.cobalt.LuaTable;
-import org.squiddev.cobalt.LuaValue;
+import org.squiddev.cobalt.lib.system.SystemLibraries;
/**
- * A library for the environment
+ * The {@link CoreLibraries} class is a convenience class to standardize install "core" (i.e.
+ * non-{@linkplain SystemLibraries system}) into the global state.
*/
-public interface LuaLibrary {
+public final class CoreLibraries {
+ private CoreLibraries() {
+ }
+
+ /**
+ * Create a standard set of globals and setup a thread
+ *
+ * @param state The current lua state
+ * @return Table of globals initialized with the standard JSE libraries
+ * @see #debugGlobals(LuaState)
+ * @see CoreLibraries
+ */
+ public static LuaTable standardGlobals(LuaState state) {
+ LuaTable globals = state.getMainThread().getfenv();
+ new BaseLib().add(globals);
+ TableLib.add(state, globals);
+ StringLib.add(state, globals);
+ CoroutineLib.add(state, globals);
+ new MathLib().add(state, globals);
+ new Utf8Lib().add(state, globals);
+ return globals;
+ }
+
/**
- * Add this library into an environment
+ * Create standard globals including the {@link DebugLib} library.
*
- * @param state The current Lua state
- * @param environment The environment to add to
- * @return The sub-table that was added
+ * @param state The current lua state
+ * @return Table of globals initialized with the standard JSE and debug libraries
+ * @see #standardGlobals(LuaState)
+ * @see CoreLibraries
+ * @see DebugLib
*/
- LuaValue add(LuaState state, LuaTable environment);
+ public static LuaTable debugGlobals(LuaState state) {
+ LuaTable _G = standardGlobals(state);
+ DebugLib.add(state, _G);
+ return _G;
+ }
}
diff --git a/src/main/java/org/squiddev/cobalt/lib/CoroutineLib.java b/src/main/java/org/squiddev/cobalt/lib/CoroutineLib.java
index 366830b3..c5a12eae 100644
--- a/src/main/java/org/squiddev/cobalt/lib/CoroutineLib.java
+++ b/src/main/java/org/squiddev/cobalt/lib/CoroutineLib.java
@@ -29,8 +29,8 @@
import org.squiddev.cobalt.debug.DebugFrame;
import org.squiddev.cobalt.function.LibFunction;
import org.squiddev.cobalt.function.LuaFunction;
+import org.squiddev.cobalt.function.RegisteredFunction;
import org.squiddev.cobalt.function.ResumableVarArgFunction;
-import org.squiddev.cobalt.lib.jse.JsePlatform;
import static org.squiddev.cobalt.ValueFactory.valueOf;
import static org.squiddev.cobalt.ValueFactory.varargsOf;
@@ -39,7 +39,7 @@
/**
* Subclass of {@link LibFunction} which implements the lua standard {@code coroutine}
* library.
- *
+ *
* The coroutine library in luaj has the same behavior as the
* coroutine library in C, but is implemented using Java Threads to maintain
* the call state between invocations. Therefore it can be yielded from anywhere,
@@ -48,101 +48,97 @@
* may not be collected by the garbage collector.
*
* @see LibFunction
- * @see JsePlatform
+ * @see CoreLibraries
* @see http://www.lua.org/manual/5.1/manual.html#5.2
*/
-public class CoroutineLib extends ResumableVarArgFunction