src/share/vm/runtime/relocator.hpp

changeset 2462
8012aa3ccede
parent 2314
f95d63e2154a
child 2466
2f33b03bd915
equal deleted inserted replaced
2450:34d64ad817f4 2462:8012aa3ccede
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2011, 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.
104 inline void short_at_put(int bci, short value) { Bytes::put_Java_u2((address) &code_array()[bci], value); } 104 inline void short_at_put(int bci, short value) { Bytes::put_Java_u2((address) &code_array()[bci], value); }
105 105
106 // get the address of in the code_array 106 // get the address of in the code_array
107 inline char* addr_at(int bci) const { return (char*) &code_array()[bci]; } 107 inline char* addr_at(int bci) const { return (char*) &code_array()[bci]; }
108 108
109 int instruction_length_at(int bci) { return Bytecodes::length_at(code_array() + bci); } 109 int instruction_length_at(int bci) { return Bytecodes::length_at(_method(), code_array() + bci); }
110 110
111 // Helper methods 111 // Helper methods
112 int align(int n) const { return (n+3) & ~3; } 112 int align(int n) const { return (n+3) & ~3; }
113 int code_slop_pct() const { return 25; } 113 int code_slop_pct() const { return 25; }
114 bool is_opcode_lookupswitch(Bytecodes::Code bc); 114 bool is_opcode_lookupswitch(Bytecodes::Code bc);

mercurial