ciTypeArrayKlass.cpp revision 3602:da91efe96a93
1218887Sdim/*
2218887Sdim * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
3218887Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4218887Sdim *
5218887Sdim * This code is free software; you can redistribute it and/or modify it
6218887Sdim * under the terms of the GNU General Public License version 2 only, as
7218887Sdim * published by the Free Software Foundation.
8218887Sdim *
9218887Sdim * This code is distributed in the hope that it will be useful, but WITHOUT
10218887Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11226890Sdim * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12218887Sdim * version 2 for more details (a copy is included in the LICENSE file that
13218887Sdim * accompanied this code).
14218887Sdim *
15218887Sdim * You should have received a copy of the GNU General Public License version
16218887Sdim * 2 along with this work; if not, write to the Free Software Foundation,
17218887Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18218887Sdim *
19263509Sdim * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20226890Sdim * or visit www.oracle.com if you need additional information or have any
21226890Sdim * questions.
22226890Sdim *
23252723Sdim */
24218887Sdim
25252723Sdim#include "precompiled.hpp"
26252723Sdim#include "ci/ciTypeArrayKlass.hpp"
27235633Sdim#include "ci/ciUtilities.hpp"
28235633Sdim
29218887Sdim// ciTypeArrayKlass
30218887Sdim//
31218887Sdim// This class represents a Klass* in the HotSpot virtual machine
32218887Sdim// whose Klass part in a TypeArrayKlass.
33226890Sdim
34218887Sdim// ------------------------------------------------------------------
35218887Sdim// ciTypeArrayKlass::ciTypeArrayKlass
36218887SdimciTypeArrayKlass::ciTypeArrayKlass(KlassHandle h_k) : ciArrayKlass(h_k) {
37218887Sdim  assert(get_Klass()->oop_is_typeArray(), "wrong type");
38218887Sdim  assert(element_type() == get_typeArrayKlass()->element_type(), "");
39218887Sdim}
40218887Sdim
41218887Sdim// ------------------------------------------------------------------
42226890Sdim// ciTypeArrayKlass::make_impl
43218887Sdim//
44218887Sdim// Implementation of make.
45218887SdimciTypeArrayKlass* ciTypeArrayKlass::make_impl(BasicType t) {
46218887Sdim  Klass* k = Universe::typeArrayKlassObj(t);
47218887Sdim  return CURRENT_ENV->get_type_array_klass(k);
48218887Sdim}
49218887Sdim
50218887Sdim// ------------------------------------------------------------------
51218887Sdim// ciTypeArrayKlass::make
52226890Sdim//
53226890Sdim// Make an array klass corresponding to the specified primitive type.
54235633SdimciTypeArrayKlass* ciTypeArrayKlass::make(BasicType t) {
55235633Sdim  GUARDED_VM_ENTRY(return make_impl(t);)
56226890Sdim}
57235633Sdim