Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 9004:9f3a77848ea2
Merge with d2c34ddac70fe8636b79944417f44d396c0f9acf
author | Michael Haupt <michael.haupt@oracle.com> |
---|---|
date | Thu, 11 Apr 2013 11:26:38 +0200 |
parents | a8fea2979e63 707b20dd9512 |
children | 2979aaac95af |
comparison
equal
deleted
inserted
replaced
9003:a8fea2979e63 | 9004:9f3a77848ea2 |
---|---|
234 | 234 |
235 arrayOop values = (arrayOop) VirtualObject::values(value); | 235 arrayOop values = (arrayOop) VirtualObject::values(value); |
236 for (jint i = 0; i < values->length(); i++) { | 236 for (jint i = 0; i < values->length(); i++) { |
237 ScopeValue* cur_second = NULL; | 237 ScopeValue* cur_second = NULL; |
238 ScopeValue* value = get_hotspot_value(((oop*) values->base(T_OBJECT))[i], total_frame_size, objects, cur_second, oop_recorder); | 238 ScopeValue* value = get_hotspot_value(((oop*) values->base(T_OBJECT))[i], total_frame_size, objects, cur_second, oop_recorder); |
239 | 239 |
240 if (isLongArray && cur_second == NULL) { | 240 if (isLongArray && cur_second == NULL) { |
241 // we're trying to put ints into a long array... this isn't really valid, but it's used for some optimizations. | 241 // we're trying to put ints into a long array... this isn't really valid, but it's used for some optimizations. |
242 // add an int 0 constant | 242 // add an int 0 constant |
243 #ifdef VM_LITTLE_ENDIAN | 243 #ifdef VM_LITTLE_ENDIAN |
244 cur_second = new ConstantIntValue(0); | 244 cur_second = new ConstantIntValue(0); |
296 assumption_MethodContents(assumption); | 296 assumption_MethodContents(assumption); |
297 } else if (assumption->klass() == Assumptions_ConcreteSubtype::klass()) { | 297 } else if (assumption->klass() == Assumptions_ConcreteSubtype::klass()) { |
298 assumption_ConcreteSubtype(assumption); | 298 assumption_ConcreteSubtype(assumption); |
299 } else if (assumption->klass() == Assumptions_ConcreteMethod::klass()) { | 299 } else if (assumption->klass() == Assumptions_ConcreteMethod::klass()) { |
300 assumption_ConcreteMethod(assumption); | 300 assumption_ConcreteMethod(assumption); |
301 } else if (assumption->klass() == Assumptions_CallSiteTargetValue::klass()) { | |
302 assumption_CallSiteTargetValue(assumption); | |
301 } else { | 303 } else { |
302 assumption->print(); | 304 assumption->print(); |
303 fatal("unexpected Assumption subclass"); | 305 fatal("unexpected Assumption subclass"); |
304 } | 306 } |
305 } | 307 } |
348 } | 350 } |
349 | 351 |
350 // constructor used to create a stub | 352 // constructor used to create a stub |
351 CodeInstaller::CodeInstaller(Handle& target_method, BufferBlob*& blob, jlong& id) { | 353 CodeInstaller::CodeInstaller(Handle& target_method, BufferBlob*& blob, jlong& id) { |
352 No_Safepoint_Verifier no_safepoint; | 354 No_Safepoint_Verifier no_safepoint; |
353 | 355 |
354 _oop_recorder = new OopRecorder(&_arena); | 356 _oop_recorder = new OopRecorder(&_arena); |
355 initialize_fields(target_method(), NULL); | 357 initialize_fields(target_method(), NULL); |
356 assert(_name != NULL, "installMethod needs NON-NULL name"); | 358 assert(_name != NULL, "installMethod needs NON-NULL name"); |
357 | 359 |
358 // (very) conservative estimate: each site needs a relocation | 360 // (very) conservative estimate: each site needs a relocation |
396 buffer.initialize_stubs_size(256); | 398 buffer.initialize_stubs_size(256); |
397 buffer.initialize_consts_size(_constants_size); | 399 buffer.initialize_consts_size(_constants_size); |
398 | 400 |
399 _debug_recorder = new DebugInformationRecorder(_oop_recorder); | 401 _debug_recorder = new DebugInformationRecorder(_oop_recorder); |
400 _debug_recorder->set_oopmaps(new OopMapSet()); | 402 _debug_recorder->set_oopmaps(new OopMapSet()); |
401 | 403 |
402 buffer.initialize_oop_recorder(_oop_recorder); | 404 buffer.initialize_oop_recorder(_oop_recorder); |
403 | 405 |
404 _instructions = buffer.insts(); | 406 _instructions = buffer.insts(); |
405 _constants = buffer.consts(); | 407 _constants = buffer.consts(); |
406 | 408 |
464 | 466 |
465 methodHandle impl = getMethodFromHotSpotMethod(impl_handle()); | 467 methodHandle impl = getMethodFromHotSpotMethod(impl_handle()); |
466 Klass* context = asKlass(HotSpotResolvedObjectType::metaspaceKlass(context_handle)); | 468 Klass* context = asKlass(HotSpotResolvedObjectType::metaspaceKlass(context_handle)); |
467 | 469 |
468 _dependencies->assert_unique_concrete_method(context, impl()); | 470 _dependencies->assert_unique_concrete_method(context, impl()); |
471 } | |
472 | |
473 void CodeInstaller::assumption_CallSiteTargetValue(Handle assumption) { | |
474 Handle callSite = Assumptions_CallSiteTargetValue::callSite(assumption()); | |
475 Handle methodHandle = Assumptions_CallSiteTargetValue::methodHandle(assumption()); | |
476 | |
477 _dependencies->assert_call_site_target_value(callSite(), methodHandle()); | |
469 } | 478 } |
470 | 479 |
471 void CodeInstaller::process_exception_handlers() { | 480 void CodeInstaller::process_exception_handlers() { |
472 // allocate some arrays for use by the collection code. | 481 // allocate some arrays for use by the collection code. |
473 const int num_handlers = 5; | 482 const int num_handlers = 5; |