src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java Wed Dec 13 08:52:42 2017
--- new/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java Wed Dec 13 08:52:42 2017
*** 1,7 ****
--- 1,7 ----
/*
- * Copyright (c) 2016, 2017, 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.
*** 44,55 ****
--- 44,55 ----
public class Classfile {
private final ResolvedJavaType type;
private final List<ClassfileBytecode> codeAttributes;
! private static final int MAJOR_VERSION_JAVA_MIN = 51;
! private static final int MAJOR_VERSION_JAVA_MAX = 54;
! private static final int MAJOR_VERSION_JAVA7 = 51;
! private static final int MAJOR_VERSION_JAVA10 = 54;
private static final int MAGIC = 0xCAFEBABE;
/**
* Creates a {@link Classfile} by parsing the class file bytes for {@code type} loadable from
* {@code context}.
*** 63,73 ****
--- 63,73 ----
int magic = stream.readInt();
assert magic == MAGIC;
int minor = stream.readUnsignedShort();
int major = stream.readUnsignedShort();
! if (major < MAJOR_VERSION_JAVA_MIN || major > MAJOR_VERSION_JAVA_MAX) {
! if (major < MAJOR_VERSION_JAVA7 || major > MAJOR_VERSION_JAVA10) {
throw new UnsupportedClassVersionError("Unsupported class file version: " + major + "." + minor);
}
ClassfileConstantPool cp = new ClassfileConstantPool(stream, context);
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/classfile/Classfile.java
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File