Mercurial > hg > graal-jvmci-8
comparison src/share/vm/compiler/oopMap.cpp @ 7125:1baf7f1e3f23
decoupled C++ Graal runtime from C1
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 03 Dec 2012 15:32:17 +0100 |
parents | 7d815d842ee0 |
children | 3ac7d10a6572 |
comparison
equal
deleted
inserted
replaced
7124:ab65fa23f8e9 | 7125:1baf7f1e3f23 |
---|---|
317 static DoNothingClosure do_nothing; | 317 static DoNothingClosure do_nothing; |
318 | 318 |
319 static void add_derived_oop(oop* base, oop* derived) { | 319 static void add_derived_oop(oop* base, oop* derived) { |
320 #ifndef TIERED | 320 #ifndef TIERED |
321 COMPILER1_PRESENT(ShouldNotReachHere();) | 321 COMPILER1_PRESENT(ShouldNotReachHere();) |
322 GRAAL_ONLY(ShouldNotReachHere();) | |
322 #endif // TIERED | 323 #endif // TIERED |
323 #ifdef COMPILER2 | 324 #ifdef COMPILER2 |
324 DerivedPointerTable::add(derived, base); | 325 DerivedPointerTable::add(derived, base); |
325 #endif // COMPILER2 | 326 #endif // COMPILER2 |
326 } | 327 } |
378 { | 379 { |
379 OopMapStream oms(map,OopMapValue::derived_oop_value); | 380 OopMapStream oms(map,OopMapValue::derived_oop_value); |
380 if (!oms.is_done()) { | 381 if (!oms.is_done()) { |
381 #ifndef TIERED | 382 #ifndef TIERED |
382 COMPILER1_PRESENT(ShouldNotReachHere();) | 383 COMPILER1_PRESENT(ShouldNotReachHere();) |
384 GRAAL_ONLY(ShouldNotReachHere();) | |
383 #endif // !TIERED | 385 #endif // !TIERED |
384 // Protect the operation on the derived pointers. This | 386 // Protect the operation on the derived pointers. This |
385 // protects the addition of derived pointers to the shared | 387 // protects the addition of derived pointers to the shared |
386 // derived pointer table in DerivedPointerTable::add(). | 388 // derived pointer table in DerivedPointerTable::add(). |
387 MutexLockerEx x(DerivedPointerTableGC_lock, Mutex::_no_safepoint_check_flag); | 389 MutexLockerEx x(DerivedPointerTableGC_lock, Mutex::_no_safepoint_check_flag); |
500 nof_callee++; | 502 nof_callee++; |
501 } | 503 } |
502 | 504 |
503 // Check that runtime stubs save all callee-saved registers | 505 // Check that runtime stubs save all callee-saved registers |
504 #ifdef COMPILER2 | 506 #ifdef COMPILER2 |
505 assert(cb->is_compiled_by_c1() || !cb->is_runtime_stub() || | 507 assert(cb->is_compiled_by_c1() || cb->is_compiled_by_graal() || !cb->is_runtime_stub() || |
506 (nof_callee >= SAVED_ON_ENTRY_REG_COUNT || nof_callee >= C_SAVED_ON_ENTRY_REG_COUNT), | 508 (nof_callee >= SAVED_ON_ENTRY_REG_COUNT || nof_callee >= C_SAVED_ON_ENTRY_REG_COUNT), |
507 "must save all"); | 509 "must save all"); |
508 #endif // COMPILER2 | 510 #endif // COMPILER2 |
509 | 511 |
510 // Copy found callee-saved register to reg_map | 512 // Copy found callee-saved register to reg_map |
519 #ifndef PRODUCT | 521 #ifndef PRODUCT |
520 | 522 |
521 bool OopMap::has_derived_pointer() const { | 523 bool OopMap::has_derived_pointer() const { |
522 #ifndef TIERED | 524 #ifndef TIERED |
523 COMPILER1_PRESENT(return false); | 525 COMPILER1_PRESENT(return false); |
526 GRAAL_ONLY(return false); | |
524 #endif // !TIERED | 527 #endif // !TIERED |
525 #ifdef COMPILER2 | 528 #ifdef COMPILER2 |
526 OopMapStream oms((OopMap*)this,OopMapValue::derived_oop_value); | 529 OopMapStream oms((OopMap*)this,OopMapValue::derived_oop_value); |
527 return oms.is_done(); | 530 return oms.is_done(); |
528 #else | 531 #else |