JSValueRef exception(NULL);
JSValueRef arguments[1];
arguments[0] = CYCastJSValue(context_, (NSObject *) object);
- JSObjectRef Array(CYGetCachedObject(context_, Array_s));
+ JSObjectRef Array(CYGetCachedObject(context_, CYJSString("Array_prototype")));
JSObjectCallAsFunction(context_, CYCastJSObject(context_, CYGetProperty(context_, Array, push_s)), object_, 1, arguments, &exception);
CYThrow(context_, exception);
} CYObjectiveCatch }
arguments[0] = CYCastJSValue(context_, index);
arguments[1] = CYCastJSValue(context_, 0);
arguments[2] = CYCastJSValue(context_, (NSObject *) object);
- JSObjectRef Array(CYGetCachedObject(context_, Array_s));
+ JSObjectRef Array(CYGetCachedObject(context_, CYJSString("Array_prototype")));
JSObjectCallAsFunction(context_, CYCastJSObject(context_, CYGetProperty(context_, Array, splice_s)), object_, 3, arguments, &exception);
CYThrow(context_, exception);
} CYObjectiveCatch }
- (void) removeLastObject { CYObjectiveTry {
JSValueRef exception(NULL);
- JSObjectRef Array(CYGetCachedObject(context_, Array_s));
+ JSObjectRef Array(CYGetCachedObject(context_, CYJSString("Array_prototype")));
JSObjectCallAsFunction(context_, CYCastJSObject(context_, CYGetProperty(context_, Array, pop_s)), object_, 0, NULL, &exception);
CYThrow(context_, exception);
} CYObjectiveCatch }
JSValueRef arguments[2];
arguments[0] = CYCastJSValue(context_, index);
arguments[1] = CYCastJSValue(context_, 1);
- JSObjectRef Array(CYGetCachedObject(context_, Array_s));
+ JSObjectRef Array(CYGetCachedObject(context_, CYJSString("Array_prototype")));
JSObjectCallAsFunction(context_, CYCastJSObject(context_, CYGetProperty(context_, Array, splice_s)), object_, 2, arguments, &exception);
CYThrow(context_, exception);
} CYObjectiveCatch }
return Instance::Make(context, (id) object_getClass(internal->GetValue()));
}
-static JSValueRef Instance_getProperty_protocol(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) { CYTry {
+static JSValueRef Instance_getProperty_prototype(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) { CYTry {
Instance *internal(reinterpret_cast<Instance *>(JSObjectGetPrivate(object)));
id self(internal->GetValue());
if (!CYIsClass(self))
static JSStaticValue Instance_staticValues[5] = {
{"constructor", &Instance_getProperty_constructor, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"messages", &Instance_getProperty_messages, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
- {"prototype", &Instance_getProperty_protocol, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
+ {"prototype", &Instance_getProperty_prototype, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"value", &CYValue_getProperty_value, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{NULL, NULL, NULL, 0}
};