CYIdentifier *identifier_;
CYInfix *infix_;
CYLiteral *literal_;
+ CYMember *member_;
CYMessage *message_;
CYMessageParameter *messageParameter_;
CYNull *null_;
%type <argument_> ArgumentListOpt
%type <argument_> Arguments
%type <literal_> ArrayLiteral
+%type <expression_> AssigneeExpression
+%type <expression_> AssigneeExpression_
+%type <expression_> AssigneeExpressionNoBF
%type <expression_> AssignmentExpression
%type <assignment_> AssignmentExpression_
%type <expression_> AssignmentExpressionNoBF
%type <statement_> IterationStatement
%type <statement_> LabelledStatement
%type <expression_> LeftHandSideExpression
-%type <expression_> LeftHandSideExpression_
%type <expression_> LeftHandSideExpressionNoBF
%type <literal_> Literal
%type <expression_> LogicalANDExpression
%type <expression_> LogicalORExpression
%type <expression_> LogicalORExpressionNoBF
%type <expression_> LogicalORExpressionNoIn
+%type <member_> MemberAccess
%type <expression_> MemberExpression
%type <expression_> MemberExpression_
%type <expression_> MemberExpressionNoBF
: "new" MemberExpression Arguments { $$ = new(driver.pool_) CYNew($2, $3); }
;
+MemberAccess
+ : "[" Expression "]" { $$ = new(driver.pool_) CYDirectMember(NULL, $2); }
+ | "." Identifier { $$ = new(driver.pool_) CYDirectMember(NULL, new(driver.pool_) CYString($2)); }
+ ;
+
MemberExpression
: PrimaryExpression { $$ = $1; }
| FunctionExpression { $$ = $1; }
- | MemberExpression "[" Expression "]" { $$ = new(driver.pool_) CYMember($1, $3); }
- | MemberExpression "." Identifier { $$ = new(driver.pool_) CYMember($1, new(driver.pool_) CYString($3)); }
+ | MemberExpression MemberAccess { $2->SetLeft($1); $$ = $2; }
| MemberExpression_ { $$ = $1; }
;
MemberExpressionNoBF
: PrimaryExpressionNoBF { $$ = $1; }
- | MemberExpressionNoBF "[" Expression "]" { $$ = new(driver.pool_) CYMember($1, $3); }
- | MemberExpressionNoBF "." Identifier { $$ = new(driver.pool_) CYMember($1, new(driver.pool_) CYString($3)); }
+ | MemberExpressionNoBF MemberAccess { $2->SetLeft($1); $$ = $2; }
| MemberExpression_ { $$ = $1; }
;
CallExpression
: MemberExpression Arguments { $$ = new(driver.pool_) CYCall($1, $2); }
| CallExpression Arguments { $$ = new(driver.pool_) CYCall($1, $2); }
- | CallExpression "[" Expression "]" { $$ = new(driver.pool_) CYMember($1, $3); }
- | CallExpression "." Identifier { $$ = new(driver.pool_) CYMember($1, new(driver.pool_) CYString($3)); }
+ | CallExpression MemberAccess { $2->SetLeft($1); $$ = $2; }
;
CallExpressionNoBF
: MemberExpressionNoBF Arguments { $$ = new(driver.pool_) CYCall($1, $2); }
| CallExpressionNoBF Arguments { $$ = new(driver.pool_) CYCall($1, $2); }
- | CallExpressionNoBF "[" Expression "]" { $$ = new(driver.pool_) CYMember($1, $3); }
- | CallExpressionNoBF "." Identifier { $$ = new(driver.pool_) CYMember($1, new(driver.pool_) CYString($3)); }
+ | CallExpressionNoBF MemberAccess { $2->SetLeft($1); $$ = $2; }
;
ArgumentList_
LeftHandSideExpression
: NewExpression { $$ = $1; }
| CallExpression { $$ = $1; }
- | LeftHandSideExpression_ { $$ = $1; }
;
LeftHandSideExpressionNoBF
: NewExpressionNoBF { $$ = $1; }
| CallExpressionNoBF { $$ = $1; }
- | LeftHandSideExpression_ { $$ = $1; }
;
PostfixExpression
- : LeftHandSideExpression { $$ = $1; }
+ : AssigneeExpression { $$ = $1; }
| LeftHandSideExpression "++" { $$ = new(driver.pool_) CYPostIncrement($1); }
| LeftHandSideExpression "--" { $$ = new(driver.pool_) CYPostDecrement($1); }
;
PostfixExpressionNoBF
- : LeftHandSideExpressionNoBF { $$ = $1; }
+ : AssigneeExpressionNoBF { $$ = $1; }
| LeftHandSideExpressionNoBF "++" { $$ = new(driver.pool_) CYPostIncrement($1); }
| LeftHandSideExpressionNoBF "--" { $$ = new(driver.pool_) CYPostDecrement($1); }
;
| "|=" AssignmentExpression { $$ = new(driver.pool_) CYBitwiseOrAssign(NULL, $2); }
;
+AssigneeExpression
+ : LeftHandSideExpression { $$ = $1; }
+ | AssigneeExpression_ { $$ = $1; }
+ ;
+
+AssigneeExpressionNoBF
+ : LeftHandSideExpressionNoBF { $$ = $1; }
+ | AssigneeExpression_ { $$ = $1; }
+ ;
+
AssignmentExpression
: ConditionalExpression { $$ = $1; }
- | LeftHandSideExpression AssignmentExpression_ { $2->SetLeft($1); $$ = $2; }
+ | AssigneeExpression AssignmentExpression_ { $2->SetLeft($1); $$ = $2; }
;
AssignmentExpressionNoIn
: ConditionalExpressionNoIn { $$ = $1; }
- | LeftHandSideExpression "=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYAssign($1, $3); }
- | LeftHandSideExpression "*=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYMultiplyAssign($1, $3); }
- | LeftHandSideExpression "/=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYDivideAssign($1, $3); }
- | LeftHandSideExpression "%=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYModulusAssign($1, $3); }
- | LeftHandSideExpression "+=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYAddAssign($1, $3); }
- | LeftHandSideExpression "-=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYSubtractAssign($1, $3); }
- | LeftHandSideExpression "<<=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYShiftLeftAssign($1, $3); }
- | LeftHandSideExpression ">>=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYShiftRightSignedAssign($1, $3); }
- | LeftHandSideExpression ">>>=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYShiftRightUnsignedAssign($1, $3); }
- | LeftHandSideExpression "&=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYBitwiseAndAssign($1, $3); }
- | LeftHandSideExpression "^=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYBitwiseXOrAssign($1, $3); }
- | LeftHandSideExpression "|=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYBitwiseOrAssign($1, $3); }
+ | AssigneeExpression "=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYAssign($1, $3); }
+ | AssigneeExpression "*=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYMultiplyAssign($1, $3); }
+ | AssigneeExpression "/=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYDivideAssign($1, $3); }
+ | AssigneeExpression "%=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYModulusAssign($1, $3); }
+ | AssigneeExpression "+=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYAddAssign($1, $3); }
+ | AssigneeExpression "-=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYSubtractAssign($1, $3); }
+ | AssigneeExpression "<<=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYShiftLeftAssign($1, $3); }
+ | AssigneeExpression ">>=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYShiftRightSignedAssign($1, $3); }
+ | AssigneeExpression ">>>=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYShiftRightUnsignedAssign($1, $3); }
+ | AssigneeExpression "&=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYBitwiseAndAssign($1, $3); }
+ | AssigneeExpression "^=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYBitwiseXOrAssign($1, $3); }
+ | AssigneeExpression "|=" AssignmentExpressionNoIn { $$ = new(driver.pool_) CYBitwiseOrAssign($1, $3); }
;
AssignmentExpressionNoBF
: ConditionalExpressionNoBF { $$ = $1; }
- | LeftHandSideExpressionNoBF AssignmentExpression_ { $2->SetLeft($1); $$ = $2; }
+ | AssigneeExpressionNoBF AssignmentExpression_ { $2->SetLeft($1); $$ = $2; }
;
Expression_
;
/* }}} */
-LeftHandSideExpression_
- : "*" LeftHandSideExpression { $$ = new(driver.pool_) CYIndirect($2); }
+AssigneeExpression_
+ : "*" UnaryExpression { $$ = new(driver.pool_) CYIndirect($2); }
;
UnaryExpression_
: "&" UnaryExpression { $$ = new(driver.pool_) CYAddressOf($2); }
;
+MemberAccess
+ : "->" Identifier { $$ = new(driver.pool_) CYIndirectMember(NULL, new(driver.pool_) CYString($2)); }
+ ;
+
%%
static JSClassRef Functor_;
static JSClassRef Instance_;
+static JSClassRef Internal_;
static JSClassRef Pointer_;
static JSClassRef Runtime_;
static JSClassRef Selector_;
value_(value)
{
}
+
+ CYValue(const CYValue &rhs) :
+ value_(rhs.value_)
+ {
+ }
};
struct Selector_privateData :
}
};
+struct Internal :
+ CYValue
+{
+ JSObjectRef owner_;
+
+ Internal(id value, JSObjectRef owner) :
+ CYValue(value),
+ owner_(owner)
+ {
+ }
+
+ static JSObjectRef Make(JSContextRef context, id object, JSObjectRef owner) {
+ return JSObjectMake(context, Internal_, new Internal(object, owner));
+ }
+
+ id GetValue() const {
+ return reinterpret_cast<id>(value_);
+ }
+};
+
namespace sig {
void Copy(apr_pool_t *pool, Type &lhs, Type &rhs);
return JSObjectMake(context, Selector_, data);
}
-JSObjectRef CYMakePointer(JSContextRef context, void *pointer, sig::Type *type, JSObjectRef owner) {
+JSObjectRef CYMakePointer(JSContextRef context, void *pointer, sig::Type *type, ffi_type *ffi, JSObjectRef owner) {
Pointer *data(new Pointer(pointer, type, owner));
return JSObjectMake(context, Pointer_, data);
}
case sig::pointer_P:
if (void *pointer = *reinterpret_cast<void **>(data))
- value = CYMakePointer(context, pointer, type->data.data.type, owner);
+ value = CYMakePointer(context, pointer, type->data.data.type, ffi, owner);
else goto null;
break;
CYPool pool;
CYTry {
- NSString *self(CYCastNSObject(pool, context, object));
+ id self(CYCastNSObject(pool, context, object));
NSString *name(CYCastNSString(pool, property));
if (CYInternal *internal = CYInternal::Get(self))
return CYSendMessage(pool, context, self, sel, 0, NULL, false, exception);
}
- if (Ivar ivar = object_getInstanceVariable(self, string, NULL)) {
- Type_privateData type(pool, ivar_getTypeEncoding(ivar));
- return CYFromFFI(context, type.type_, type.GetFFI(), reinterpret_cast<uint8_t *>(self) + ivar_getOffset(ivar));
- }
-
return NULL;
} CYCatch
}
+static JSValueRef Instance_getProperty_$cyi(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) {
+ Instance *internal(reinterpret_cast<Instance *>(JSObjectGetPrivate(object)));
+ return Internal::Make(context, internal->GetValue(), object);
+}
+
static bool Instance_setProperty(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef value, JSValueRef *exception) {
CYPool pool;
CYTry {
- NSString *self(CYCastNSObject(pool, context, object));
+ id self(CYCastNSObject(pool, context, object));
NSString *name(CYCastNSString(pool, property));
NSString *data(CYCastNSObject(pool, context, value));
}
}
- if (Ivar ivar = object_getInstanceVariable(self, string, NULL)) {
- Type_privateData type(pool, ivar_getTypeEncoding(ivar));
- CYPoolFFI(pool, context, type.type_, type.GetFFI(), reinterpret_cast<uint8_t *>(self) + ivar_getOffset(ivar), value);
- return true;
- }
-
if (CYInternal *internal = CYInternal::Set(self)) {
internal->SetProperty(context, property, value);
return true;
static bool Instance_deleteProperty(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) {
CYTry {
CYPoolTry {
- NSString *self(CYCastNSObject(NULL, context, object));
+ id self(CYCastNSObject(NULL, context, object));
NSString *name(CYCastNSString(NULL, property));
return [self cy$deleteProperty:name];
} CYPoolCatch(NULL)
JSPropertyNameAccumulatorAddName(names, CYJSString(property_getName(data[i])));
free(data);
}
+}
+
+static JSObjectRef Instance_callAsConstructor(JSContextRef context, JSObjectRef object, size_t count, const JSValueRef arguments[], JSValueRef *exception) {
+ CYTry {
+ Instance *data(reinterpret_cast<Instance *>(JSObjectGetPrivate(object)));
+ JSObjectRef value(Instance::Make(context, [data->GetValue() alloc], Instance::Uninitialized));
+ return value;
+ } CYCatch
+}
+
+static JSValueRef Internal_getProperty(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) {
+ Internal *internal(reinterpret_cast<Internal *>(JSObjectGetPrivate(object)));
+ CYPool pool;
+
+ CYTry {
+ id self(internal->GetValue());
+ const char *name(CYPoolCString(pool, property));
+
+ if (Ivar ivar = object_getInstanceVariable(self, name, NULL)) {
+ Type_privateData type(pool, ivar_getTypeEncoding(ivar));
+ return CYFromFFI(context, type.type_, type.GetFFI(), reinterpret_cast<uint8_t *>(self) + ivar_getOffset(ivar));
+ }
+
+ return NULL;
+ } CYCatch
+}
+
+static bool Internal_setProperty(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef value, JSValueRef *exception) {
+ Internal *internal(reinterpret_cast<Internal *>(JSObjectGetPrivate(object)));
+ CYPool pool;
+
+ CYTry {
+ id self(internal->GetValue());
+ const char *name(CYPoolCString(pool, property));
+
+ if (Ivar ivar = object_getInstanceVariable(self, name, NULL)) {
+ Type_privateData type(pool, ivar_getTypeEncoding(ivar));
+ CYPoolFFI(pool, context, type.type_, type.GetFFI(), reinterpret_cast<uint8_t *>(self) + ivar_getOffset(ivar), value);
+ return true;
+ }
+
+ return false;
+ } CYCatch
+}
+
+static void Internal_getPropertyNames(JSContextRef context, JSObjectRef object, JSPropertyNameAccumulatorRef names) {
+ Internal *internal(reinterpret_cast<Internal *>(JSObjectGetPrivate(object)));
+ CYPool pool;
+
+ id self(internal->GetValue());
+ Class _class(object_getClass(self));
for (Class super(_class); super != NULL; super = class_getSuperclass(super)) {
unsigned int size;
}
}
-static JSObjectRef Instance_callAsConstructor(JSContextRef context, JSObjectRef object, size_t count, const JSValueRef arguments[], JSValueRef *exception) {
- CYTry {
- Instance *data(reinterpret_cast<Instance *>(JSObjectGetPrivate(object)));
- JSObjectRef value(Instance::Make(context, [data->GetValue() alloc], Instance::Uninitialized));
- return value;
- } CYCatch
+static JSValueRef Internal_callAsFunction_$cya(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) {
+ Internal *internal(reinterpret_cast<Internal *>(JSObjectGetPrivate(object)));
+ return internal->owner_;
}
bool Index_(apr_pool_t *pool, Struct_privateData *internal, JSStringRef property, ssize_t &index, uint8_t *&base) {
return true;
}
-static JSValueRef Pointer_getProperty(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) {
- CYPool pool;
+static JSValueRef Pointer_getIndex(JSContextRef context, JSObjectRef object, size_t index, JSValueRef *exception) {
Pointer *internal(reinterpret_cast<Pointer *>(JSObjectGetPrivate(object)));
Type_privateData *typical(internal->type_);
- if (typical->type_ == NULL)
- return NULL;
-
- ssize_t index;
- if (!CYGetIndex(pool, property, index))
- return NULL;
-
ffi_type *ffi(typical->GetFFI());
uint8_t *base(reinterpret_cast<uint8_t *>(internal->value_));
} CYCatch
}
-static bool Pointer_setProperty(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef value, JSValueRef *exception) {
+static JSValueRef Pointer_getProperty(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) {
CYPool pool;
Pointer *internal(reinterpret_cast<Pointer *>(JSObjectGetPrivate(object)));
Type_privateData *typical(internal->type_);
if (!CYGetIndex(pool, property, index))
return NULL;
+ return Pointer_getIndex(context, object, index, exception);
+}
+
+static JSValueRef Pointer_getProperty_$cyi(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) {
+ return Pointer_getIndex(context, object, 0, exception);
+}
+
+static bool Pointer_setIndex(JSContextRef context, JSObjectRef object, size_t index, JSValueRef value, JSValueRef *exception) {
+ Pointer *internal(reinterpret_cast<Pointer *>(JSObjectGetPrivate(object)));
+ Type_privateData *typical(internal->type_);
+
ffi_type *ffi(typical->GetFFI());
uint8_t *base(reinterpret_cast<uint8_t *>(internal->value_));
} CYCatch
}
+static bool Pointer_setProperty(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef value, JSValueRef *exception) {
+ CYPool pool;
+ Pointer *internal(reinterpret_cast<Pointer *>(JSObjectGetPrivate(object)));
+ Type_privateData *typical(internal->type_);
+
+ if (typical->type_ == NULL)
+ return NULL;
+
+ ssize_t index;
+ if (!CYGetIndex(pool, property, index))
+ return NULL;
+
+ return Pointer_setIndex(context, object, 0, value, exception);
+}
+
+static bool Pointer_setProperty_$cyi(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef value, JSValueRef *exception) {
+ return Pointer_setIndex(context, object, 0, value, exception);
+}
+
+static JSValueRef Struct_callAsFunction_$cya(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) {
+ Struct_privateData *internal(reinterpret_cast<Struct_privateData *>(JSObjectGetPrivate(_this)));
+ Type_privateData *typical(internal->type_);
+ return CYMakePointer(context, internal->value_, typical->type_, typical->ffi_, _this);
+}
+
static JSValueRef Struct_getProperty(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) {
CYPool pool;
Struct_privateData *internal(reinterpret_cast<Struct_privateData *>(JSObjectGetPrivate(object)));
sig::Signature signature;
sig::Parse(pool, &signature, type, &Structor_);
- return CYMakePointer(context, value, signature.elements[0].type, NULL);
+ return CYMakePointer(context, value, signature.elements[0].type, NULL, NULL);
} CYCatch
}
size_t size(count == 0 ? 0 : CYCastDouble(context, arguments[0]));
// XXX: alignment?
void *value(malloc(internal->GetFFI()->size * size));
- return CYMakePointer(context, value, internal->type_, NULL);
+ return CYMakePointer(context, value, internal->type_, internal->ffi_, NULL);
} CYCatch
}
{NULL, NULL, NULL, 0}
};
+static JSStaticValue Pointer_staticValues[2] = {
+ {"$cyi", &Pointer_getProperty_$cyi, &Pointer_setProperty_$cyi, kJSPropertyAttributeDontDelete},
+ {NULL, NULL, NULL, 0}
+};
+
static JSStaticFunction Pointer_staticFunctions[4] = {
{"toCYON", &CYValue_callAsFunction_toCYON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"toJSON", &CYValue_callAsFunction_toJSON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{NULL, NULL, 0}
};
+static JSStaticFunction Struct_staticFunctions[2] = {
+ {"$cya", &Struct_callAsFunction_$cya, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
+ {NULL, NULL, 0}
+};
+
static JSStaticFunction Functor_staticFunctions[4] = {
{"toCYON", &CYValue_callAsFunction_toCYON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"toJSON", &CYValue_callAsFunction_toJSON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{NULL, NULL, NULL, 0}
};*/
+static JSStaticValue Instance_staticValues[3] = {
+ {"value", &CYValue_getProperty_value, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete},
+ {"$cyi", &Instance_getProperty_$cyi, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete},
+ {NULL, NULL, NULL, 0}
+};
+
static JSStaticFunction Instance_staticFunctions[4] = {
{"toCYON", &Instance_callAsFunction_toCYON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"toJSON", &Instance_callAsFunction_toJSON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{NULL, NULL, 0}
};
+static JSStaticFunction Internal_staticFunctions[2] = {
+ {"$cya", &Internal_callAsFunction_$cya, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
+ {NULL, NULL, 0}
+};
+
static JSStaticFunction Selector_staticFunctions[5] = {
{"toCYON", &Selector_callAsFunction_toCYON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"toJSON", &Selector_callAsFunction_toJSON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{NULL, NULL, 0}
};
-static JSStaticFunction Type_staticFunctions[5] = {
+static JSStaticFunction Type_staticFunctions[4] = {
{"toCYON", &Type_callAsFunction_toCYON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"toJSON", &Type_callAsFunction_toJSON, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"toString", &Type_callAsFunction_toString, kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
definition = kJSClassDefinitionEmpty;
definition.className = "Instance";
- definition.staticValues = CYValue_staticValues;
+ definition.staticValues = Instance_staticValues;
definition.staticFunctions = Instance_staticFunctions;
definition.getProperty = &Instance_getProperty;
definition.setProperty = &Instance_setProperty;
definition.finalize = &CYData::Finalize;
Instance_ = JSClassCreate(&definition);
+ definition = kJSClassDefinitionEmpty;
+ definition.className = "Internal";
+ definition.staticFunctions = Internal_staticFunctions;
+ definition.getProperty = &Internal_getProperty;
+ definition.setProperty = &Internal_setProperty;
+ definition.getPropertyNames = &Internal_getPropertyNames;
+ definition.finalize = &CYData::Finalize;
+ Internal_ = JSClassCreate(&definition);
+
definition = kJSClassDefinitionEmpty;
definition.className = "Pointer";
+ definition.staticValues = Pointer_staticValues;
definition.staticFunctions = Pointer_staticFunctions;
definition.getProperty = &Pointer_getProperty;
definition.setProperty = &Pointer_setProperty;
definition = kJSClassDefinitionEmpty;
definition.className = "Struct";
+ definition.staticFunctions = Struct_staticFunctions;
definition.getProperty = &Struct_getProperty;
definition.setProperty = &Struct_setProperty;
definition.getPropertyNames = &Struct_getPropertyNames;