< prev index next >

src/hotspot/share/oops/compressedOops.inline.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2017, 2018, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2017, 2019, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 27,36 **** --- 27,37 ---- #include "gc/shared/collectedHeap.hpp" #include "memory/universe.hpp" #include "oops/compressedOops.hpp" #include "oops/oop.hpp" + #include "utilities/align.hpp" // Functions for encoding and decoding compressed oops. // If the oops are compressed, the type passed to these overloaded functions // is narrowOop. All functions are overloaded so they can be called by // template functions without conditionals (the compiler instantiates via
*** 45,55 **** } inline oop CompressedOops::decode_not_null(narrowOop v) { assert(!is_null(v), "narrow oop value can never be zero"); oop result = decode_raw(v); ! assert(check_obj_alignment(result), "address not aligned: " INTPTR_FORMAT, p2i((void*) result)); return result; } inline oop CompressedOops::decode(narrowOop v) { return is_null(v) ? (oop)NULL : decode_not_null(v); --- 46,56 ---- } inline oop CompressedOops::decode_not_null(narrowOop v) { assert(!is_null(v), "narrow oop value can never be zero"); oop result = decode_raw(v); ! assert(is_object_aligned(result), "address not aligned: " INTPTR_FORMAT, p2i((void*) result)); return result; } inline oop CompressedOops::decode(narrowOop v) { return is_null(v) ? (oop)NULL : decode_not_null(v);
< prev index next >