Commit Graph

83 Commits

Author SHA1 Message Date
Alexander Udalov 59a15092da Drop old preloader command-line interface, use new one instead 2015-08-27 08:19:51 +03:00
Alexander Udalov 63831387cf Only catch exceptions originating from incorrect use in preloader 2015-08-24 01:29:59 +03:00
Alexander Udalov aba6ab1299 Refactor command-line interface to kotlin-preloader.jar
Use reasonable defaults for the options: no time profiling, no instrumenters,
empty classpath, 4096 as the class number estimate. Replace 4096 in the
codebase with the constant field.

Keep the old interface intact until the build is bootstrapped and the new one
can be used in all compilation steps
2015-08-24 01:29:58 +03:00
Alexander Udalov a592b42357 Refactor Preloader: simplify mode parsing, unify output 2015-08-24 01:29:58 +03:00
Alexander Udalov c18ef6e2ac Increase buffer size in preloader from 8K to 512K
Doesn't seem to improve performance, but cuts down lots of IO file read counts
2015-06-03 15:14:24 +03:00
Alexander Udalov 485dce987c Fix byte array memory leak from MemoryBasedClassLoader
40 Mb of bytes of preloaded compiler classes during the compilation become 16
Mb after this change

This is a slightly reworked version of 58b033d (reverted in 3f05419). The
problem in that commit was that URLClassLoader did not work in the fashion
MemoryBasedClassLoader was designed to work (child first, parent last). So some
resource was found in an incorrect jar which was causing the compiler to break
2015-03-30 17:12:10 +03:00
Alexander Udalov 45da9555de Fix minor bug in MemoryBasedClassLoader#getResources()
Own resources and those from the parent class loader were not combined
2015-03-30 17:12:10 +03:00
Alexander Udalov 3f0541924f Revert "Fix byte array memory leak from MemoryBasedClassLoader"
This reverts commit 58b033d9fb.
2015-03-27 15:28:52 +03:00
Alexander Udalov 58b033d9fb Fix byte array memory leak from MemoryBasedClassLoader
40 Mb of bytes of preloaded compiler classes during the compilation become 16
Mb after this change
2015-03-26 21:42:05 +03:00
Yan Zhulanow f564734be2 Override loadClass with two arguments in MemoryBasedClassLoader 2015-03-13 15:46:43 +03:00
Alexander Udalov 8ca803775f Rename package jet -> kotlin in cli, cli-common
org.jetbrains.jet.cli -> org.jetbrains.kotlin.cli

Also fix some minor warnings
2015-01-08 23:32:07 +03:00
Alexander Udalov 1bf3ca2e26 Rename package jet -> kotlin in preloader and instrumentation
org.jetbrains.jet.preloading -> org.jetbrains.kotlin.preloading
2015-01-05 04:19:04 +03:00
Alexander Udalov 64c00efc92 Fix Instrumentation artifact dependencies and readme 2015-01-03 15:16:19 +03:00
Alexander Udalov 480f990c1d Preloader: HashMap constructor takes capacity, not expected size 2014-12-29 18:19:24 +03:00
Alexander Udalov 8306ccd8ec Preloader: extract nested classes to top-level 2014-12-29 18:19:24 +03:00
Alexander Udalov 9273b0dfec Preloader: support loading classpath dependencies from manifest
Move this logic from ide-compiler-runner. This fixes running 'kotlinc' CLI
compiler locally when the runtime is changed binary incompatibly
2014-12-29 18:19:23 +03:00
Alexander Udalov 91f110acd4 Preloader: support many resources by given name 2014-12-29 18:19:22 +03:00
Alexander Udalov 4358b3fbc3 Do not use private Sun API in preloader 2014-12-19 14:37:46 +03:00
Evgeny Gerashchenko fe27b2264a Passing condition to prefer parent class loader as a parameter to preloader. 2014-08-20 13:46:30 +04:00
Evgeny Gerashchenko f3b7ae379f Passing services via type-safe container instead of map. 2014-08-20 13:46:30 +04:00
Evgeny Gerashchenko 3233317316 Passing class loader instead of factory to compiler. 2014-08-20 13:46:27 +04:00
Evgeny Gerashchenko e419c1a604 Moved incremental cache API to separate package. 2014-08-20 13:46:27 +04:00
Evgeny Gerashchenko 5fade9a5a6 Made incremental cache per-module.
Reused IDEA framework which manages per-module storage.
2014-08-20 13:46:26 +04:00
Alexander Udalov c69303fd1d Fix lots of deprecation warnings on ASM code
In the vast majority of cases it's known that we're calling a class method and
not an interface method
2014-07-26 01:05:03 +04:00
Evgeny Gerashchenko d3e5790674 Passing custom class loader for loading incremental cache implementation. 2014-06-18 22:56:44 +04:00
Alexander Udalov 42d167d17e Add missing copyrights across the project 2014-05-05 20:43:35 +04:00
Nikolay Krasko 4aa3dff2a2 Update to ASM5 2014-04-01 02:55:05 +04:00
Nikolay Krasko 95fd870988 Update to idea 135.666 EAP with asm5 library 2014-04-01 02:55:00 +04:00
Andrey Breslav 2888a6d950 Print preloader results even if the underlying code called System.exit() 2013-11-06 19:50:14 +04:00
Andrey Breslav 41180d78e2 Do not fail with NPE if a class is not found in preloader 2013-10-14 14:42:25 +04:00
Andrey Breslav 33efbc3e91 Migrate to IDEA 130.1225
Fix the class loader to generate proper resource URLs:
we used to have "!" as a JAR separator, but the correct one is "!/", according to the docs here: http://docs.oracle.com/javase/6/docs/api/java/net/JarURLConnection.html
2013-07-23 17:34:33 +04:00
Evgeny Gerashchenko 6d0b8f953d Typo. 2013-06-03 17:40:57 +04:00
Andrey Breslav 551c370242 dumpByteCode flag 2013-05-13 19:49:15 +04:00
Andrey Breslav bb12685004 Allow using anonymous classes as interceptors 2013-05-13 19:49:15 +04:00
Andrey Breslav 39c9cbcd9e Box arguments if needed 2013-05-13 19:49:14 +04:00
Andrey Breslav bdd4296b0d Fix parameter indexing problem 2013-05-13 19:49:14 +04:00
Andrey Breslav ab48f3411a Support @ClassName 2013-05-13 19:49:13 +04:00
Andrey Breslav 3d40d11c98 Example using @MethodName 2013-05-13 19:49:12 +04:00
Andrey Breslav e5b2519aa2 Warn when no relevant methods are found 2013-05-13 19:49:12 +04:00
Andrey Breslav de7fd88373 Warn about using only the first instrumenter 2013-05-13 19:49:11 +04:00
Andrey Breslav f2bf2317f8 Better visible separation between individual instrumenters' outputs 2013-05-13 17:30:19 +04:00
Andrey Breslav cdc375ba06 Preloader's output beautified 2013-05-13 17:30:19 +04:00
Andrey Breslav 2ed217bb4a Some docs and example 2013-05-13 17:30:15 +04:00
Andrey Breslav 9f7a4ffe56 Unneeded interfaces removed 2013-05-13 17:29:58 +04:00
Andrey Breslav 71791d6080 Annotations moved to a separate package 2013-05-13 17:29:57 +04:00
Andrey Breslav d689cc0741 Using 'desc' instead of 'erasedSignature' 2013-05-13 17:29:57 +04:00
Andrey Breslav 9efc885c37 Instrumenter doesn't have to do profiling 2013-05-13 17:29:56 +04:00
Andrey Breslav 7782621617 Do not look for instrumenters in TIME mode 2013-05-13 17:29:56 +04:00
Andrey Breslav afe3ff9b6f done() method moved to where it is used 2013-05-13 17:29:55 +04:00
Andrey Breslav 42de8879fe Code beautified a little 2013-05-13 17:29:14 +04:00