<commit_before>/*
 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
 * 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
 * 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.
 */
package com.oracle.graal.api.meta;

import java.lang.reflect.*;

/**
 * Denotes the basic kinds of types in CRI, including the all the Java primitive types, for example,
 * {@link Kind#Int} for {@code int} and {@link Kind#Object} for all object types. A kind has a
 * single character short name, a Java name, and a set of flags further describing its behavior.
 */
public enum Kind implements PlatformKind {
    /** The primitive boolean kind, represented as an int on the stack. */
    Boolean('z', "boolean", true, java.lang.Boolean.TYPE, java.lang.Boolean.class),

    /** The primitive byte kind, represented as an int on the stack. */
    Byte('b', "byte", true, java.lang.Byte.TYPE, java.lang.Byte.class),

    /** The primitive short kind, represented as an int on the stack. */
    Short('s', "short", true, java.lang.Short.TYPE, java.lang.Short.class),

    /** The primitive char kind, represented as an int on the stack. */
    Char('c', "char", true, java.lang.Character.TYPE, java.lang.Character.class),

    /** The primitive int kind, represented as an int on the stack. */
    Int('i', "int", true, java.lang.Integer.TYPE, java.lang.Integer.class),

    /** The primitive float kind. */
    Float('f', "float", false, java.lang.Float.TYPE, java.lang.Float.class),

    /** The primitive long kind. */
    Long('j', "long", false, java.lang.Long.TYPE, java.lang.Long.class),

    /** The primitive double kind. */
    Double('d', "double", false, java.lang.Double.TYPE, java.lang.Double.class),

    /** The Object kind, also used for arrays. */
    Object('a', "Object", false, null, null),

    /** The narrow oop kind. */
    NarrowOop('n', "NarrowOop", false, null, null),

    /** The void float kind. */
    Void('v', "void", false, java.lang.Void.TYPE, java.lang.Void.class),

    /** The non-type. */
    Illegal('-', "illegal", false, null, null);

    private final char typeChar;
    private final String javaName;
    private final boolean isStackInt;
    private final Class primitiveJavaClass;
    private final Class boxedJavaClass;

    private Kind(char typeChar, String javaName, boolean isStackInt, Class primitiveJavaClass, Class boxedJavasClass) {
        this.typeChar = typeChar;
        this.javaName = javaName;
        this.isStackInt = isStackInt;
        this.primitiveJavaClass = primitiveJavaClass;
        this.boxedJavaClass = boxedJavasClass;
        assert primitiveJavaClass == null || javaName.equals(primitiveJavaClass.getName());
    }

    /**
     * Returns the name of the kind as a single character.
     */
    public char getTypeChar() {
        return typeChar;
    }

    /**
     * Returns the name of this kind which will also be it Java programming language name if it is
     * {@linkplain #isPrimitive() primitive} or {@code void}.
     */
    public String getJavaName() {
        return javaName;<commit_msg>fixed spelling<commit_after>/*
 * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
 * 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
 * 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.
 */
package com.oracle.graal.api.meta;

import java.lang.reflect.*;

/**
 * Denotes the basic kinds of types in CRI, including the all the Java primitive types, for example,
 * {@link Kind#Int} for {@code int} and {@link Kind#Object} for all object types. A kind has a
 * single character short name, a Java name, and a set of flags further describing its behavior.
 */
public enum Kind implements PlatformKind {
    /** The primitive boolean kind, represented as an int on the stack. */
    Boolean('z', "boolean", true, java.lang.Boolean.TYPE, java.lang.Boolean.class),

    /** The primitive byte kind, represented as an int on the stack. */
    Byte('b', "byte", true, java.lang.Byte.TYPE, java.lang.Byte.class),

    /** The primitive short kind, represented as an int on the stack. */
    Short('s', "short", true, java.lang.Short.TYPE, java.lang.Short.class),

    /** The primitive char kind, represented as an int on the stack. */
    Char('c', "char", true, java.lang.Character.TYPE, java.lang.Character.class),

    /** The primitive int kind, represented as an int on the stack. */
    Int('i', "int", true, java.lang.Integer.TYPE, java.lang.Integer.class),

    /** The primitive float kind. */
    Float('f', "float", false, java.lang.Float.TYPE, java.lang.Float.class),

    /** The primitive long kind. */
    Long('j', "long", false, java.lang.Long.TYPE, java.lang.Long.class),

    /** The primitive double kind. */
    Double('d', "double", false, java.lang.Double.TYPE, java.lang.Double.class),

    /** The Object kind, also used for arrays. */
    Object('a', "Object", false, null, null),

    /** The narrow oop kind. */
    NarrowOop('n', "NarrowOop", false, null, null),

    /** The void float kind. */
    Void('v', "void", false, java.lang.Void.TYPE, java.lang.Void.class),

    /** The non-type. */
    Illegal('-', "illegal", false, null, null);

    private final char typeChar;
    private final String javaName;
    private final boolean isStackInt;
    private final Class primitiveJavaClass;
    private final Class boxedJavaClass;

    private Kind(char typeChar, String javaName, boolean isStackInt, Class primitiveJavaClass, Class boxedJavaClass) {
        this.typeChar = typeChar;
        this.javaName = javaName;
        this.isStackInt = isStackInt;
        this.primitiveJavaClass = primitiveJavaClass;
        this.boxedJavaClass = boxedJavaClass;
        assert primitiveJavaClass == null || javaName.equals(primitiveJavaClass.getName());
    }

    /**
     * Returns the name of the kind as a single character.
     */
    public char getTypeChar() {
        return typeChar;
    }

    /**
     * Returns the name of this kind which will also be it Java programming language name if it is
     * {@linkplain #isPrimitive() primitive} or {@code void}.
     */
    public String getJavaName() {
        return javaName;
{'fraction_non_alphanumeric': 0.11042167911865265, 'fraction_numerical': 0.007597821957705458, 'mean_word_length': 3.228051391862955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3404265', 'n_tokens_mistral': 2243, 'n_tokens_neox': 2160, 'n_words': 912}