src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/PrimitiveConstant.java
changeset 54669 ad45b3802d4e
parent 47216 71c04702a3d5
equal deleted inserted replaced
54668:0bda2308eded 54669:ad45b3802d4e
     1 /*
     1 /*
     2  * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    42     protected PrimitiveConstant(JavaKind kind, long primitive) {
    42     protected PrimitiveConstant(JavaKind kind, long primitive) {
    43         this.primitive = primitive;
    43         this.primitive = primitive;
    44         this.kind = kind;
    44         this.kind = kind;
    45 
    45 
    46         assert kind.isPrimitive() || kind == JavaKind.Illegal;
    46         assert kind.isPrimitive() || kind == JavaKind.Illegal;
       
    47     }
       
    48 
       
    49     static PrimitiveConstant forTypeChar(char kind, long i) {
       
    50         return JavaConstant.forIntegerKind(JavaKind.fromPrimitiveOrVoidTypeChar(kind), i);
    47     }
    51     }
    48 
    52 
    49     @Override
    53     @Override
    50     public JavaKind getJavaKind() {
    54     public JavaKind getJavaKind() {
    51         return kind;
    55         return kind;