hotspot/src/share/vm/oops/fieldStreams.hpp
changeset 33593 60764a78fa5c
parent 28396 7fe4347e6792
child 46329 53ccc37bda19
equal deleted inserted replaced
33579:01ade4446d96 33593:60764a78fa5c
     1 /*
     1 /*
     2  * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    77     _generic_signature_slot = length + skipped_generic_signature_slots;
    77     _generic_signature_slot = length + skipped_generic_signature_slots;
    78     assert(_generic_signature_slot <= _fields->length(), "");
    78     assert(_generic_signature_slot <= _fields->length(), "");
    79     return num_fields;
    79     return num_fields;
    80   }
    80   }
    81 
    81 
    82   FieldStreamBase(Array<u2>* fields, constantPoolHandle constants, int start, int limit) {
    82   FieldStreamBase(Array<u2>* fields, const constantPoolHandle& constants, int start, int limit) {
    83     _fields = fields;
    83     _fields = fields;
    84     _constants = constants;
    84     _constants = constants;
    85     _index = start;
    85     _index = start;
    86     int num_fields = init_generic_signature_start_slot();
    86     int num_fields = init_generic_signature_start_slot();
    87     if (limit < start) {
    87     if (limit < start) {
    89     } else {
    89     } else {
    90       _limit = limit;
    90       _limit = limit;
    91     }
    91     }
    92   }
    92   }
    93 
    93 
    94   FieldStreamBase(Array<u2>* fields, constantPoolHandle constants) {
    94   FieldStreamBase(Array<u2>* fields, const constantPoolHandle& constants) {
    95     _fields = fields;
    95     _fields = fields;
    96     _constants = constants;
    96     _constants = constants;
    97     _index = 0;
    97     _index = 0;
    98     _limit = init_generic_signature_start_slot();
    98     _limit = init_generic_signature_start_slot();
    99   }
    99   }
   249 };
   249 };
   250 
   250 
   251 
   251 
   252 class AllFieldStream : public FieldStreamBase {
   252 class AllFieldStream : public FieldStreamBase {
   253  public:
   253  public:
   254   AllFieldStream(Array<u2>* fields, constantPoolHandle constants): FieldStreamBase(fields, constants) {}
   254   AllFieldStream(Array<u2>* fields, const constantPoolHandle& constants): FieldStreamBase(fields, constants) {}
   255   AllFieldStream(InstanceKlass* k):      FieldStreamBase(k->fields(), k->constants()) {}
   255   AllFieldStream(InstanceKlass* k):      FieldStreamBase(k->fields(), k->constants()) {}
   256   AllFieldStream(instanceKlassHandle k): FieldStreamBase(k->fields(), k->constants()) {}
   256   AllFieldStream(instanceKlassHandle k): FieldStreamBase(k->fields(), k->constants()) {}
   257 };
   257 };
   258 
   258 
   259 #endif // SHARE_VM_OOPS_FIELDSTREAMS_HPP
   259 #endif // SHARE_VM_OOPS_FIELDSTREAMS_HPP