/*
* Copyright 2009 Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "runtime/handles.hpp"
#include "shark/llvmHeaders.hpp"
#include "shark/sharkBuilder.hpp"
#include "shark/sharkContext.hpp"
#include "shark/sharkInvariants.hpp"
#include "shark/sharkStack.hpp"
friend class SharkStackWithNativeFrame;
public:
const char* name,
return new SharkNativeWrapper(builder,
name,
}
private:
const char* name,
private:
void initialize(const char* name);
private:
int _lock_slot_offset;
// The method being compiled.
protected:
return _target;
}
// Properties of the method.
protected:
int arg_size() const {
return target()->size_of_parameters();
}
return _arg_types[i];
}
return _return_type;
}
bool is_static() const {
}
bool is_synchronized() const {
return target()->is_synchronized();
}
bool is_returning_oop() const {
return target()->is_returning_oop();
}
// The LLVM function we are building.
public:
return _function;
}
// The Zero stack and our frame on it.
protected:
return _stack;
}
// Temporary oop storage.
protected:
return _oop_tmp_slot;
}
// Information required by nmethod::new_native_nmethod().
public:
int frame_size() const {
return stack()->oopmap_frame_size();
}
}
}
return _oop_maps;
}
// Helpers.
private:
}
return builder()->CreateAddressOfStructEntry(
"thread_state_address");
}
return builder()->CreateAddressOfStructEntry(
"pending_exception_address");
}
builder()->CreateStore(
}
void CreateWriteMemorySerializePage() const {
builder()->CreateStore(
builder()->CreateLShr(
}
void CreateResetHandleBlock() const {
thread(),
"active_handles");
builder()->CreateStore(
LLVMValue::intptr_constant(0),
"top"));
}
return builder()->CreateLoad(
pending_exception_address(), "pending_exception");
}
};
#endif // SHARE_VM_SHARK_SHARKNATIVEWRAPPER_HPP