Mercurial > hg > truffle
comparison src/share/vm/ci/ciObjectFactory.hpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | 04b9a2566eec da91efe96a93 |
children | 2cb439954abf |
comparison
equal
deleted
inserted
replaced
6711:ae13cc658b80 | 6948:e522a00b91aa |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
39 friend class VMStructs; | 39 friend class VMStructs; |
40 friend class ciEnv; | 40 friend class ciEnv; |
41 | 41 |
42 private: | 42 private: |
43 static volatile bool _initialized; | 43 static volatile bool _initialized; |
44 static GrowableArray<ciObject*>* _shared_ci_objects; | 44 static GrowableArray<ciMetadata*>* _shared_ci_metadata; |
45 static ciSymbol* _shared_ci_symbols[]; | 45 static ciSymbol* _shared_ci_symbols[]; |
46 static int _shared_ident_limit; | 46 static int _shared_ident_limit; |
47 | 47 |
48 Arena* _arena; | 48 Arena* _arena; |
49 GrowableArray<ciObject*>* _ci_objects; | 49 GrowableArray<ciMetadata*>* _ci_metadata; |
50 GrowableArray<ciMethod*>* _unloaded_methods; | 50 GrowableArray<ciMethod*>* _unloaded_methods; |
51 GrowableArray<ciKlass*>* _unloaded_klasses; | 51 GrowableArray<ciKlass*>* _unloaded_klasses; |
52 GrowableArray<ciInstance*>* _unloaded_instances; | 52 GrowableArray<ciInstance*>* _unloaded_instances; |
53 GrowableArray<ciReturnAddress*>* _return_addresses; | 53 GrowableArray<ciReturnAddress*>* _return_addresses; |
54 GrowableArray<ciSymbol*>* _symbols; // keep list of symbols created | 54 GrowableArray<ciSymbol*>* _symbols; // keep list of symbols created |
66 private: | 66 private: |
67 enum { NON_PERM_BUCKETS = 61 }; | 67 enum { NON_PERM_BUCKETS = 61 }; |
68 NonPermObject* _non_perm_bucket[NON_PERM_BUCKETS]; | 68 NonPermObject* _non_perm_bucket[NON_PERM_BUCKETS]; |
69 int _non_perm_count; | 69 int _non_perm_count; |
70 | 70 |
71 int find(oop key, GrowableArray<ciObject*>* objects); | 71 int find(Metadata* key, GrowableArray<ciMetadata*>* objects); |
72 bool is_found_at(int index, oop key, GrowableArray<ciObject*>* objects); | 72 bool is_found_at(int index, Metadata* key, GrowableArray<ciMetadata*>* objects); |
73 void insert(int index, ciObject* obj, GrowableArray<ciObject*>* objects); | 73 void insert(int index, ciMetadata* obj, GrowableArray<ciMetadata*>* objects); |
74 | |
74 ciObject* create_new_object(oop o); | 75 ciObject* create_new_object(oop o); |
76 ciMetadata* create_new_object(Metadata* o); | |
77 | |
75 static bool is_equal(NonPermObject* p, oop key) { | 78 static bool is_equal(NonPermObject* p, oop key) { |
76 return p->object()->get_oop() == key; | 79 return p->object()->get_oop() == key; |
77 } | 80 } |
78 | 81 |
79 NonPermObject* &find_non_perm(oop key); | 82 NonPermObject* &find_non_perm(oop key); |
80 void insert_non_perm(NonPermObject* &where, oop key, ciObject* obj); | 83 void insert_non_perm(NonPermObject* &where, oop key, ciObject* obj); |
81 | 84 |
82 void init_ident_of(ciObject* obj); | 85 void init_ident_of(ciBaseObject* obj); |
83 void init_ident_of(ciSymbol* obj); | |
84 | 86 |
85 Arena* arena() { return _arena; } | 87 Arena* arena() { return _arena; } |
86 | 88 |
87 void print_contents_impl(); | 89 void print_contents_impl(); |
88 | 90 |
97 | 99 |
98 ciObjectFactory(Arena* arena, int expected_size); | 100 ciObjectFactory(Arena* arena, int expected_size); |
99 | 101 |
100 // Get the ciObject corresponding to some oop. | 102 // Get the ciObject corresponding to some oop. |
101 ciObject* get(oop key); | 103 ciObject* get(oop key); |
102 | 104 ciMetadata* get_metadata(Metadata* key); |
103 ciSymbol* get_symbol(Symbol* key); | 105 ciSymbol* get_symbol(Symbol* key); |
104 | 106 |
105 // Get the ciSymbol corresponding to one of the vmSymbols. | 107 // Get the ciSymbol corresponding to one of the vmSymbols. |
106 static ciSymbol* vm_symbol_at(int index); | 108 static ciSymbol* vm_symbol_at(int index); |
107 | 109 |
133 // with none. | 135 // with none. |
134 ciMethodData* get_empty_methodData(); | 136 ciMethodData* get_empty_methodData(); |
135 | 137 |
136 ciReturnAddress* get_return_address(int bci); | 138 ciReturnAddress* get_return_address(int bci); |
137 | 139 |
140 // RedefineClasses support | |
141 void metadata_do(void f(Metadata*)); | |
142 | |
138 void print_contents(); | 143 void print_contents(); |
139 void print(); | 144 void print(); |
140 }; | 145 }; |
141 | 146 |
142 #endif // SHARE_VM_CI_CIOBJECTFACTORY_HPP | 147 #endif // SHARE_VM_CI_CIOBJECTFACTORY_HPP |