| 712 | } |
| 713 | |
| 714 | void finalizeObject(Thread* t, object o, const char* name) |
| 715 | { |
| 716 | for (GcClass* c = objectClass(t, o); c; c = c->super()) { |
| 717 | GcArray* mtable = cast<GcArray>(t, c->methodTable()); |
| 718 | for (unsigned i = 0; i < mtable->length(); ++i) { |
| 719 | GcMethod* m = cast<GcMethod>(t, mtable->body()[i]); |
| 720 | |
| 721 | if (vm::strcmp(reinterpret_cast<const int8_t*>(name), |
| 722 | m->name()->body().begin()) == 0 |
| 723 | and vm::strcmp(reinterpret_cast<const int8_t*>("()V"), |
| 724 | m->spec()->body().begin()) == 0) { |
| 725 | PROTECT(t, m); |
| 726 | PROTECT(t, o); |
| 727 | |
| 728 | uintptr_t arguments[] = {reinterpret_cast<uintptr_t>(&m), |
| 729 | reinterpret_cast<uintptr_t>(&o)}; |
| 730 | |
| 731 | run(t, invoke, arguments); |
| 732 | |
| 733 | t->exception = 0; |
| 734 | return; |
| 735 | } |
| 736 | } |
| 737 | } |
| 738 | abort(t); |
| 739 | } |
| 740 | |
| 741 | unsigned readByte(AbstractStream& s, unsigned* value) |
| 742 | { |
no test coverage detected