Commit Graph
23 Commits
Author SHA1 Message Date
Ofek 2df8d32758 Tsify #6 (#6941)
Another tsification batch. 347 to go and I'm running out of easy fixes
:(
2024-10-22 21:41:44 +03:00
Ofek f5f00606f8 Tsifications galore (#6916)
Still mostly mindless numb work, one rename that touched many files
(`getArgumentParser` -> `getArgumentParserCls`), and a few real
improvements.
The goal is to be able to turn on `noImplicitAny` for the project, to
enforce higher code quality. 600 violations to go.
2024-10-01 12:26:46 +03:00
Ofek f715dc2932 More tsification (#6877)
About half way through. Only 708 tsification errors to go..
2024-09-28 10:32:36 +03:00
Ofek fecd0fbf11 tsification + small package upgrade (semver) (#6841) 2024-09-10 17:18:48 +03:00
Ofek 9ef46fbafe Binge of (mostly) mindless tsification (#6838)
Turned on `noImplicitAny` in tsconfig, then went around fixing some
random easy stuff.
Hopefully tsification-PRs with more real content coming up.
2024-09-07 14:36:43 +03:00
kevinjeon-g 5480ec6bb7 Enable --force-allow-oj-inlines (#6776)
This allows for inlining behavior that is more similar to the inlining
that will occur when compiling on a device.
2024-08-22 10:27:27 -05:00
kevinjeon-g 1c051bd479 Add R8 for Android (#6591)
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
2024-06-25 18:43:02 -05:00
kevinjeon-g 99617a29b2 Move dex2oat profiles from inline to template (#6621)
This change moves the dex2oat profiles for Android Java and Kotlin from
the inline comments (included as part of the default code example) to
being included as a separate file. Templates have been added for this.
2024-06-24 21:33:31 -05:00
kevinjeon-g bf91208c97 Support Android API stubs (#6514)
Updates the d8 and dex2oat compiler implementations so that android.jar
is included in the classpath for javac/kotlinc.
2024-06-07 19:18:46 -05:00
kevinjeon-g 9a20419a29 Update customCwd for profman in dex2oat (#6454) 2024-05-08 21:48:45 +02:00
Patrick Quist 20d29ae10b Update dex2oat.ts 2024-05-01 03:11:59 +02:00
Patrick Quist 1639d0a29a fix dex2oat profile issue 2024-05-01 03:09:43 +02:00
kevinjeon-g b94781ab48 Add profile support for dex2oat. (#6382)
dex2oat supports profile-guided compilation. In addition to taking dex
code as an input, it can take a profile as another input, to guide the
compilation. The profile determines which methods need to be compiled,
how calls can be inlined, and so on.

Because Compiler Explorer doesn't support multiple input files, the
profile is added as a comment block in the Java/Kotlin source code. A
post-processor extracts the profile from the comment block into a
separate file, in order to input it to dex2oat.
2024-04-29 20:17:24 -05:00
Patrick Quist b8325cf0c6 eslint root setting and fixes (#6307) 2024-04-16 21:26:53 +02:00
kevinjeon-g b4c7c3da1a Support compilation with boot image for Android (#6346)
Updates dex2oat to specify a valid boot image for accurate compilations.
For example, these two methods should now (correctly) compile to the
same native code:
```
static int insertAndReturn(int num) {
    int[] arr = {num};
    return arr[0];
}

static int justReturn(int num) {
    return num;
}
```
2024-04-13 11:40:59 -05:00
kevinjeon-g bf299d280f Update dex2oat input arguments (#6340)
Adds '--copy-dex-files=always', as it is needed in newer versions of
dex2oat. This doesn't affect older versions.
2024-04-13 10:40:28 -05:00
kevinjeon-g 137ed94704 Simplify Android compiler properties (#6334)
updates intermediate compiler exe input to refer to the compiler's
getInfo().exe so that paths don't need to be hardcoded in properties.
2024-04-13 10:35:21 -05:00
Marc Poulhiès 5ebd04f90e Change getCompilerResultLanguageId prototype (#6148) 2024-02-24 19:21:23 +01:00
kevinjeon-g 3953a3b09c Update dex2oat version string (#6096)
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2024-02-05 21:27:59 -06:00
kevinjeon-g 71b2065c8c Override getVersion() for dex2oat (#6076)
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2024-02-03 22:21:53 +02:00
Jeremy Rifkin e5fb8e1afc Improve typings for the now-global HandlerConfig (#6027)
This PR populates types in the HandlerConfig
2024-01-21 10:29:58 -06:00
Patrick Quist 76e185b3d7 Dex2oat error handling and fixes (#6022) 2024-01-20 17:15:13 +01:00
kevinjeon-g 2f6a7328b2 Add support for dex2oat (latest) (#5916)
Adds Dex2OatCompiler, which applies to the Android Java and Android
Kotlin languages. Dex2OatCompiler runs on .dex files output by
D8Compiler, which in turn runs on .class files output by JavaCompiler or
KotlinCompiler. A parser has been added for dex2oat optimization passes.
2024-01-15 15:15:05 -06:00