--- a/hotspot/src/share/vm/oops/symbol.hpp Fri Feb 22 10:16:51 2013 -0800
+++ b/hotspot/src/share/vm/oops/symbol.hpp Wed Feb 27 09:40:30 2013 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,6 @@
#include "utilities/utf8.hpp"
#include "memory/allocation.hpp"
-#include "runtime/atomic.hpp"
// A Symbol is a canonicalized string.
// All Symbols reside in global SymbolTable and are reference counted.
@@ -150,8 +149,8 @@
// Reference counting. See comments above this class for when to use.
int refcount() const { return _refcount; }
- inline void increment_refcount();
- inline void decrement_refcount();
+ void increment_refcount();
+ void decrement_refcount();
int byte_at(int index) const {
assert(index >=0 && index < _length, "symbol index overflow");
@@ -232,26 +231,4 @@
return (((uintptr_t)this < (uintptr_t)other) ? -1
: ((uintptr_t)this == (uintptr_t) other) ? 0 : 1);
}
-
-inline void Symbol::increment_refcount() {
- // Only increment the refcount if positive. If negative either
- // overflow has occurred or it is a permanent symbol in a read only
- // shared archive.
- if (_refcount >= 0) {
- Atomic::inc(&_refcount);
- NOT_PRODUCT(Atomic::inc(&_total_count);)
- }
-}
-
-inline void Symbol::decrement_refcount() {
- if (_refcount >= 0) {
- Atomic::dec(&_refcount);
-#ifdef ASSERT
- if (_refcount < 0) {
- print();
- assert(false, "reference count underflow for symbol");
- }
-#endif
- }
-}
#endif // SHARE_VM_OOPS_SYMBOL_HPP