[Coop] Some conversion of custom-attrs.c. (#9309)
commit643e6c47ee5703f5a043a3a9d4e6bc70913a1e33
authorJay Krell <jay.krell@cornell.edu>
Sat, 30 Jun 2018 22:02:24 +0000 (30 15:02 -0700)
committerGitHub <noreply@github.com>
Sat, 30 Jun 2018 22:02:24 +0000 (30 15:02 -0700)
tree398d8dd86555d4a2498ec2ec9b21a7ec6c5006be
parentf157a9b79314ac4a0e390a0fc7ed162d6b1d4c92
[Coop] Some conversion of custom-attrs.c. (#9309)

* [Coop] Some conversion of custom-attrs.c. (#9309)
* Add comment explaining mono_array_addr_with_size_fast vs. mono_array_addr_with_size.
* Have mono_array_addr_with_size reuse mono_array_addr_with_size_fast.
* split create_custom_attr_data into self and create_custom_attr_data_into_array, to avoid handle creation in loop (like alloca in loop)

Note there is a subtle semantic change here, in that previously
when invoke failed, we'd still store into the array.
The caller checks the error and throws out the data so it should be ok,
the same in the end.
mono/metadata/custom-attrs.c
mono/metadata/handle.h
mono/metadata/object-internals.h
mono/metadata/object.c