| 462 | } |
| 463 | |
| 464 | txBoolean fxProxyGetPrototype(txMachine* the, txSlot* instance, txSlot* slot) |
| 465 | { |
| 466 | txBoolean result; |
| 467 | mxProxyDeclarations(_getPrototypeOf); |
| 468 | if (function) { |
| 469 | /* THIS */ |
| 470 | mxPushSlot(handler); |
| 471 | /* FUNCTION */ |
| 472 | mxPushSlot(function); |
| 473 | mxCall(); |
| 474 | /* ARGUMENTS */ |
| 475 | mxPushSlot(target); |
| 476 | mxRunCount(1); |
| 477 | mxPullSlot(slot); |
| 478 | if ((slot->kind == XS_NULL_KIND) || (slot->kind == XS_REFERENCE_KIND)) { |
| 479 | if (!mxBehaviorIsExtensible(the, target->value.reference)) { |
| 480 | mxPushUndefined(); |
| 481 | mxBehaviorGetPrototype(the, target->value.reference, the->stack); |
| 482 | if (!fxIsSameValue(the, slot, the->stack, 0)) |
| 483 | mxTypeError("(proxy).getPrototypeOf: different prototype for non-extensible object"); |
| 484 | mxPop(); |
| 485 | } |
| 486 | } |
| 487 | else |
| 488 | mxTypeError("(proxy).getPrototypeOf: neither object nor null"); |
| 489 | result = (slot->kind == XS_NULL_KIND) ? 0 : 1; |
| 490 | } |
| 491 | else |
| 492 | result = mxBehaviorGetPrototype(the, target->value.reference, slot); |
| 493 | mxProxyPop(); |
| 494 | return result; |
| 495 | } |
| 496 | |
| 497 | txBoolean fxProxyHasProperty(txMachine* the, txSlot* instance, txID id, txIndex index) |
| 498 | { |
nothing calls this directly
no test coverage detected