Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 8947:707b20dd9512
draft call site target value assumption
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Tue, 09 Apr 2013 17:23:32 +0200 |
parents | ec06c7e67698 |
children | 9f3a77848ea2 |
comparison
equal
deleted
inserted
replaced
8946:7a4dc62006bf | 8947:707b20dd9512 |
---|---|
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 |
456 | 458 |
457 methodHandle impl = getMethodFromHotSpotMethod(impl_handle()); | 459 methodHandle impl = getMethodFromHotSpotMethod(impl_handle()); |
458 Klass* context = asKlass(HotSpotResolvedObjectType::metaspaceKlass(context_handle)); | 460 Klass* context = asKlass(HotSpotResolvedObjectType::metaspaceKlass(context_handle)); |
459 | 461 |
460 _dependencies->assert_unique_concrete_method(context, impl()); | 462 _dependencies->assert_unique_concrete_method(context, impl()); |
463 } | |
464 | |
465 void CodeInstaller::assumption_CallSiteTargetValue(Handle assumption) { | |
466 Handle callSite = Assumptions_CallSiteTargetValue::callSite(assumption()); | |
467 Handle methodHandle = Assumptions_CallSiteTargetValue::methodHandle(assumption()); | |
468 | |
469 _dependencies->assert_call_site_target_value(callSite(), methodHandle()); | |
461 } | 470 } |
462 | 471 |
463 void CodeInstaller::process_exception_handlers() { | 472 void CodeInstaller::process_exception_handlers() { |
464 // allocate some arrays for use by the collection code. | 473 // allocate some arrays for use by the collection code. |
465 const int num_handlers = 5; | 474 const int num_handlers = 5; |