Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C++ (Circle)
CIRCT
Clean
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Nim
Objective-C
Objective-C++
OCaml
Odin
OpenCL C
Pascal
Pony
Python
Racket
Ruby
Rust
Snowball
Scala
Slang
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Zig
Javascript
GIMPLE
Ygen
android-java source #2
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
ART dex2oat aml_art_331012050 (Oct 2022)
ART dex2oat aml_art_341110060 (Nov 2023)
ART dex2oat aml_art_341311100 (Jan 2024)
ART dex2oat aml_art_341411300 (Feb 2024)
ART dex2oat aml_art_341514410 (Mar 2024)
ART dex2oat aml_art_341615020 (Apr 2024)
ART dex2oat aml_art_341711000 (May 2024)
ART dex2oat aml_art_341810020 (Jun 2024)
ART dex2oat latest
d8 8.1.56
d8 8.1.72
d8 8.2.33
d8 8.2.42
d8 8.2.47
d8 8.3.36
d8 8.3.37
d8 8.5.10
d8 8.5.27
d8 8.5.35
jdk 11.0.2
jdk 12.0.1
jdk 12.0.2
jdk 13.0.2
jdk 14.0.2
jdk 15.0.2
jdk 16.0.1
jdk 17.0.0
jdk 17.0.2
jdk 18.0.0
jdk 18.0.2
jdk 19.0.2
jdk 20.0.0
jdk 20.0.2
jdk 21.0.0
jdk 21.0.2
jdk 22.0.0
r8 8.2.33
r8 8.2.42
r8 8.2.47
r8 8.3.36
r8 8.3.37
r8 8.5.10
r8 8.5.27
r8 8.5.35
Options
Source code
import android.content.Context import android.content.Intent import android.net.Uri import android.util.Log import com.android.tools.r8.keepanno.annotations.KeepItemKind; import com.android.tools.r8.keepanno.annotations.UsedByReflection; const val TAG = "MinifyDemo" const val DEBUG = false class MinifyDemo { @UsedByReflection(kind = KeepItemKind.CLASS_AND_METHODS) fun goToSite(context: Context, site: String) { when (site) { "Compiler Explorer" -> goToGodbolt(context) "Android Developers" -> goToAndroidDevelopers(context) else -> throw IllegalArgumentException("Unknown site $site") } } private fun goToGodbolt(context: Context) { goToUrl(context, "godbolt.org") } private fun goToAndroidDevelopers(context: Context) { goToUrl(context, "developer.android.com") } private fun goToUrl(context: Context, url: String) { log("Going to URL $url") val intent = Intent(Intent.ACTION_VIEW) intent.data = Uri.parse(url) context.startActivity(intent) } private fun log(msg: String) { if (DEBUG && Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, msg) } } }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
About the author
Statistics
Changelog
Version tree