464 bool on_oop = type == T_OBJECT || type == T_ARRAY; |
464 bool on_oop = type == T_OBJECT || type == T_ARRAY; |
465 bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0; |
465 bool on_weak = (decorators & ON_WEAK_OOP_REF) != 0; |
466 bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0; |
466 bool on_phantom = (decorators & ON_PHANTOM_OOP_REF) != 0; |
467 bool not_in_heap = (decorators & IN_NATIVE) != 0; |
467 bool not_in_heap = (decorators & IN_NATIVE) != 0; |
468 bool on_reference = on_weak || on_phantom; |
468 bool on_reference = on_weak || on_phantom; |
469 bool keep_alive = (decorators & AS_NO_KEEPALIVE) == 0; |
469 bool is_traversal_mode = ShenandoahHeap::heap()->is_traversal_mode(); |
|
470 bool keep_alive = ((decorators & AS_NO_KEEPALIVE) == 0) || is_traversal_mode; |
470 |
471 |
471 BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread); |
472 BarrierSetAssembler::load_at(masm, decorators, type, dst, src, tmp1, tmp_thread); |
472 if (on_oop) { |
473 if (on_oop) { |
473 if (not_in_heap) { |
474 if (not_in_heap && !is_traversal_mode) { |
474 if (ShenandoahHeap::heap()->is_traversal_mode()) { |
475 load_reference_barrier_native(masm, dst); |
475 load_reference_barrier(masm, dst); |
|
476 keep_alive = true; |
|
477 } else { |
|
478 load_reference_barrier_native(masm, dst); |
|
479 } |
|
480 } else { |
476 } else { |
481 load_reference_barrier(masm, dst); |
477 load_reference_barrier(masm, dst); |
482 } |
478 } |
483 |
479 |
484 if (ShenandoahKeepAliveBarrier && on_reference && keep_alive) { |
480 if (ShenandoahKeepAliveBarrier && on_reference && keep_alive) { |