From d3f201dd45c0a5e4c3d6d3e3aafa559afd09ae72 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Sun, 10 Aug 2014 20:30:03 +0400 Subject: [PATCH] CLI: drop "-pp" flag for preloader profiling It was never documented and was never supposed to be used. In the rare case when someone must profile preloader, he can temporarily change "notime" to "time" in the kotlinc-jvm bash/batch script --- compiler/cli/bin/kotlinc-js | 9 ++------- compiler/cli/bin/kotlinc-js.bat | 23 +++++------------------ compiler/cli/bin/kotlinc-jvm | 9 ++------- compiler/cli/bin/kotlinc-jvm.bat | 23 +++++------------------ 4 files changed, 14 insertions(+), 50 deletions(-) diff --git a/compiler/cli/bin/kotlinc-js b/compiler/cli/bin/kotlinc-js index 6ebf4b63832..82ad6c31408 100755 --- a/compiler/cli/bin/kotlinc-js +++ b/compiler/cli/bin/kotlinc-js @@ -2,7 +2,7 @@ # ############################################################################## # Copyright 2002-2011, LAMP/EPFL -# Copyright 2011-2013, JetBrains +# Copyright 2011-2014, JetBrains # # This is free software; see the distribution for copying conditions. # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A @@ -45,7 +45,6 @@ fi # -D options will be available as system properties. declare -a java_args declare -a kotlin_args -profile_preloader="notime" while [ $# -gt 0 ]; do case "$1" in @@ -63,10 +62,6 @@ while [ $# -gt 0 ]; do kotlin_args=("${kotlin_args[@]}" "$1") shift ;; - -pp) - profile_preloader="time" - shift - ;; *) kotlin_args=("${kotlin_args[@]}" "$1") shift @@ -87,4 +82,4 @@ CPSELECT="-cp " $JAVA_OPTS \ "${java_args[@]}" \ ${CPSELECT}"${KOTLIN_HOME}/lib/kotlin-preloader.jar" \ - org.jetbrains.jet.preloading.Preloader "${KOTLIN_HOME}/lib/kotlin-compiler.jar:${KOTLIN_HOME}/lib/kotlin-runtime.jar" org.jetbrains.jet.cli.js.K2JSCompiler 4096 $profile_preloader "$@" + org.jetbrains.jet.preloading.Preloader "${KOTLIN_HOME}/lib/kotlin-compiler.jar:${KOTLIN_HOME}/lib/kotlin-runtime.jar" org.jetbrains.jet.cli.js.K2JSCompiler 4096 notime "$@" diff --git a/compiler/cli/bin/kotlinc-js.bat b/compiler/cli/bin/kotlinc-js.bat index 1e10d6b228d..021a1e18e2a 100644 --- a/compiler/cli/bin/kotlinc-js.bat +++ b/compiler/cli/bin/kotlinc-js.bat @@ -2,7 +2,7 @@ rem based on scalac.bat from the Scala distribution rem ########################################################################## rem # Copyright 2002-2011, LAMP/EPFL -rem # Copyright 2011-2013, JetBrains +rem # Copyright 2011-2014, JetBrains rem # rem # This is free software; see the distribution for copying conditions. rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A @@ -22,26 +22,13 @@ if not "%JAVA_HOME%"=="" ( if "%_JAVACMD%"=="" set _JAVACMD=java -set _PROFILE_PRELOADER=notime -rem re: E%1 &c., see http://www.riedquat.de/blog/2011-11-27-01#w9aab1c45 -if E%1==E-pp ( - shift - set _PROFILE_PRELOADER=time -) - rem We use the value of the JAVA_OPTS environment variable if defined set _JAVA_OPTS=-Xmx256M -Xms32M -noverify -rem re: %1 %2 &c., see http://www.riedquat.de/blog/2011-11-27-01#w9aab1c60 -if "%_PROFILE_PRELOADER%"=="time" ( - "%_JAVACMD%" %_JAVA_OPTS% -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^ - org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^ - org.jetbrains.jet.cli.js.K2JSCompiler 4096 %_PROFILE_PRELOADER% %1 %2 %3 %4 %5 %6 %7 %8 %9 -) else ( - "%_JAVACMD%" %_JAVA_OPTS% -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^ - org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^ - org.jetbrains.jet.cli.js.K2JSCompiler 4096 %_PROFILE_PRELOADER% %* -) +"%_JAVACMD%" %_JAVA_OPTS% -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^ + org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^ + org.jetbrains.jet.cli.js.K2JSCompiler 4096 notime %* + exit /b %ERRORLEVEL% goto end diff --git a/compiler/cli/bin/kotlinc-jvm b/compiler/cli/bin/kotlinc-jvm index 127e4a049fd..74bef98a259 100755 --- a/compiler/cli/bin/kotlinc-jvm +++ b/compiler/cli/bin/kotlinc-jvm @@ -2,7 +2,7 @@ # ############################################################################## # Copyright 2002-2011, LAMP/EPFL -# Copyright 2011-2013, JetBrains +# Copyright 2011-2014, JetBrains # # This is free software; see the distribution for copying conditions. # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A @@ -45,7 +45,6 @@ fi # -D options will be available as system properties. declare -a java_args declare -a kotlin_args -profile_preloader="notime" while [ $# -gt 0 ]; do case "$1" in @@ -63,10 +62,6 @@ while [ $# -gt 0 ]; do kotlin_args=("${kotlin_args[@]}" "$1") shift ;; - -pp) - profile_preloader="time" - shift - ;; *) kotlin_args=("${kotlin_args[@]}" "$1") shift @@ -87,4 +82,4 @@ CPSELECT="-cp " $JAVA_OPTS \ "${java_args[@]}" \ ${CPSELECT}"${KOTLIN_HOME}/lib/kotlin-preloader.jar" \ - org.jetbrains.jet.preloading.Preloader "${KOTLIN_HOME}/lib/kotlin-compiler.jar:${KOTLIN_HOME}/lib/kotlin-runtime.jar" org.jetbrains.jet.cli.jvm.K2JVMCompiler 4096 $profile_preloader "$@" + org.jetbrains.jet.preloading.Preloader "${KOTLIN_HOME}/lib/kotlin-compiler.jar:${KOTLIN_HOME}/lib/kotlin-runtime.jar" org.jetbrains.jet.cli.jvm.K2JVMCompiler 4096 notime "$@" diff --git a/compiler/cli/bin/kotlinc-jvm.bat b/compiler/cli/bin/kotlinc-jvm.bat index b8c86a00438..c7dac2c45ff 100644 --- a/compiler/cli/bin/kotlinc-jvm.bat +++ b/compiler/cli/bin/kotlinc-jvm.bat @@ -2,7 +2,7 @@ rem based on scalac.bat from the Scala distribution rem ########################################################################## rem # Copyright 2002-2011, LAMP/EPFL -rem # Copyright 2011-2013, JetBrains +rem # Copyright 2011-2014, JetBrains rem # rem # This is free software; see the distribution for copying conditions. rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A @@ -22,26 +22,13 @@ if not "%JAVA_HOME%"=="" ( if "%_JAVACMD%"=="" set _JAVACMD=java -set _PROFILE_PRELOADER=notime -rem re: E%1 &c., see http://www.riedquat.de/blog/2011-11-27-01#w9aab1c45 -if E%1==E-pp ( - shift - set _PROFILE_PRELOADER=time -) - rem We use the value of the JAVA_OPTS environment variable if defined set _JAVA_OPTS=-Xmx256M -Xms32M -noverify -rem re: %1 %2 &c., see http://www.riedquat.de/blog/2011-11-27-01#w9aab1c60 -if "%_PROFILE_PRELOADER%"=="time" ( - "%_JAVACMD%" %_JAVA_OPTS% -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^ - org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^ - org.jetbrains.jet.cli.jvm.K2JVMCompiler 4096 %_PROFILE_PRELOADER% %1 %2 %3 %4 %5 %6 %7 %8 %9 -) else ( - "%_JAVACMD%" %_JAVA_OPTS% -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^ - org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^ - org.jetbrains.jet.cli.jvm.K2JVMCompiler 4096 %_PROFILE_PRELOADER% %* -) +"%_JAVACMD%" %_JAVA_OPTS% -cp "%_KOTLIN_HOME%\lib\kotlin-preloader.jar" ^ + org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^ + org.jetbrains.jet.cli.jvm.K2JVMCompiler 4096 notime %* + exit /b %ERRORLEVEL% goto end