src/share/vm/opto/type.cpp

changeset 2435
78e248949382
parent 2314
f95d63e2154a
child 2633
8e72cd29b15d
     1.1 --- a/src/share/vm/opto/type.cpp	Fri Jan 07 10:16:57 2011 -0800
     1.2 +++ b/src/share/vm/opto/type.cpp	Fri Jan 07 11:53:24 2011 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2011, 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 @@ -2187,8 +2187,11 @@
    1.11    case TypePtr::NotNull:
    1.12      return this;
    1.13    case TypePtr::Null:
    1.14 -  case TypePtr::Constant:
    1.15 -    return make( _bits+offset );
    1.16 +  case TypePtr::Constant: {
    1.17 +    address bits = _bits+offset;
    1.18 +    if ( bits == 0 ) return TypePtr::NULL_PTR;
    1.19 +    return make( bits );
    1.20 +  }
    1.21    default:  ShouldNotReachHere();
    1.22    }
    1.23    return NULL;                  // Lint noise

mercurial