Skip to content

Commit 75e373a

Browse files
committed
runtime: bump spec version to SE 27
1 parent ce25b6b commit 75e373a

File tree

28 files changed

+369
-34
lines changed

28 files changed

+369
-34
lines changed

.cargo/config.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ artifact-dir = "./build/out"
55
[env]
66

77
# Constant VM properties
8-
SYSTEM_PROPS_JAVA_VERSION = "23"
98
SYSTEM_PROPS_VM_SPECIFICATION_NAME = "Java Virtual Machine Specification"
109
SYSTEM_PROPS_VM_NAME = "SJVM"
1110
SYSTEM_PROPS_VM_VENDOR = "Serial-ATA"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/Serial-ATA/jvm/ci.yml?branch=master&style=for-the-badge&logo=github)](https://github.com/Serial-ATA/jvm/actions/workflows/ci.yml)
44

55
An implementation
6-
of [The Java Virtual Machine, Java SE 23 Edition](https://docs.oracle.com/javase/specs/jvms/se23/html/index.html).
6+
of [The Java Virtual Machine, Java SE 27 Edition](https://docs.oracle.com/javase/specs/jvms/se27/html/index.html).
77

88
For instructions on how to run the JVM, see [tools/sj/README.md](tools/sj/README.md).
99

classfile/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# JVM/classfile
22

33
An implementation of
4-
the [Java SE 23 class file format](https://docs.oracle.com/javase/specs/jvms/se23/html/jvms-4.html).
4+
the [Java SE 27 class file format](https://docs.oracle.com/javase/specs/jvms/se27/html/jvms-4.html).
55

66
The current structure is as follows:
77

justfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#!/usr/bin/env just --justfile
2+
# -----------------------------------------------------------------------------
3+
# VERSIONING:
4+
# -----------------------------------------------------------------------------
5+
6+
export JAVA_VERSION := "27"
7+
export TARGET_OPENJDK_TAG := "jdk-27+0"
8+
29
# -----------------------------------------------------------------------------
310
# TARGETS:
411
# -----------------------------------------------------------------------------

runtime/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JVM/runtime
22

33
The implementation
4-
of [The Java Virtual Machine, Java SE 23 Edition](https://docs.oracle.com/javase/specs/jvms/se23/html/index.html).
4+
of [The Java Virtual Machine, Java SE 27 Edition](https://docs.oracle.com/javase/specs/jvms/se27/html/index.html).
55

66
This crate does not provide a binary with which to run it. The binary is housed in [the jvm crate](../jvm).

runtime/build.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,21 @@ fn collect_jvm_h() {
175175
return_type,
176176
};
177177

178-
let Some(defined) = defined_jvm_functions.get(&*name) else {
178+
let Some(defined) = defined_jvm_functions.remove(&*name) else {
179179
println!("cargo::warning=JVM function {name} not found",);
180180
continue;
181181
};
182182

183-
if &expected != defined {
183+
if expected != defined {
184184
println!(
185185
"cargo::warning=JVM function {} has the wrong signature. (found: {defined}, \
186186
expected: {expected})",
187187
defined.name
188188
);
189189
}
190190
}
191+
192+
for name in defined_jvm_functions.keys() {
193+
println!("cargo::warning=Function {name} does not exist in jvm.h");
194+
}
191195
}

runtime/src/classpath/loader/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use common::int_types::u1;
2525
use instructions::Operand;
2626

2727
const SUPPORTED_MAJOR_LOWER_BOUND: u1 = 45;
28-
const SUPPORTED_MAJOR_UPPER_BOUND: u1 = 70;
28+
const SUPPORTED_MAJOR_UPPER_BOUND: u1 = 71;
2929
const SUPPORTED_MAJOR_VERSION_RANGE: RangeInclusive<u1> =
3030
SUPPORTED_MAJOR_LOWER_BOUND..=SUPPORTED_MAJOR_UPPER_BOUND;
3131

runtime/src/initialization.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use jni::java_vm::JavaVm;
1818
use jni::sys::{JNI_OK, JavaVMInitArgs, jint};
1919

2020
/// Errors that can occur during VM initialization.
21+
#[derive(Debug)]
2122
pub enum InitializationError {
2223
/// An exception was thrown before its class and/or the main thread were initialized.
2324
///

runtime/src/native/jdk/internal/util/SystemProps.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub mod Raw {
1414
include_generated!("native/jdk/internal/util/def/SystemProps$Raw.constants.rs");
1515
include_generated!("native/jdk/internal/util/def/SystemProps.definitions.rs");
1616

17-
const JAVA_VERSION: &str = env!("SYSTEM_PROPS_JAVA_VERSION");
17+
const JAVA_VERSION: &str = env!("JAVA_VERSION");
1818
const VM_SPECIFICATION_NAME: &str = env!("SYSTEM_PROPS_VM_SPECIFICATION_NAME");
1919
const VM_NAME: &str = env!("SYSTEM_PROPS_VM_NAME");
2020
const VM_VERSION: &str = env!("CARGO_PKG_VERSION");

runtime/src/native/jvm/agents.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#![native_macros::jni_fn_module]
2+
3+
use jni::sys::jboolean;
4+
use native_macros::jni_call;
5+
6+
#[jni_call(no_env)]
7+
pub extern "C" fn JVM_PrintWarningAtDynamicAgentLoad() -> jboolean {
8+
todo!()
9+
}

0 commit comments

Comments
 (0)