From db69c1f7d93a630b98677dfd3c06cb0e534750ed Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 1 Jan 2014 22:47:01 -0800 Subject: [PATCH] On ARM64, the isa instance variable is a tagged. --- ObjectiveC/Library.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index f495f33..e234c16 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -1969,6 +1969,11 @@ static JSValueRef Internal_getProperty(JSContextRef context, JSObjectRef object, id self(internal->GetValue()); const char *name(CYPoolCString(pool, context, property)); +#ifdef __arm64__ + if (strcmp(name, "isa") == 0) + return CYCastJSValue(context, object_getClass(self)); +#endif + if (objc_ivar *ivar = object_getInstanceVariable(self, name, NULL)) { Type_privateData type(pool, ivar_getTypeEncoding(ivar)); // XXX: if this fails and throws an exception the person we are throwing it to gets the wrong exception -- 2.47.2