comparison src/share/vm/c1x/c1x_CodeInstaller.cpp @ 1458:dc114f680d9c

Merge.
author Doug Simon <doug.simon@oracle.com>
date Sat, 13 Nov 2010 08:15:52 +0100
parents d603bdbec024
children 1845386f5403
comparison
equal deleted inserted replaced
1457:572d4c6d6ce6 1458:dc114f680d9c
64 map->set_value(reg); 64 map->set_value(reg);
65 } 65 }
66 } 66 }
67 67
68 if (frame_size > 0) { 68 if (frame_size > 0) {
69 assert(frame_map->length() == ((frame_size / HeapWordSize) + 7) / 8, "unexpected register_map length"); 69 assert(frame_map->length() == ((frame_size / HeapWordSize) + 7) / 8, "unexpected frame_map length");
70 70
71 for (jint i = 0; i < frame_size / HeapWordSize; i++) { 71 for (jint i = 0; i < frame_size / HeapWordSize; i++) {
72 unsigned char byte = ((unsigned char*) frame_map->base(T_BYTE))[i / 8]; 72 unsigned char byte = ((unsigned char*) frame_map->base(T_BYTE))[i / 8];
73 bool is_oop = (byte & (1 << (i % 8))) != 0; 73 bool is_oop = (byte & (1 << (i % 8))) != 0;
74 // hotspot stack slots are 4 bytes 74 // hotspot stack slots are 4 bytes
325 } else { 325 } else {
326 Bytecodes::Code code = Bytecodes::java_code_at(method->bcp_from(bci)); 326 Bytecodes::Code code = Bytecodes::java_code_at(method->bcp_from(bci));
327 reexecute = Interpreter::bytecode_should_reexecute(code); 327 reexecute = Interpreter::bytecode_should_reexecute(code);
328 } 328 }
329 329
330
331 if (frame != NULL) { 330 if (frame != NULL) {
332 jint local_count = CiDebugInfo_Frame::numLocals(frame); 331 jint local_count = CiDebugInfo_Frame::numLocals(frame);
333 jint expression_count = CiDebugInfo_Frame::numStack(frame); 332 jint expression_count = CiDebugInfo_Frame::numStack(frame);
334 jint monitor_count = CiDebugInfo_Frame::numLocks(frame); 333 jint monitor_count = CiDebugInfo_Frame::numLocks(frame);
335 arrayOop values = (arrayOop) CiDebugInfo_Frame::values(frame); 334 arrayOop values = (arrayOop) CiDebugInfo_Frame::values(frame);
348 } else if (i < local_count + expression_count) { 347 } else if (i < local_count + expression_count) {
349 expressions->append(value); 348 expressions->append(value);
350 } else { 349 } else {
351 assert(value->is_location(), "invalid monitor location"); 350 assert(value->is_location(), "invalid monitor location");
352 LocationValue* loc = (LocationValue*)value; 351 LocationValue* loc = (LocationValue*)value;
353 LocationValue* obj = new LocationValue(Location::new_stk_loc(Location::oop, loc->location().stack_offset() + HeapWordSize)); 352 int monitor_offset = loc->location().stack_offset();
354 monitors->append(new MonitorValue(obj, Location::new_stk_loc(Location::normal, loc->location().stack_offset()))); 353 LocationValue* obj = new LocationValue(Location::new_stk_loc(Location::oop, monitor_offset + BasicObjectLock::obj_offset_in_bytes()));
354 monitors->append(new MonitorValue(obj, Location::new_stk_loc(Location::normal, monitor_offset + BasicObjectLock::lock_offset_in_bytes())));
355 } 355 }
356 } 356 }
357 DebugToken* locals_token = _debug_recorder->create_scope_values(locals); 357 DebugToken* locals_token = _debug_recorder->create_scope_values(locals);
358 DebugToken* expressions_token = _debug_recorder->create_scope_values(expressions); 358 DebugToken* expressions_token = _debug_recorder->create_scope_values(expressions);
359 DebugToken* monitors_token = _debug_recorder->create_monitor_values(monitors); 359 DebugToken* monitors_token = _debug_recorder->create_monitor_values(monitors);
383 oop hotspot_method = CiTargetMethod_Call::method(site); 383 oop hotspot_method = CiTargetMethod_Call::method(site);
384 oop symbol = CiTargetMethod_Call::symbol(site); 384 oop symbol = CiTargetMethod_Call::symbol(site);
385 oop global_stub = CiTargetMethod_Call::globalStubID(site); 385 oop global_stub = CiTargetMethod_Call::globalStubID(site);
386 386
387 oop debug_info = CiTargetMethod_Call::debugInfo(site); 387 oop debug_info = CiTargetMethod_Call::debugInfo(site);
388 arrayOop stack_map = (arrayOop) CiTargetMethod_Call::stackMap(site);
389 arrayOop register_map = (arrayOop) CiTargetMethod_Call::registerMap(site);
390 388
391 assert((runtime_call ? 1 : 0) + (hotspot_method ? 1 : 0) + (symbol ? 1 : 0) + (global_stub ? 1 : 0) == 1, "Call site needs exactly one type"); 389 assert((runtime_call ? 1 : 0) + (hotspot_method ? 1 : 0) + (symbol ? 1 : 0) + (global_stub ? 1 : 0) == 1, "Call site needs exactly one type");
392 390
393 assert(NativeCall::instruction_size == (int)NativeJump::instruction_size, "unexpected size)"); 391 assert(NativeCall::instruction_size == (int)NativeJump::instruction_size, "unexpected size)");
394 jint next_pc_offset = pc_offset + NativeCall::instruction_size; 392 jint next_pc_offset = pc_offset + NativeCall::instruction_size;