equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 1998-2009 Sun Microsystems, Inc. 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. |
100 virtual bool is_adapter_blob() const { return false; } |
100 virtual bool is_adapter_blob() const { return false; } |
101 |
101 |
102 virtual bool is_compiled_by_c2() const { return false; } |
102 virtual bool is_compiled_by_c2() const { return false; } |
103 virtual bool is_compiled_by_c1() const { return false; } |
103 virtual bool is_compiled_by_c1() const { return false; } |
104 |
104 |
|
105 // Casting |
|
106 nmethod* as_nmethod_or_null() { return is_nmethod() ? (nmethod*) this : NULL; } |
|
107 |
105 // Boundaries |
108 // Boundaries |
106 address header_begin() const { return (address) this; } |
109 address header_begin() const { return (address) this; } |
107 address header_end() const { return ((address) this) + _header_size; }; |
110 address header_end() const { return ((address) this) + _header_size; }; |
108 relocInfo* relocation_begin() const { return (relocInfo*) header_end(); }; |
111 relocInfo* relocation_begin() const { return (relocInfo*) header_end(); }; |
109 relocInfo* relocation_end() const { return (relocInfo*)(header_end() + _relocation_size); } |
112 relocInfo* relocation_end() const { return (relocInfo*)(header_end() + _relocation_size); } |