| 422 | } |
| 423 | |
| 424 | txBoolean fxProxyGetPropertyValue(txMachine* the, txSlot* instance, txID id, txIndex index, txSlot* receiver, txSlot* slot) |
| 425 | { |
| 426 | txBoolean result; |
| 427 | mxProxyDeclarations(_get); |
| 428 | if (function) { |
| 429 | /* THIS */ |
| 430 | mxPushSlot(handler); |
| 431 | /* FUNCTION */ |
| 432 | mxPushSlot(function); |
| 433 | mxCall(); |
| 434 | /* ARGUMENTS */ |
| 435 | mxPushSlot(target); |
| 436 | mxPushUndefined(); |
| 437 | fxKeyAt(the, id, index, the->stack); |
| 438 | mxPushSlot(receiver); |
| 439 | mxRunCount(3); |
| 440 | mxPullSlot(slot); |
| 441 | mxPushUndefined(); |
| 442 | if (mxBehaviorGetOwnProperty(the, target->value.reference, id, index, the->stack)) { |
| 443 | txSlot* property = the->stack; |
| 444 | if (property->flag & XS_DONT_DELETE_FLAG) { |
| 445 | if (property->kind == XS_ACCESSOR_KIND) { |
| 446 | if ((property->value.accessor.getter == C_NULL) && (slot->kind != XS_UNDEFINED_KIND)) |
| 447 | mxTypeError("(proxy).get: different getter for non-configurable property"); |
| 448 | } |
| 449 | else { |
| 450 | if ((property->flag & XS_DONT_SET_FLAG) && (!fxIsSameValue(the, property, slot, 0))) |
| 451 | mxTypeError("(proxy).get: different value for non-configurable, non-writable property"); |
| 452 | } |
| 453 | } |
| 454 | } |
| 455 | result = 1; |
| 456 | mxPop(); |
| 457 | } |
| 458 | else |
| 459 | result = mxBehaviorGetPropertyValue(the, target->value.reference, id, index, receiver, slot); |
| 460 | mxProxyPop(); |
| 461 | return result; |
| 462 | } |
| 463 | |
| 464 | txBoolean fxProxyGetPrototype(txMachine* the, txSlot* instance, txSlot* slot) |
| 465 | { |
no test coverage detected