| 644 | } |
| 645 | |
| 646 | virtual void boot(Thread* t) |
| 647 | { |
| 648 | globalMachine = t->m; |
| 649 | |
| 650 | resolveSystemClass( |
| 651 | t, roots(t)->bootLoader(), type(t, GcClassLoader::Type)->name()); |
| 652 | |
| 653 | GcMethod* method = resolveMethod(t, |
| 654 | roots(t)->bootLoader(), |
| 655 | "java/lang/ThreadGroup", |
| 656 | "threadTerminated", |
| 657 | "(Ljava/lang/Thread;)V"); |
| 658 | // sequence point, for gc (don't recombine statements) |
| 659 | roots(t)->setThreadTerminated(t, method); |
| 660 | |
| 661 | #ifdef AVIAN_OPENJDK_SRC |
| 662 | interceptFileOperations(t, true); |
| 663 | #else // not AVIAN_OPENJDK_SRC |
| 664 | expect(t, loadLibrary(t, libraryPath, "verify", true, true)); |
| 665 | expect(t, loadLibrary(t, libraryPath, "java", true, true)); |
| 666 | #endif // not AVIAN_OPENJDK_SRC |
| 667 | |
| 668 | { |
| 669 | GcField* assertionLock = resolveField(t, |
| 670 | type(t, GcClassLoader::Type), |
| 671 | "assertionLock", |
| 672 | "Ljava/lang/Object;"); |
| 673 | |
| 674 | setField(t, |
| 675 | roots(t)->bootLoader(), |
| 676 | assertionLock->offset(), |
| 677 | roots(t)->bootLoader()); |
| 678 | } |
| 679 | |
| 680 | { |
| 681 | GcClass* class_ = resolveClass(t, |
| 682 | roots(t)->bootLoader(), |
| 683 | "java/util/Properties", |
| 684 | true, |
| 685 | GcNoClassDefFoundError::Type); |
| 686 | |
| 687 | PROTECT(t, class_); |
| 688 | |
| 689 | object instance = makeNew(t, class_); |
| 690 | |
| 691 | PROTECT(t, instance); |
| 692 | |
| 693 | GcMethod* constructor = resolveMethod(t, class_, "<init>", "()V"); |
| 694 | |
| 695 | t->m->processor->invoke(t, constructor, instance); |
| 696 | |
| 697 | t->m->processor->invoke(t, |
| 698 | roots(t)->bootLoader(), |
| 699 | "java/lang/System", |
| 700 | "setProperties", |
| 701 | "(Ljava/util/Properties;)V", |
| 702 | 0, |
| 703 | instance); |
nothing calls this directly
no test coverage detected