@@ -253,8 +253,7 @@ class InstanceKlass: public Klass {
253
253
_misc_is_shared_boot_class = 1 << 10 , // defining class loader is boot class loader
254
254
_misc_is_shared_platform_class = 1 << 11 , // defining class loader is platform class loader
255
255
_misc_is_shared_app_class = 1 << 12 , // defining class loader is app class loader
256
- _misc_has_resolved_methods = 1 << 13 , // resolved methods table entries added for this class
257
- _misc_has_contended_annotations = 1 << 14 // has @Contended annotation
256
+ _misc_has_contended_annotations = 1 << 13 // has @Contended annotation
258
257
};
259
258
u2 shared_loader_type_bits () const {
260
259
return _misc_is_shared_boot_class|_misc_is_shared_platform_class|_misc_is_shared_app_class;
@@ -366,10 +365,6 @@ class InstanceKlass: public Klass {
366
365
_misc_flags |= _misc_shared_loading_failed;
367
366
}
368
367
369
- void clear_shared_loading_failed () {
370
- _misc_flags &= ~_misc_shared_loading_failed;
371
- }
372
-
373
368
void set_shared_class_loader_type (s2 loader_type);
374
369
375
370
void assign_class_loader_type ();
@@ -378,10 +373,9 @@ class InstanceKlass: public Klass {
378
373
return (_misc_flags & _misc_has_nonstatic_fields) != 0 ;
379
374
}
380
375
void set_has_nonstatic_fields (bool b) {
376
+ assert (!has_nonstatic_fields (), " set once" );
381
377
if (b) {
382
378
_misc_flags |= _misc_has_nonstatic_fields;
383
- } else {
384
- _misc_flags &= ~_misc_has_nonstatic_fields;
385
379
}
386
380
}
387
381
@@ -563,10 +557,9 @@ class InstanceKlass: public Klass {
563
557
return (_misc_flags & _misc_should_verify_class) != 0 ;
564
558
}
565
559
void set_should_verify_class (bool value) {
560
+ assert (!should_verify_class (), " set once" );
566
561
if (value) {
567
562
_misc_flags |= _misc_should_verify_class;
568
- } else {
569
- _misc_flags &= ~_misc_should_verify_class;
570
563
}
571
564
}
572
565
@@ -695,10 +688,9 @@ class InstanceKlass: public Klass {
695
688
return (_misc_flags & _misc_is_contended) != 0 ;
696
689
}
697
690
void set_is_contended (bool value) {
691
+ assert (!is_contended (), " set once" );
698
692
if (value) {
699
693
_misc_flags |= _misc_is_contended;
700
- } else {
701
- _misc_flags &= ~_misc_is_contended;
702
694
}
703
695
}
704
696
@@ -733,10 +725,9 @@ class InstanceKlass: public Klass {
733
725
return ((_misc_flags & _misc_has_contended_annotations) != 0 );
734
726
}
735
727
void set_has_contended_annotations (bool value) {
728
+ assert (!has_contended_annotations (), " set once" );
736
729
if (value) {
737
730
_misc_flags |= _misc_has_contended_annotations;
738
- } else {
739
- _misc_flags &= ~_misc_has_contended_annotations;
740
731
}
741
732
}
742
733
@@ -789,11 +780,11 @@ class InstanceKlass: public Klass {
789
780
}
790
781
791
782
bool has_resolved_methods () const {
792
- return (_misc_flags & _misc_has_resolved_methods) != 0 ;
783
+ return _access_flags. has_resolved_methods () ;
793
784
}
794
785
795
786
void set_has_resolved_methods () {
796
- _misc_flags |= _misc_has_resolved_methods ;
787
+ _access_flags. set_has_resolved_methods () ;
797
788
}
798
789
private:
799
790
@@ -862,21 +853,19 @@ class InstanceKlass: public Klass {
862
853
return (_misc_flags & _misc_has_nonstatic_concrete_methods) != 0 ;
863
854
}
864
855
void set_has_nonstatic_concrete_methods (bool b) {
856
+ assert (!has_nonstatic_concrete_methods (), " set once" );
865
857
if (b) {
866
858
_misc_flags |= _misc_has_nonstatic_concrete_methods;
867
- } else {
868
- _misc_flags &= ~_misc_has_nonstatic_concrete_methods;
869
859
}
870
860
}
871
861
872
862
bool declares_nonstatic_concrete_methods () const {
873
863
return (_misc_flags & _misc_declares_nonstatic_concrete_methods) != 0 ;
874
864
}
875
865
void set_declares_nonstatic_concrete_methods (bool b) {
866
+ assert (!declares_nonstatic_concrete_methods (), " set once" );
876
867
if (b) {
877
868
_misc_flags |= _misc_declares_nonstatic_concrete_methods;
878
- } else {
879
- _misc_flags &= ~_misc_declares_nonstatic_concrete_methods;
880
869
}
881
870
}
882
871
1 commit comments
openjdk-notifier[bot] commentedon Dec 17, 2021
Review
Issues