CYPool pool;
if (const char *code = CYBridgeHash(pool, CYPoolUTF8String(pool, context, property))) {
JSValueRef result(_jsccall(JSEvaluateScript, context, CYJSString(CYPoolCode(pool, code)), NULL, NULL, 0));
- CYSetProperty(context, object, property, result, kJSPropertyAttributeDontEnum);
+ JSObjectRef cache(CYGetCachedObject(context, CYJSString("cache")));
+ CYSetProperty(context, cache, property, result);
return result;
}
JSObjectRef all(JSObjectMake(context, All_, NULL));
CYSetProperty(context, cycript, CYJSString("all"), all);
+ JSObjectRef cache(JSObjectMake(context, NULL, NULL));
+ CYSetProperty(context, cy, CYJSString("cache"), cache);
+ CYSetPrototype(context, cache, all);
+
JSObjectRef alls(_jsccall(JSObjectCallAsConstructor, context, Array, 0, NULL));
CYSetProperty(context, cycript, CYJSString("alls"), alls);
next = JSObjectGetPrototype(context, curr);
}
- CYSetPrototype(context, last, all);
+ CYSetPrototype(context, last, cache);
}
JSObjectRef System(JSObjectMake(context, NULL, NULL));