From a76601966b2d9754496aeace6173af5c40c551c3 Mon Sep 17 00:00:00 2001 From: Fabio Niephaus Date: Thu, 10 Jun 2021 15:32:28 +0200 Subject: [PATCH] Improve fallback code of Interop#instantiate:with: --- .../Interop.class/class/instantiate.with..st | 4 +++- .../Interop.class/methodProperties.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TruffleSqueak-Core.package/Interop.class/class/instantiate.with..st b/src/TruffleSqueak-Core.package/Interop.class/class/instantiate.with..st index 473b0a71b..9ac327009 100644 --- a/src/TruffleSqueak-Core.package/Interop.class/class/instantiate.with..st +++ b/src/TruffleSqueak-Core.package/Interop.class/class/instantiate.with..st @@ -2,5 +2,7 @@ primitives instantiables instantiate: anObject with: arguments ^ (self isInstantiable: anObject) - ifTrue: [ anObject interopInstantiate: arguments ] + ifTrue: [ anObject isForeignObject + ifTrue: [ Polyglot signalPolyglotError ] + ifFalse: [ anObject interopInstantiate: arguments ] ] ifFalse: [ self error: 'Object is not instantiable' ] \ No newline at end of file diff --git a/src/TruffleSqueak-Core.package/Interop.class/methodProperties.json b/src/TruffleSqueak-Core.package/Interop.class/methodProperties.json index d388b5508..954362c15 100644 --- a/src/TruffleSqueak-Core.package/Interop.class/methodProperties.json +++ b/src/TruffleSqueak-Core.package/Interop.class/methodProperties.json @@ -60,7 +60,7 @@ "hasSourceLocation:" : "fn 3/5/2021 14:43", "hostIdentityHashCode:" : "fn 2/11/2021 12:04", "identityHashCode:" : "fn 3/9/2021 16:49", - "instantiate:with:" : "fn 3/9/2021 12:40", + "instantiate:with:" : "fn 6/10/2021 14:01", "invokeMember:member:arguments:" : "fn 3/11/2021 09:48", "isArrayElementExisting:index:" : "fn 3/5/2021 14:44", "isArrayElementInsertable:index:" : "fn 3/5/2021 14:52",