192 // Transfer ownership of comments to this CodeBlob
193 void set_strings(CodeStrings& strings) {
194 _strings.assign(strings);
195 }
196 };
197
198
199 //----------------------------------------------------------------------------------------------------
200 // BufferBlob: used to hold non-relocatable machine code such as the interpreter, stubroutines, etc.
201
202 class BufferBlob: public CodeBlob {
203 friend class VMStructs;
204 friend class AdapterBlob;
205 friend class MethodHandlesAdapterBlob;
206
207 private:
208 // Creation support
209 BufferBlob(const char* name, int size);
210 BufferBlob(const char* name, int size, CodeBuffer* cb);
211
212 void* operator new(size_t s, unsigned size) throw();
213
214 public:
215 // Creation
216 static BufferBlob* create(const char* name, int buffer_size);
217 static BufferBlob* create(const char* name, CodeBuffer* cb);
218
219 static void free(BufferBlob* buf);
220
221 // Typing
222 virtual bool is_buffer_blob() const { return true; }
223
224 // GC/Verification support
225 void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { /* nothing to do */ }
226 bool is_alive() const { return true; }
227
228 void verify();
229 void print_on(outputStream* st) const;
230 void print_value_on(outputStream* st) const;
231 };
232
236
237 class AdapterBlob: public BufferBlob {
238 private:
239 AdapterBlob(int size, CodeBuffer* cb);
240
241 public:
242 // Creation
243 static AdapterBlob* create(CodeBuffer* cb);
244
245 // Typing
246 virtual bool is_adapter_blob() const { return true; }
247 };
248
249
250 //----------------------------------------------------------------------------------------------------
251 // MethodHandlesAdapterBlob: used to hold MethodHandles adapters
252
253 class MethodHandlesAdapterBlob: public BufferBlob {
254 private:
255 MethodHandlesAdapterBlob(int size) : BufferBlob("MethodHandles adapters", size) {}
256 MethodHandlesAdapterBlob(int size, CodeBuffer* cb) : BufferBlob("MethodHandles adapters", size, cb) {}
257
258 public:
259 // Creation
260 static MethodHandlesAdapterBlob* create(int buffer_size);
261
262 // Typing
263 virtual bool is_method_handles_adapter_blob() const { return true; }
264 };
265
266
267 //----------------------------------------------------------------------------------------------------
268 // RuntimeStub: describes stubs used by compiled code to call a (static) C++ runtime routine
269
270 class RuntimeStub: public CodeBlob {
271 friend class VMStructs;
272 private:
273 bool _caller_must_gc_arguments;
274
275 // Creation support
276 RuntimeStub(
|
192 // Transfer ownership of comments to this CodeBlob
193 void set_strings(CodeStrings& strings) {
194 _strings.assign(strings);
195 }
196 };
197
198
199 //----------------------------------------------------------------------------------------------------
200 // BufferBlob: used to hold non-relocatable machine code such as the interpreter, stubroutines, etc.
201
202 class BufferBlob: public CodeBlob {
203 friend class VMStructs;
204 friend class AdapterBlob;
205 friend class MethodHandlesAdapterBlob;
206
207 private:
208 // Creation support
209 BufferBlob(const char* name, int size);
210 BufferBlob(const char* name, int size, CodeBuffer* cb);
211
212 void* operator new(size_t s, unsigned size, bool is_critical = false) throw();
213
214 public:
215 // Creation
216 static BufferBlob* create(const char* name, int buffer_size);
217 static BufferBlob* create(const char* name, CodeBuffer* cb);
218
219 static void free(BufferBlob* buf);
220
221 // Typing
222 virtual bool is_buffer_blob() const { return true; }
223
224 // GC/Verification support
225 void preserve_callee_argument_oops(frame fr, const RegisterMap* reg_map, OopClosure* f) { /* nothing to do */ }
226 bool is_alive() const { return true; }
227
228 void verify();
229 void print_on(outputStream* st) const;
230 void print_value_on(outputStream* st) const;
231 };
232
236
237 class AdapterBlob: public BufferBlob {
238 private:
239 AdapterBlob(int size, CodeBuffer* cb);
240
241 public:
242 // Creation
243 static AdapterBlob* create(CodeBuffer* cb);
244
245 // Typing
246 virtual bool is_adapter_blob() const { return true; }
247 };
248
249
250 //----------------------------------------------------------------------------------------------------
251 // MethodHandlesAdapterBlob: used to hold MethodHandles adapters
252
253 class MethodHandlesAdapterBlob: public BufferBlob {
254 private:
255 MethodHandlesAdapterBlob(int size) : BufferBlob("MethodHandles adapters", size) {}
256
257 public:
258 // Creation
259 static MethodHandlesAdapterBlob* create(int buffer_size);
260
261 // Typing
262 virtual bool is_method_handles_adapter_blob() const { return true; }
263 };
264
265
266 //----------------------------------------------------------------------------------------------------
267 // RuntimeStub: describes stubs used by compiled code to call a (static) C++ runtime routine
268
269 class RuntimeStub: public CodeBlob {
270 friend class VMStructs;
271 private:
272 bool _caller_must_gc_arguments;
273
274 // Creation support
275 RuntimeStub(
|