Mercurial > hg > truffle
comparison src/share/vm/ci/ciObjectFactory.cpp @ 3669:53636e2c9d03
No longer use shared ciFactory. Remove make_global usage in code installer.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 18 Nov 2011 14:14:37 +0100 |
parents | 0e8a2a629afb |
children | f198b24093f3 |
comparison
equal
deleted
inserted
replaced
3668:46f211fe010c | 3669:53636e2c9d03 |
---|---|
86 _arena = arena; | 86 _arena = arena; |
87 _ci_objects = new (arena) GrowableArray<ciObject*>(arena, expected_size, 0, NULL); | 87 _ci_objects = new (arena) GrowableArray<ciObject*>(arena, expected_size, 0, NULL); |
88 | 88 |
89 // If the shared ci objects exist append them to this factory's objects | 89 // If the shared ci objects exist append them to this factory's objects |
90 | 90 |
91 if (_shared_ci_objects != NULL) { | 91 /*if (_shared_ci_objects != NULL) { |
92 _ci_objects->appendAll(_shared_ci_objects); | 92 _ci_objects->appendAll(_shared_ci_objects); |
93 } | 93 }*/ |
94 | 94 |
95 _unloaded_methods = new (arena) GrowableArray<ciMethod*>(arena, 4, 0, NULL); | 95 _unloaded_methods = new (arena) GrowableArray<ciMethod*>(arena, 4, 0, NULL); |
96 _unloaded_klasses = new (arena) GrowableArray<ciKlass*>(arena, 8, 0, NULL); | 96 _unloaded_klasses = new (arena) GrowableArray<ciKlass*>(arena, 8, 0, NULL); |
97 _unloaded_instances = new (arena) GrowableArray<ciInstance*>(arena, 4, 0, NULL); | 97 _unloaded_instances = new (arena) GrowableArray<ciInstance*>(arena, 4, 0, NULL); |
98 _return_addresses = | 98 _return_addresses = |
99 new (arena) GrowableArray<ciReturnAddress*>(arena, 8, 0, NULL); | 99 new (arena) GrowableArray<ciReturnAddress*>(arena, 8, 0, NULL); |
100 | 100 |
101 _symbols = new (arena) GrowableArray<ciSymbol*>(arena, 100, 0, NULL); | 101 _symbols = new (arena) GrowableArray<ciSymbol*>(arena, 100, 0, NULL); |
102 } | |
103 | |
104 void ciObjectFactory::cleanup() { | |
105 int start = 0; | |
106 if (_shared_ci_objects != NULL) start = _shared_ci_objects->length(); | |
107 for (int i = start; i < _ci_objects->length(); ++i) { | |
108 _ci_objects->at(i)->cleanup(); | |
109 } | |
110 } | 102 } |
111 | 103 |
112 // ------------------------------------------------------------------ | 104 // ------------------------------------------------------------------ |
113 // ciObjectFactory::ciObjectFactory | 105 // ciObjectFactory::ciObjectFactory |
114 void ciObjectFactory::initialize() { | 106 void ciObjectFactory::initialize() { |
225 _shared_ci_objects = _ci_objects; | 217 _shared_ci_objects = _ci_objects; |
226 } | 218 } |
227 | 219 |
228 | 220 |
229 ciSymbol* ciObjectFactory::get_symbol(Symbol* key) { | 221 ciSymbol* ciObjectFactory::get_symbol(Symbol* key) { |
230 vmSymbols::SID sid = vmSymbols::find_sid(key); | 222 /*vmSymbols::SID sid = vmSymbols::find_sid(key); |
231 if (sid != vmSymbols::NO_SID) { | 223 if (sid != vmSymbols::NO_SID) { |
232 // do not pollute the main cache with it | 224 // do not pollute the main cache with it |
233 ciSymbol* result = vm_symbol_at(sid); | 225 ciSymbol* result = vm_symbol_at(sid); |
234 assert(result != NULL, ""); | 226 assert(result != NULL, ""); |
235 return result; | 227 return result; |
236 } | 228 }*/ |
237 | 229 |
238 assert(vmSymbols::find_sid(key) == vmSymbols::NO_SID, ""); | 230 assert(vmSymbols::find_sid(key) == vmSymbols::NO_SID, ""); |
239 ciSymbol* s = new (arena()) ciSymbol(key, vmSymbols::NO_SID); | 231 ciSymbol* s = new (arena()) ciSymbol(key, vmSymbols::NO_SID); |
240 _symbols->push(s); | 232 _symbols->push(s); |
241 return s; | 233 return s; |