Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/type.cpp @ 2115:78e248949382
6876037: CTW fails jdk7/hotspot/src/share/vm/opto/type.cpp:2055. assert(bits,"Use TypePtr for NULL")
Summary: Add missing 0 value check in TypeRawPtr::add_offset().
Reviewed-by: never
author | kvn |
---|---|
date | Fri, 07 Jan 2011 11:53:24 -0800 |
parents | f95d63e2154a |
children | 8e72cd29b15d |
comparison
equal
deleted
inserted
replaced
2114:4fc084dac61e | 2115:78e248949382 |
---|---|
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. |
2185 case TypePtr::TopPTR: | 2185 case TypePtr::TopPTR: |
2186 case TypePtr::BotPTR: | 2186 case TypePtr::BotPTR: |
2187 case TypePtr::NotNull: | 2187 case TypePtr::NotNull: |
2188 return this; | 2188 return this; |
2189 case TypePtr::Null: | 2189 case TypePtr::Null: |
2190 case TypePtr::Constant: | 2190 case TypePtr::Constant: { |
2191 return make( _bits+offset ); | 2191 address bits = _bits+offset; |
2192 if ( bits == 0 ) return TypePtr::NULL_PTR; | |
2193 return make( bits ); | |
2194 } | |
2192 default: ShouldNotReachHere(); | 2195 default: ShouldNotReachHere(); |
2193 } | 2196 } |
2194 return NULL; // Lint noise | 2197 return NULL; // Lint noise |
2195 } | 2198 } |
2196 | 2199 |