comparison src/share/vm/oops/constMethodOop.cpp @ 6123:2fe087c3e814

7172967: Eliminate constMethod's _method backpointer to methodOop. Summary: Eliminate constMethod's _method backpointer to methodOop, and move the _constant field from methodOop to constMethod. Reviewed-by: roland, bdelsart, kamg
author jiangli
date Wed, 06 Jun 2012 14:33:43 -0400
parents f95d63e2154a
children 8150fa46d2ed
comparison
equal deleted inserted replaced
6115:6e2633440960 6123:2fe087c3e814
1 /* 1 /*
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2012, 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.
51 } 51 }
52 int extra_words = align_size_up(extra_bytes, BytesPerWord) / BytesPerWord; 52 int extra_words = align_size_up(extra_bytes, BytesPerWord) / BytesPerWord;
53 return align_object_size(header_size() + extra_words); 53 return align_object_size(header_size() + extra_words);
54 } 54 }
55 55
56 methodOop constMethodOopDesc::method() const {
57 return instanceKlass::cast(_constants->pool_holder())->method_with_idnum(
58 _method_idnum);
59 }
56 60
57 // linenumber table - note that length is unknown until decompression, 61 // linenumber table - note that length is unknown until decompression,
58 // see class CompressedLineNumberReadStream. 62 // see class CompressedLineNumberReadStream.
59 63
60 u_char* constMethodOopDesc::compressed_linenumber_table() const { 64 u_char* constMethodOopDesc::compressed_linenumber_table() const {