mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 14:04:04 -05:00
R8 is a whole-program optimizer that converts Java byte code to optimized dex code. It can be run with the same general steps (and JAR) as the existing D8 compiler. This change adds R8Compiler and the R8 keep-annotation library it relies on, makes this lib + Android API stubs default libraries for Android Java/Kotlin, and includes a small update to allow older versions of dex2oat (33.10) to run. https://r8.googlesource.com/r8
14 lines
380 B
Java
14 lines
380 B
Java
// Type your code here, or load an example.
|
|
//
|
|
// For R8, please load R8Example for an example with a keep annotation,
|
|
// which will prevent unused code from being removed from the final output.
|
|
//
|
|
// (For advanced use only) Click "Templates > Android Java IDE" for
|
|
// profile-guided compilation.
|
|
|
|
class Square {
|
|
static int square(int num) {
|
|
return num * num;
|
|
}
|
|
}
|