Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GR-36046] Stop deleting (Buddhist|JapaneseImperial)Calendar. #6089

Merged
merged 3 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/reference-manual/native-image/BuildOutput.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ GraalVM Native Image: Generating 'helloworld' (executable)...
[5/8] Inlining methods... [***] (0.8s @ 0.99GB)
[6/8] Compiling methods... [***] (6.4s @ 4.86GB)
[7/8] Layouting methods... [**] (4.2s @ 3.98GB)
[8/8] Creating image... (4.0s @ 2.04GB)
[8/8] Creating image... [*] (4.0s @ 2.04GB)
4.52MB (22.97%) for code area: 7,470 compilation units
7.06MB (35.87%) for image heap: 101,764 objects and 5 resources
7.52MB (38.24%) for debug info generated in 1.8s
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2023, 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
Expand Down Expand Up @@ -29,7 +29,6 @@
import java.util.Locale;
import java.util.TimeZone;

import com.oracle.svm.core.annotate.Delete;
import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import com.oracle.svm.core.util.VMError;
Expand Down Expand Up @@ -59,6 +58,8 @@ final class Target_sun_util_calendar_CalendarSystem {
private static CalendarSystem forName(String calendarName) {
if ("gregorian".equals(calendarName)) {
return Util_sun_util_calendar_CalendarSystem.GREGORIAN;
} else if ("japanese".equals(calendarName)) {
return Util_sun_util_calendar_CalendarSystem.JAPANESE;
} else if ("julian".equals(calendarName)) {
return Util_sun_util_calendar_CalendarSystem.JULIAN;
} else {
Expand All @@ -71,19 +72,10 @@ final class Util_sun_util_calendar_CalendarSystem {

// The static fields are initialized during native image generation.
static final CalendarSystem GREGORIAN = CalendarSystem.forName("gregorian");
static final CalendarSystem JAPANESE = CalendarSystem.forName("japanese");
static final CalendarSystem JULIAN = CalendarSystem.forName("julian");
}

@TargetClass(sun.util.BuddhistCalendar.class)
@Delete
final class Target_sun_util_BuddhistCalendar {
}

@TargetClass(className = "java.util.JapaneseImperialCalendar")
@Delete
final class Target_java_util_JapaneseImperialCalendar {
}

/** Dummy class to have a class with the file's name. */
public final class CalendarSubstitutions {
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private enum BuildStage {
INLINING("Inlining methods", true, false),
COMPILING("Compiling methods", true, true),
LAYOUTING("Layouting methods", true, true),
CREATING("Creating image");
CREATING("Creating image", true, true);

private static final int NUM_STAGES = values().length;

Expand Down