src/share/vm/classfile/classFileParser.cpp

changeset 3682
fc9d8850ab8b
parent 3384
2b3acb34791f
child 3686
749b1464aa81
     1.1 --- a/src/share/vm/classfile/classFileParser.cpp	Thu Mar 15 13:37:13 2012 +0100
     1.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Fri Mar 23 11:16:05 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -81,7 +81,7 @@
    1.11  #define JAVA_7_VERSION                    51
    1.12  
    1.13  
    1.14 -void ClassFileParser::parse_constant_pool_entries(constantPoolHandle cp, int length, TRAPS) {
    1.15 +void ClassFileParser::parse_constant_pool_entries(Handle class_loader, constantPoolHandle cp, int length, TRAPS) {
    1.16    // Use a local copy of ClassFileStream. It helps the C++ compiler to optimize
    1.17    // this function (_current can be allocated in a register, with scalar
    1.18    // replacement of aggregates). The _current pointer is copied back to
    1.19 @@ -272,7 +272,7 @@
    1.20              indices[names_count] = index;
    1.21              hashValues[names_count++] = hash;
    1.22              if (names_count == SymbolTable::symbol_alloc_batch_size) {
    1.23 -              SymbolTable::new_symbols(cp, names_count, names, lengths, indices, hashValues, CHECK);
    1.24 +              SymbolTable::new_symbols(class_loader, cp, names_count, names, lengths, indices, hashValues, CHECK);
    1.25                names_count = 0;
    1.26              }
    1.27            } else {
    1.28 @@ -289,7 +289,7 @@
    1.29  
    1.30    // Allocate the remaining symbols
    1.31    if (names_count > 0) {
    1.32 -    SymbolTable::new_symbols(cp, names_count, names, lengths, indices, hashValues, CHECK);
    1.33 +    SymbolTable::new_symbols(class_loader, cp, names_count, names, lengths, indices, hashValues, CHECK);
    1.34    }
    1.35  
    1.36    // Copy _current pointer of local copy back to stream().
    1.37 @@ -318,7 +318,7 @@
    1.38  
    1.39  bool inline valid_cp_range(int index, int length) { return (index > 0 && index < length); }
    1.40  
    1.41 -constantPoolHandle ClassFileParser::parse_constant_pool(TRAPS) {
    1.42 +constantPoolHandle ClassFileParser::parse_constant_pool(Handle class_loader, TRAPS) {
    1.43    ClassFileStream* cfs = stream();
    1.44    constantPoolHandle nullHandle;
    1.45  
    1.46 @@ -337,7 +337,7 @@
    1.47    ConstantPoolCleaner cp_in_error(cp); // set constant pool to be cleaned up.
    1.48  
    1.49    // parsing constant pool entries
    1.50 -  parse_constant_pool_entries(cp, length, CHECK_(nullHandle));
    1.51 +  parse_constant_pool_entries(class_loader, cp, length, CHECK_(nullHandle));
    1.52  
    1.53    int index = 1;  // declared outside of loops for portability
    1.54  
    1.55 @@ -2758,7 +2758,7 @@
    1.56    _relax_verify = Verifier::relax_verify_for(class_loader());
    1.57  
    1.58    // Constant pool
    1.59 -  constantPoolHandle cp = parse_constant_pool(CHECK_(nullHandle));
    1.60 +  constantPoolHandle cp = parse_constant_pool(class_loader, CHECK_(nullHandle));
    1.61    ConstantPoolCleaner error_handler(cp); // set constant pool to be cleaned up.
    1.62  
    1.63    int cp_size = cp->length();

mercurial