/*
* 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 "c1/c1_ValueType.hpp"
#include "ci/ciArray.hpp"
#include "ci/ciInstance.hpp"
#include "ci/ciNullObject.hpp"
// predefined types
// predefined constants
// Note: Must initialize all types for each compilation
// as they are allocated within a ResourceMark!
// types
};
// incomplete & conservative solution for now - fix this!
return base();
}
return NULL;
}
return constant_value()->constant_encoding();
}
return constant_value()->is_loaded();
}
ciObject* c = constant_value();
}
ciObject* c = constant_value();
}
ciObject* c = constant_value();
}
ciObject* c = constant_value();
}
switch (type) {
case T_BYTE : // fall through
case T_CHAR : // fall through
case T_SHORT : // fall through
case T_BOOLEAN: // fall through
case T_DOUBLE : return doubleType;
case T_OBJECT : return objectType;
case T_ADDRESS: return addressType;
case T_ILLEGAL: return illegalType;
}
return illegalType;
}
switch (value.basic_type()) {
case T_BYTE : // fall through
case T_CHAR : // fall through
case T_SHORT : // fall through
case T_BOOLEAN: // fall through
case T_ARRAY : // fall through (ciConstant doesn't have an array accessor)
}
return illegalType;
}
case addressTag: return T_ADDRESS;
case illegalTag: return T_ILLEGAL;
}
return T_ILLEGAL;
}