< prev index next >
src/share/vm/shark/sharkTopLevelBlock.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2008, 2009, 2010 Red Hat, Inc.
* 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
--- 1,7 ----
/*
! * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright 2008, 2009, 2010 Red Hat, Inc.
* 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
*** 1141,1152 ****
return builder()->CreateLoad(
builder()->CreateArrayAddress(
klass,
SharkType::Method_type(),
! vtableEntry::size() * wordSize,
! in_ByteSize(InstanceKlass::vtable_start_offset() * wordSize),
LLVMValue::intptr_constant(vtable_index)),
"callee");
}
Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver,
--- 1141,1152 ----
return builder()->CreateLoad(
builder()->CreateArrayAddress(
klass,
SharkType::Method_type(),
! vtableEntry::size_in_bytes(),
! InstanceKlass::vtable_start_offset(),
LLVMValue::intptr_constant(vtable_index)),
"callee");
}
Value* SharkTopLevelBlock::get_interface_callee(SharkValue *receiver,
*** 1164,1190 ****
"object_klass");
Value *vtable_start = builder()->CreateAdd(
builder()->CreatePtrToInt(object_klass, SharkType::intptr_type()),
LLVMValue::intptr_constant(
! InstanceKlass::vtable_start_offset() * HeapWordSize),
"vtable_start");
Value *vtable_length = builder()->CreateValueOfStructEntry(
object_klass,
! in_ByteSize(InstanceKlass::vtable_length_offset() * HeapWordSize),
SharkType::jint_type(),
"vtable_length");
vtable_length =
builder()->CreateIntCast(vtable_length, SharkType::intptr_type(), false);
bool needs_aligning = HeapWordsPerLong > 1;
Value *itable_start = builder()->CreateAdd(
vtable_start,
builder()->CreateShl(
vtable_length,
! LLVMValue::intptr_constant(exact_log2(vtableEntry::size() * wordSize))),
needs_aligning ? "" : "itable_start");
if (needs_aligning) {
itable_start = builder()->CreateAnd(
builder()->CreateAdd(
itable_start, LLVMValue::intptr_constant(BytesPerLong - 1)),
--- 1164,1190 ----
"object_klass");
Value *vtable_start = builder()->CreateAdd(
builder()->CreatePtrToInt(object_klass, SharkType::intptr_type()),
LLVMValue::intptr_constant(
! in_bytes(InstanceKlass::vtable_start_offset())),
"vtable_start");
Value *vtable_length = builder()->CreateValueOfStructEntry(
object_klass,
! InstanceKlass::vtable_length_offset(),
SharkType::jint_type(),
"vtable_length");
vtable_length =
builder()->CreateIntCast(vtable_length, SharkType::intptr_type(), false);
bool needs_aligning = HeapWordsPerLong > 1;
Value *itable_start = builder()->CreateAdd(
vtable_start,
builder()->CreateShl(
vtable_length,
! LLVMValue::intptr_constant(exact_log2(vtableEntry::size_in_bytes()))),
needs_aligning ? "" : "itable_start");
if (needs_aligning) {
itable_start = builder()->CreateAnd(
builder()->CreateAdd(
itable_start, LLVMValue::intptr_constant(BytesPerLong - 1)),
< prev index next >