/*
* 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 "precompiled.hpp"
#include "ci/ciInstance.hpp"
#include "ci/ciStreams.hpp"
#include "shark/sharkBuilder.hpp"
#include "shark/sharkConstant.hpp"
#include "shark/sharkValue.hpp"
using namespace llvm;
else
}
}
bool will_link;
}
switch (constant.basic_type()) {
case T_BOOLEAN:
case T_BYTE:
case T_CHAR:
case T_SHORT:
case T_INT:
break;
case T_LONG:
break;
case T_FLOAT:
break;
case T_DOUBLE:
break;
case T_OBJECT:
case T_ARRAY:
break;
case T_ILLEGAL:
// out of memory
_is_loaded = false;
return;
default:
}
// Handle primitive types. We create SharkValues for these
// now; doing so doesn't emit any code, and it allows us to
// delegate a bunch of stuff to the SharkValue code.
if (value) {
_is_loaded = true;
return;
}
// Handle reference types. This is tricky because some
// ciObjects are psuedo-objects that refer to oops which
// have yet to be created. We need to spot the unloaded
// objects (which differ between ldc* and get*, thanks!)
// The constant returned for a klass is the ciKlass
// for the entry, but we want the java_mirror.
_is_loaded = false;
return;
}
}
_is_loaded = false;
return;
}
_is_loaded = true;
_is_nonzero = true;
_is_two_word = false;
}