summaryrefslogtreecommitdiff
path: root/runtime/reflection-inl.h
AgeCommit message (Collapse)Author
2024-02-06Add visibility attributes in runtime/r* Dmitrii Ishcheikin
Bug: 260881207 Test: presubmit Test: abtd app_compat_drm Test: abtd app_compat_top_100 Test: abtd app_compat_banking Change-Id: I9a12fe4d7c47090631415e813a00c2a2fdcaca62
2018-12-06ART: Clean up base/utils.h Andreas Gampe
Remove dead code. Remove unnecessary includes. Bug: 115837065 Bug: 119869270 Test: m Change-Id: Ieb07546e9ebd476b7b1459fb8dd6cf5545d0af20
2018-06-01ObjPtr<>-ify array allocations. Vladimir Marko
And remove some unnecessary calls to ObjPtr<>::Ptr(). Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 31113334 Change-Id: Ie313980f7f23b33b0ccea4fa8d5131d643c59080
2018-03-05Move most of runtime/base to libartbase/base David Sehr
Enforce the layering that code in runtime/base should not depend on runtime by separating it into libartbase. Some of the code in runtime/base depends on the Runtime class, so it cannot be moved yet. Also, some of the tests depend on CommonRuntimeTest, which itself needs to be factored (in a subsequent CL). Bug: 22322814 Test: make -j 50 checkbuild make -j 50 test-art-host Change-Id: I8b096c1e2542f829eb456b4b057c71421b77d7e2
2018-02-28Header library to remove dependence on runtime/ David Sehr
Add a new header library to remove libdexfile and others' dependence on runtime (typically runtime/base) includes in libdexfile. Also a small step to tease dexlayout and profman away from relying on these as well. Bug: 22322814 Test: make -j 50 checkbuild make -j 50 test-art-host-gtest Change-Id: I38e2fe399a75f4bc6318c77a71954c00ea73ec2b
2018-02-21Remove duplication, split tests David Sehr
The code move to libdexfile/dex/descriptors_names.cc apparently did not remove the original code from runtime/utils.cc. Fix that duplication and all the header mentions needed. Also, split the test files to go along with the new locations for the code to be tested. Bug: 22322814 Test: make -j 50 checkbuild make -j 50 test-art-host-gtest flash & boot marlin Change-Id: Ie734672c4bca2c647d8016291f910b5608674545
2016-12-15ART: Move to libbase StringPrintf Andreas Gampe
Remove ART's StringPrintf implementation. Fix up clients. Add missing includes where necessary. Test: m test-art-host Change-Id: I564038d5868595ac3bb88d641af1000cea940e5a
2016-11-08Argument conversions for setter/getter MethodHandles. Orion Hodson
Test: m test-art-host-run-test-959-invoke-polymorphic-accessors Bug: 30550796 Change-Id: I9898605fc9f9f8a80f47f9559f3ccb99b02b07c8
2016-10-13Move mirror::Class to use ObjPtr Mathieu Chartier
Leave the return types as non ObjPtr for now. Fixed moving GC bugs in tests. Test: test-art-host Bug: 31113334 Change-Id: I5da1b5ac55dfbc5cc97a64be2c870ba9f512d9b0
2016-10-04Rename ObjPtr::Decode to ObjPtr::Ptr Mathieu Chartier
Done to prevent ambiguity with ScopedObjectAccess::Decode. Bug: 31113334 Test: test-art-host Change-Id: I07a2497cc9cf66386311798933547471987fc316
2016-09-27Use ObjPtr for reflection.cc/h/inl Mathieu Chartier
Changed Pretty helpers to use this to reduce usage of Decode. The eventual goal is not have almost any calls to ObjPtr::Decode. Moved ObjPtr out of mirror namespace for convenience. Added more PoisonObjectPointers calls in class linker, thread suspension. Bug: 31113334 Test: test-art-host Change-Id: I44d08db5143d95ed1b65e2f00f9749ef5cf379f7
2015-03-29Add AccessibleObject and Field to mirror Mathieu Chartier
Main motivation is to remove all the functionality / field access on java side to ArtField. Also comes with some reflection speedups / slowdowns. Summary results: getDeclaredField/getField are slower mostly due to JNI overhead. However, there is a large speedup in getInt, setInt, GetInstanceField, and GetStaticField. Before timings (N5 --compiler-filter=everything): benchmark ns linear runtime Class_getDeclaredField 782.86 === Class_getField 832.77 === Field_getInt 160.17 = Field_setInt 195.88 = GetInstanceField 3214.38 ============== GetStaticField 6809.49 ============================== After: Class_getDeclaredField 1068.15 ============ Class_getField 1180.00 ============== Field_getInt 121.85 = Field_setInt 139.98 = GetInstanceField 1986.15 ======================= GetStaticField 2523.63 ============================== Bug: 19264997 Change-Id: Ic0d0fc1b56b95cd6d60f8e76f19caeaa23045c77
2015-03-10Remove ThrowLocation. Nicolas Geoffray
Note that this is a cleanup change, and has no functionality change. The ThrowLocation had no use anymore. Change-Id: I3d2126af1dc673cec3a0453ff3d56a172663a5f6
2014-09-26Optimize get/set reflection performance Mathieu Chartier
Speedups mostly from reducing how often access checks are needed, and adding more inlining, and adding templates. Field_getInt from ~850ns -> 350ns. Field_setInt from ~900ns -> 370ns. Bug: 14063288 (cherry picked from commit ffc788cb7b5b9f53734d7bb8af2d5e45d885546b) Change-Id: I2441581ff3478c6ae43b6aa49939ff3f07555ec8