From a289d9d8d607c01e81d0082ea90614ec36565c6a Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Fri, 11 Feb 2022 09:53:29 +0100 Subject: [PATCH] Add ability to access language classes --- .../Java.class/class/languageClass..st | 3 +++ .../Java.class/class/primitiveLoadLanguageClass..st | 4 ++++ .../Java.class/methodProperties.json | 2 ++ .../JavaTest.class/instance/testLanguageClass.st | 3 +++ .../JavaTest.class/methodProperties.json | 3 ++- 5 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 src/TruffleSqueak-Core.package/Java.class/class/languageClass..st create mode 100644 src/TruffleSqueak-Core.package/Java.class/class/primitiveLoadLanguageClass..st create mode 100644 src/TruffleSqueak-Tests.package/JavaTest.class/instance/testLanguageClass.st diff --git a/src/TruffleSqueak-Core.package/Java.class/class/languageClass..st b/src/TruffleSqueak-Core.package/Java.class/class/languageClass..st new file mode 100644 index 000000000..457fba274 --- /dev/null +++ b/src/TruffleSqueak-Core.package/Java.class/class/languageClass..st @@ -0,0 +1,3 @@ +experimental +languageClass: aSymbol + ^ self primitiveLoadLanguageClass: aSymbol \ No newline at end of file diff --git a/src/TruffleSqueak-Core.package/Java.class/class/primitiveLoadLanguageClass..st b/src/TruffleSqueak-Core.package/Java.class/class/primitiveLoadLanguageClass..st new file mode 100644 index 000000000..4602291ed --- /dev/null +++ b/src/TruffleSqueak-Core.package/Java.class/class/primitiveLoadLanguageClass..st @@ -0,0 +1,4 @@ +primitives internal +primitiveLoadLanguageClass: aSymbol + + self error: aSymbol, ' not found' \ No newline at end of file diff --git a/src/TruffleSqueak-Core.package/Java.class/methodProperties.json b/src/TruffleSqueak-Core.package/Java.class/methodProperties.json index 0bc8e2db7..64c689842 100644 --- a/src/TruffleSqueak-Core.package/Java.class/methodProperties.json +++ b/src/TruffleSqueak-Core.package/Java.class/methodProperties.json @@ -5,9 +5,11 @@ "asInteger:" : "fn 3/9/2021 13:58", "asString:" : "fn 3/9/2021 13:59", "asTriState:" : "fn 3/4/2021 11:55", + "languageClass:" : "fn 2/11/2022 09:39", "parseExceptionType" : "fn 3/4/2021 12:04", "primitiveAddToHostClassPath:" : "fn 6/26/2021 14:36", "primitiveIsHostLookupAllowed" : "fn 11/4/2019 00:01", + "primitiveLoadLanguageClass:" : "fn 2/11/2022 09:39", "primitiveLookupHostSymbol:" : "fn 11/13/2019 16:13", "runtimeExceptionType" : "fn 3/4/2021 12:03", "throwAsPolyglotException:" : "fn 3/5/2021 16:54", diff --git a/src/TruffleSqueak-Tests.package/JavaTest.class/instance/testLanguageClass.st b/src/TruffleSqueak-Tests.package/JavaTest.class/instance/testLanguageClass.st new file mode 100644 index 000000000..d6324f2f6 --- /dev/null +++ b/src/TruffleSqueak-Tests.package/JavaTest.class/instance/testLanguageClass.st @@ -0,0 +1,3 @@ +testing +testLanguageClass + self assert: (Java languageClass: 'de.hpi.swa.trufflesqueak.util.MiscUtils') getUptime > 0 \ No newline at end of file diff --git a/src/TruffleSqueak-Tests.package/JavaTest.class/methodProperties.json b/src/TruffleSqueak-Tests.package/JavaTest.class/methodProperties.json index 45f8fd1a4..cb56459b2 100644 --- a/src/TruffleSqueak-Tests.package/JavaTest.class/methodProperties.json +++ b/src/TruffleSqueak-Tests.package/JavaTest.class/methodProperties.json @@ -16,4 +16,5 @@ "testJavaLocalDate" : "fn 12/12/2019 23:15", "testJavaLocalTime" : "fn 12/12/2019 23:15", "testJavaString" : "fn 11/4/2019 00:10", - "testJavaZoneId" : "fn 12/12/2019 23:37" } } + "testJavaZoneId" : "fn 12/12/2019 23:37", + "testLanguageClass" : "fn 2/11/2022 09:52" } }