25 #include "precompiled.hpp"
26 #include "ci/ciCallSite.hpp"
27 #include "ci/ciInstance.hpp"
28 #include "ci/ciInstanceKlass.hpp"
29 #include "ci/ciMemberName.hpp"
30 #include "ci/ciMethod.hpp"
31 #include "ci/ciMethodData.hpp"
32 #include "ci/ciMethodHandle.hpp"
33 #include "ci/ciMethodType.hpp"
34 #include "ci/ciNullObject.hpp"
35 #include "ci/ciObjArray.hpp"
36 #include "ci/ciObjArrayKlass.hpp"
37 #include "ci/ciObject.hpp"
38 #include "ci/ciObjectFactory.hpp"
39 #include "ci/ciSymbol.hpp"
40 #include "ci/ciTypeArray.hpp"
41 #include "ci/ciTypeArrayKlass.hpp"
42 #include "ci/ciUtilities.hpp"
43 #include "classfile/javaClasses.inline.hpp"
44 #include "classfile/systemDictionary.hpp"
45 #include "gc_interface/collectedHeap.inline.hpp"
46 #include "memory/allocation.inline.hpp"
47 #include "oops/oop.inline.hpp"
48 #include "runtime/fieldType.hpp"
49 #include "utilities/macros.hpp"
50 #if INCLUDE_ALL_GCS
51 # include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
52 #endif
53
54 // ciObjectFactory
55 //
56 // This class handles requests for the creation of new instances
57 // of ciObject and its subclasses. It contains a caching mechanism
58 // which ensures that for each oop, at most one ciObject is created.
59 // This invariant allows more efficient implementation of ciObject.
60 //
61 // Implementation note: the oop->ciObject mapping is represented as
62 // a table stored in an array. Even though objects are moved
63 // by the garbage collector, the compactor preserves their relative
64 // order; address comparison of oops (in perm space) is safe so long
65 // as we prohibit GC during our comparisons. We currently use binary
66 // search to find the oop in the table, and inserting a new oop
67 // into the table may be costly. If this cost ends up being
68 // problematic the underlying data structure can be switched to some
69 // sort of balanced binary tree.
70
71 GrowableArray<ciMetadata*>* ciObjectFactory::_shared_ci_metadata = NULL;
|
25 #include "precompiled.hpp"
26 #include "ci/ciCallSite.hpp"
27 #include "ci/ciInstance.hpp"
28 #include "ci/ciInstanceKlass.hpp"
29 #include "ci/ciMemberName.hpp"
30 #include "ci/ciMethod.hpp"
31 #include "ci/ciMethodData.hpp"
32 #include "ci/ciMethodHandle.hpp"
33 #include "ci/ciMethodType.hpp"
34 #include "ci/ciNullObject.hpp"
35 #include "ci/ciObjArray.hpp"
36 #include "ci/ciObjArrayKlass.hpp"
37 #include "ci/ciObject.hpp"
38 #include "ci/ciObjectFactory.hpp"
39 #include "ci/ciSymbol.hpp"
40 #include "ci/ciTypeArray.hpp"
41 #include "ci/ciTypeArrayKlass.hpp"
42 #include "ci/ciUtilities.hpp"
43 #include "classfile/javaClasses.inline.hpp"
44 #include "classfile/systemDictionary.hpp"
45 #include "gc/shared/collectedHeap.inline.hpp"
46 #include "memory/allocation.inline.hpp"
47 #include "oops/oop.inline.hpp"
48 #include "runtime/fieldType.hpp"
49 #include "utilities/macros.hpp"
50 #if INCLUDE_ALL_GCS
51 # include "gc/g1/g1SATBCardTableModRefBS.hpp"
52 #endif
53
54 // ciObjectFactory
55 //
56 // This class handles requests for the creation of new instances
57 // of ciObject and its subclasses. It contains a caching mechanism
58 // which ensures that for each oop, at most one ciObject is created.
59 // This invariant allows more efficient implementation of ciObject.
60 //
61 // Implementation note: the oop->ciObject mapping is represented as
62 // a table stored in an array. Even though objects are moved
63 // by the garbage collector, the compactor preserves their relative
64 // order; address comparison of oops (in perm space) is safe so long
65 // as we prohibit GC during our comparisons. We currently use binary
66 // search to find the oop in the table, and inserting a new oop
67 // into the table may be costly. If this cost ends up being
68 // problematic the underlying data structure can be switched to some
69 // sort of balanced binary tree.
70
71 GrowableArray<ciMetadata*>* ciObjectFactory::_shared_ci_metadata = NULL;
|