ciUtilities.hpp revision 1472
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved.
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * This code is free software; you can redistribute it and/or modify it
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * under the terms of the GNU General Public License version 2 only, as
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * published by the Free Software Foundation.
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * This code is distributed in the hope that it will be useful, but WITHOUT
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * version 2 for more details (a copy is included in the LICENSE file that
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * accompanied this code).
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * You should have received a copy of the GNU General Public License version
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * 2 along with this work; if not, write to the Free Software Foundation,
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * or visit www.oracle.com if you need additional information or have any
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * questions.
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff// The following routines and definitions are used internally in the
79d12e9411155c9e79c08df9bb6412b2862e6064Brendan Mmiller// compiler interface.
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff// Add a ci native entry wrapper?
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff// Bring the compilation thread into the VM state.
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff CompilerThread* thread=CompilerThread::current(); \
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff// Bring the compilation thread into the VM state. No handle mark.
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff CompilerThread* thread=CompilerThread::current(); \
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * [TODO] The NoHandleMark line does nothing but declare a function prototype \
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * The NoHandkeMark constructor is NOT executed. If the ()'s are \
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * removed, causes the NoHandleMark assert to trigger. \
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff * debug_only(NoHandleMark __hm();) \
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff CompilerThread* thread=CompilerThread::current(); \
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff// where current thread is THREAD
5c625c17767aae6167c744e9e1ad40c3d1455e31Andi Egloff {if (IS_IN_VM) { action } else { VM_ENTRY_MARK; { action }}}
THREAD); \
if (HAS_PENDING_EXCEPTION) { \
return (result); \
return (result); \
#define KILL_COMPILE_ON_ANY \
THREAD); \
if (HAS_PENDING_EXCEPTION) { \
inline const char* bool_to_str(bool b) {