twisti@2047: /* stefank@2314: * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. twisti@2047: * Copyright 2008, 2009 Red Hat, Inc. twisti@2047: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. twisti@2047: * twisti@2047: * This code is free software; you can redistribute it and/or modify it twisti@2047: * under the terms of the GNU General Public License version 2 only, as twisti@2047: * published by the Free Software Foundation. twisti@2047: * twisti@2047: * This code is distributed in the hope that it will be useful, but WITHOUT twisti@2047: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or twisti@2047: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License twisti@2047: * version 2 for more details (a copy is included in the LICENSE file that twisti@2047: * accompanied this code). twisti@2047: * twisti@2047: * You should have received a copy of the GNU General Public License version twisti@2047: * 2 along with this work; if not, write to the Free Software Foundation, twisti@2047: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. twisti@2047: * twisti@2047: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA twisti@2047: * or visit www.oracle.com if you need additional information or have any twisti@2047: * questions. twisti@2047: * twisti@2047: */ twisti@2047: stefank@2314: #ifndef SHARE_VM_SHARK_SHARKENTRY_HPP stefank@2314: #define SHARE_VM_SHARK_SHARKENTRY_HPP stefank@2314: stefank@2314: #include "shark/llvmHeaders.hpp" stefank@2314: twisti@2047: class SharkContext; twisti@2047: twisti@2047: class SharkEntry : public ZeroEntry { twisti@2047: private: twisti@2047: address _code_limit; twisti@2047: SharkContext* _context; twisti@2047: llvm::Function* _function; twisti@2047: twisti@2047: public: twisti@2047: address code_start() const { twisti@2047: return entry_point(); twisti@2047: } twisti@2047: address code_limit() const { twisti@2047: return _code_limit; twisti@2047: } twisti@2047: SharkContext* context() const { twisti@2047: return _context; twisti@2047: } twisti@2047: llvm::Function* function() const { twisti@2047: return _function; twisti@2047: } twisti@2047: twisti@2047: public: twisti@2047: void set_code_limit(address code_limit) { twisti@2047: _code_limit = code_limit; twisti@2047: } twisti@2047: void set_context(SharkContext* context) { twisti@2047: _context = context; twisti@2047: } twisti@2047: void set_function(llvm::Function* function) { twisti@2047: _function = function; twisti@2047: } twisti@2047: }; stefank@2314: stefank@2314: #endif // SHARE_VM_SHARK_SHARKENTRY_HPP