Skip to content

Commit

Permalink
8317376: Minor improvements to the 'this' escape analyzer
Browse files Browse the repository at this point in the history
Reviewed-by: vromero
  • Loading branch information
archiecobbs authored and Vicente Romero committed Apr 17, 2024
1 parent 4895a15 commit 0646284
Show file tree
Hide file tree
Showing 20 changed files with 744 additions and 363 deletions.
2 changes: 1 addition & 1 deletion make/CompileModuleTools.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $(eval $(call SetupJavaCompilation, BUILD_JIGSAW_TOOLS, \
build/tools/jigsaw, \
COPY := .properties .html, \
BIN := $(TOOLS_CLASSES_DIR), \
DISABLED_WARNINGS := fallthrough this-escape, \
DISABLED_WARNINGS := fallthrough, \
JAVAC_FLAGS := \
--add-modules jdk.jdeps \
--add-exports java.base/jdk.internal.module=ALL-UNNAMED \
Expand Down
26 changes: 0 additions & 26 deletions make/modules/java.net.http/Java.gmk

This file was deleted.

2 changes: 0 additions & 2 deletions make/modules/java.sql.rowset/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

DOCLINT += -Xdoclint:all/protected \
'-Xdoclint/package:java.*,javax.*'
CLEAN_FILES += $(wildcard \
Expand Down
2 changes: 0 additions & 2 deletions make/modules/jdk.charsets/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

COPY += .dat
2 changes: 1 addition & 1 deletion make/modules/jdk.compiler/Gendata.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
SRC := $(TOPDIR)/make/langtools/src/classes, \
INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javac, \
DISABLED_WARNINGS := options this-escape, \
DISABLED_WARNINGS := options, \
JAVAC_FLAGS := \
$(COMPILECREATESYMBOLS_ADD_EXPORTS), \
))
Expand Down
26 changes: 0 additions & 26 deletions make/modules/jdk.crypto.ec/Java.gmk

This file was deleted.

2 changes: 1 addition & 1 deletion make/modules/jdk.javadoc/Gendata.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
$(TOPDIR)/src/jdk.jdeps/share/classes, \
INCLUDES := build/tools/symbolgenerator com/sun/tools/classfile, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols_javadoc, \
DISABLED_WARNINGS := options this-escape, \
DISABLED_WARNINGS := options, \
JAVAC_FLAGS := \
$(INTERIM_LANGTOOLS_ARGS) \
$(COMPILECREATESYMBOLS_ADD_EXPORTS), \
Expand Down
2 changes: 0 additions & 2 deletions make/modules/jdk.jcmd/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

COPY += _options
2 changes: 0 additions & 2 deletions make/modules/jdk.jconsole/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

COPY += .gif .png

CLEAN_FILES += $(wildcard \
Expand Down
2 changes: 0 additions & 2 deletions make/modules/jdk.jdeps/Gensrc.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
include GensrcCommon.gmk
include GensrcProperties.gmk

DISABLED_WARNINGS_java += this-escape

$(eval $(call SetupVersionProperties, JAVAP_VERSION, \
com/sun/tools/javap/resources/version.properties))

Expand Down
2 changes: 0 additions & 2 deletions make/modules/jdk.jdeps/Launcher.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

include LauncherCommon.gmk

DISABLED_WARNINGS_java += this-escape

################################################################################
## Build javap
################################################################################
Expand Down
2 changes: 0 additions & 2 deletions make/modules/jdk.jdi/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

EXCLUDES += \
com/sun/tools/example/debug/bdi \
com/sun/tools/example/debug/event \
Expand Down
2 changes: 0 additions & 2 deletions make/modules/jdk.jpackage/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

COPY += .gif .png .txt .spec .script .prerm .preinst \
.postrm .postinst .list .sh .desktop .copyright .control .plist .template \
.icns .scpt .wxs .wxl .wxi .ico .bmp .tiff .service
Expand Down
2 changes: 0 additions & 2 deletions make/modules/jdk.localedata/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

COPY += _dict _th
# Exclude BreakIterator classes that are just used in compile process to generate
# data files and shouldn't go in the product
Expand Down
2 changes: 0 additions & 2 deletions make/modules/jdk.sctp/Java.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
# questions.
#

DISABLED_WARNINGS_java += this-escape

# No SCTP implementation on Mac OS X or AIX. These classes should be excluded.
SCTP_IMPL_CLASSES = \
$(TOPDIR)/src/jdk.sctp/unix/classes/sun/nio/ch/sctp/AssociationChange.java \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public void analyzeTree(Env<AttrContext> env, TreeMaker make) {
new AssignAnalyzer().analyzeTree(env, make);
new FlowAnalyzer().analyzeTree(env, make);
new CaptureAnalyzer().analyzeTree(env, make);
new ThisEscapeAnalyzer(names, syms, types, log, lint).analyzeTree(env);
new ThisEscapeAnalyzer(names, syms, types, rs, log, lint).analyzeTree(env);
}

public void analyzeLambda(Env<AttrContext> env, JCLambda that, TreeMaker make, boolean speculative) {
Expand Down
Loading

1 comment on commit 0646284

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.