More metadata cleanup (#3792)
authorZoltan Varga <vargaz@gmail.com>
Fri, 28 Oct 2016 19:51:35 +0000 (15:51 -0400)
committerGitHub <noreply@github.com>
Fri, 28 Oct 2016 19:51:35 +0000 (15:51 -0400)
commit016709fe52e921416322982f8185925f83de5866
tree539e89c2e2ae9e4f871d341b0fae3e70755b8f6c
parentb06664a292aa3b122b424253f7e475b90a6cb190
More metadata cleanup (#3792)

* [runtime] Introduce a new mono_class_init_sizes () function which initializes only the instance fields without initializing fields if possible. Use it in a few places instead of mono_class_init ()/mono_class_setup_fields ().

* [runtime] Simplify mono_class_has_references (), it doesn't have to special case the init_pending case.

* [runtime] Use a TLS list instead of the 'init_pending' flag to detect recursion in mono_class_init ().

* [runtime] Reduce the size of the critical section in mono_class_init () by doing most of the work outside the lock.

* [runtime] Avoid loading cached class info for pointer etc. types.

* [runtime] Reduce the locking inside setup_interface_offsets ().
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/icall.c
mono/metadata/sre.c
mono/mini/aot-runtime.c