1.1 --- a/src/share/vm/code/codeBlob.hpp Mon Jan 04 07:04:46 2010 -0800 1.2 +++ b/src/share/vm/code/codeBlob.hpp Mon Jan 04 18:38:08 2010 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 1998-2009 Sun Microsystems, Inc. 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 @@ -102,6 +102,9 @@ 1.11 virtual bool is_compiled_by_c2() const { return false; } 1.12 virtual bool is_compiled_by_c1() const { return false; } 1.13 1.14 + // Casting 1.15 + nmethod* as_nmethod_or_null() { return is_nmethod() ? (nmethod*) this : NULL; } 1.16 + 1.17 // Boundaries 1.18 address header_begin() const { return (address) this; } 1.19 address header_end() const { return ((address) this) + _header_size; };