255 oop obj = create_primitive_slot_instance(values, index, type, CHECK_(empty));
256 if (obj != NULL) {
257 array_h->obj_at_put(i, obj);
258 }
259 }
260 return array_h;
261 }
262
263 objArrayHandle LiveFrameStream::monitors_to_object_array(GrowableArray<MonitorInfo*>* monitors, TRAPS) {
264 int length = monitors->length();
265 objArrayOop array_oop = oopFactory::new_objArray(SystemDictionary::Object_klass(),
266 length, CHECK_(objArrayHandle()));
267 objArrayHandle array_h(THREAD, array_oop);
268 for (int i = 0; i < length; i++) {
269 MonitorInfo* monitor = monitors->at(i);
270 array_h->obj_at_put(i, monitor->owner());
271 }
272 return array_h;
273 }
274
275 // Fill StackFrameInfo with declaringClass and bci and initialize memberName
276 void BaseFrameStream::fill_stackframe(Handle stackFrame, const methodHandle& method, TRAPS) {
277 java_lang_StackFrameInfo::set_declaringClass(stackFrame(), method->method_holder()->java_mirror());
278 java_lang_StackFrameInfo::set_method_and_bci(stackFrame, method, bci(), THREAD);
279 }
280
281 // Fill LiveStackFrameInfo with locals, monitors, and expressions
282 void LiveFrameStream::fill_live_stackframe(Handle stackFrame,
283 const methodHandle& method, TRAPS) {
284 fill_stackframe(stackFrame, method, CHECK);
285 if (_jvf != NULL) {
286 StackValueCollection* locals = _jvf->locals();
287 StackValueCollection* expressions = _jvf->expressions();
288 GrowableArray<MonitorInfo*>* monitors = _jvf->monitors();
289
290 int mode = 0;
291 if (_jvf->is_interpreted_frame()) {
292 mode = MODE_INTERPRETED;
293 } else if (_jvf->is_compiled_frame()) {
294 mode = MODE_COMPILED;
295 }
296
297 if (!locals->is_empty()) {
|
255 oop obj = create_primitive_slot_instance(values, index, type, CHECK_(empty));
256 if (obj != NULL) {
257 array_h->obj_at_put(i, obj);
258 }
259 }
260 return array_h;
261 }
262
263 objArrayHandle LiveFrameStream::monitors_to_object_array(GrowableArray<MonitorInfo*>* monitors, TRAPS) {
264 int length = monitors->length();
265 objArrayOop array_oop = oopFactory::new_objArray(SystemDictionary::Object_klass(),
266 length, CHECK_(objArrayHandle()));
267 objArrayHandle array_h(THREAD, array_oop);
268 for (int i = 0; i < length; i++) {
269 MonitorInfo* monitor = monitors->at(i);
270 array_h->obj_at_put(i, monitor->owner());
271 }
272 return array_h;
273 }
274
275 // Fill StackFrameInfo with bci and initialize memberName
276 void BaseFrameStream::fill_stackframe(Handle stackFrame, const methodHandle& method, TRAPS) {
277 java_lang_StackFrameInfo::set_method_and_bci(stackFrame, method, bci(), THREAD);
278 }
279
280 // Fill LiveStackFrameInfo with locals, monitors, and expressions
281 void LiveFrameStream::fill_live_stackframe(Handle stackFrame,
282 const methodHandle& method, TRAPS) {
283 fill_stackframe(stackFrame, method, CHECK);
284 if (_jvf != NULL) {
285 StackValueCollection* locals = _jvf->locals();
286 StackValueCollection* expressions = _jvf->expressions();
287 GrowableArray<MonitorInfo*>* monitors = _jvf->monitors();
288
289 int mode = 0;
290 if (_jvf->is_interpreted_frame()) {
291 mode = MODE_INTERPRETED;
292 } else if (_jvf->is_compiled_frame()) {
293 mode = MODE_COMPILED;
294 }
295
296 if (!locals->is_empty()) {
|