Mercurial > hg > truffle
diff src/share/vm/oops/fieldInfo.hpp @ 12190:edb5ab0f3fe5
8001107: @Stable annotation for constant folding of lazily evaluated variables
Reviewed-by: rbackman, twisti, kvn
Contributed-by: john.r.rose@oracle.com, vladimir.x.ivanov@oracle.com
author | vlivanov |
---|---|
date | Tue, 10 Sep 2013 14:51:48 -0700 |
parents | be4d5c6c1f79 |
children | de6a9e811145 |
line wrap: on
line diff
--- a/src/share/vm/oops/fieldInfo.hpp Mon Sep 09 19:53:28 2013 +0200 +++ b/src/share/vm/oops/fieldInfo.hpp Tue Sep 10 14:51:48 2013 -0700 @@ -240,6 +240,14 @@ return (access_flags() & JVM_ACC_FIELD_INTERNAL) != 0; } + bool is_stable() const { + return (access_flags() & JVM_ACC_FIELD_STABLE) != 0; + } + void set_stable(bool z) { + if (z) _shorts[access_flags_offset] |= JVM_ACC_FIELD_STABLE; + else _shorts[access_flags_offset] &= ~JVM_ACC_FIELD_STABLE; + } + Symbol* lookup_symbol(int symbol_index) const { assert(is_internal(), "only internal fields"); return vmSymbols::symbol_at((vmSymbols::SID)symbol_index);