Commit Graph

57530 Commits

Author SHA1 Message Date
Ilya Matveev 8d495c4b45 Gradle, native: Produce binaries from klibs and bump K/N version
Earlier all native binaries were produced directly from sources of
corresponding compilations. This patch changes this behavior. Now
a klibrary produced by a compilation is used to build a final
binary instead of sources. This allows us to avoid parsing the same
sources several times and reduces build time.

This patch also updates K/N version to 1.3.60-dev-11975, to get the
corresponding support from the compiler side.

Issue #KT-33076 Fixed
2019-09-16 12:45:03 +07:00
Ilya Matveev 3a935402a4 Gradle: Deprecate native extraOpts method in favor of common API 2019-09-16 12:45:02 +07:00
Abduqodiri Qurbonzoda f01420332f Avoid division in string-to-number conversions (KT-26309) 2019-09-15 21:08:23 +03:00
Abduqodiri Qurbonzoda 11f3c4b03f Clarify the error message when File.copyTo fails (KT-27545) 2019-09-13 21:29:13 +03:00
Igor Yakovlev 27accbb089 Fix KotlinLintTestGenerated.testParcel + extensions registrations fixes 2019-09-13 19:40:31 +03:00
Vladimir Dolzhenko c3265a8bf0 Decrease Light classes code generation in multithreaded cases by guarding KotlinClassInnerStuffCache, LightClassDataHolder.ForClass cache values calculation with lock 2019-09-13 15:10:09 +02:00
Vladimir Dolzhenko d3d85d50ab Rewrite KotlinClassInnerStuffCache into Kt, p2 2019-09-13 15:09:02 +02:00
Vladimir Dolzhenko 6146b0eb53 Rewrite KotlinClassInnerStuffCache into Kt, p1 2019-09-13 15:08:40 +02:00
Roman Golyshev b422485440 KT-30996: Use the last receiver to complete dsl methods
- change `detectReceiverTypes` return type to `List` instead of `Collection`
  - it reflects that receiver types are actually ordered
  - did not propagate signature changes to all possible places because it creates too much noise in git history
- ^KT-30996 Fixed
2019-09-13 15:52:52 +03:00
Ilya Chernikov b2d2ba5811 Refactor test utils: don't add main-kts to the classpath...
by default on running scripting tests via the call to K2JVMCompiler
2019-09-13 13:19:26 +02:00
Ilya Chernikov 49003c9839 Do not embed script-runtime into main-kts:
it is unused in it and may interfere with mixed usages when
main-kts is used along with legacy/default scripts
2019-09-13 13:19:26 +02:00
Ilya Chernikov a12ea37ae8 [minor] Fix non-fatal exception during the embeddable test 2019-09-13 13:19:26 +02:00
Ilya Chernikov 45f5c42a53 Add appropriate script extension to the source name, if not provided
#KT-31704 fixed
2019-09-13 13:19:26 +02:00
Ilya Chernikov 92778cc5b5 Set contextClassLoader for the script evaluation
#KT-31661
2019-09-13 13:19:26 +02:00
Ilya Chernikov 939d76fd2a Isolate script execution from compiler classloader
Since fix of KT-33554, the script execution classpath is set correctly
according to the compilation classpath, so isolation makes sense now.
2019-09-13 13:19:26 +02:00
Ilya Chernikov 771f5c13dd Fix imported script functionality in JSR-223/REPL:
- setup compilation properly to take imported scripts into account
- add compiled imported scripts into generated results
= calculate ScriptLightVirtualFile path as relative - simplifies imported scripts location
2019-09-13 13:19:26 +02:00
Ilya Chernikov 0fe137d75c Fix script arguments order for imports with implicit receivers
#KT-33572 fixed
2019-09-13 13:19:25 +02:00
Ilya Chernikov 8989bfa235 Fix main-kts jsr223 direct bindings processing
Before the jsr context was configured only when a dependency or import
annotation is encountered, so direct properties mapping didn't work
without using any of the annotations. (It was implemented like this
as a workaround due to the problem with handlers composability, that was
fixed some time ago.)
2019-09-13 13:19:25 +02:00
Ilya Chernikov c5f9e0a399 Fix host configuration replacements 2019-09-13 13:19:25 +02:00
Ilya Chernikov f350c24846 Implement more general "apply defaults" functionality for host configurations 2019-09-13 13:19:25 +02:00
Ilya Goncharov e3187217ee Fix executable files for nodejs
- For windows NPM doesn't create symlinks, but cretae CMD files, so it is necessary to provide path to JS file explicitly

#KT-33710 fixed
2019-09-13 12:44:56 +03:00
Ilya Goncharov 2fe5feac94 Remove source map support runtime for webpack
- Browsers support source maps OOB
- source-map-support is necessary to install to make a sense, but now we only include it in bundle w/o installing
- Additional webpack's options like output.library doesn't works with multiple entries if last item is not bundled library

#KT-33288 fixed
2019-09-13 12:40:35 +03:00
Dmitriy Novozhilov 8614323f80 [FIR] Tests. Update some outdated testdata 2019-09-13 12:21:59 +03:00
Dmitriy Novozhilov b76b4b0229 [FIR] Pass flow to local functions 2019-09-13 12:21:59 +03:00
Dmitriy Novozhilov e1947e6884 [FIR] Don't create synthetic calls for when with only one branch 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 43a873a2ec [FIR] Make SimpleFlow (old implementation) implement abstract Flow 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 60343c721c [FIR] Make Flow and LogicSystem abstract
It's needed for simple changing of different Flow implementations
2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov c19da5846c [FIR] Fix processing inPlace lambdas as named arguments 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 3ff185d36c [FIR] Dummy fix of lambda functions inside init block
Init still works not well, but now they at least don't fail
2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 0e0e6da917 [FIR] Fix passing flow throw loops 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov f77a414e93 [FIR] Fix passing flow throw try expression 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov be58e95b2b [FIR] Replace Flow with DelegatingFlow 2019-09-13 10:42:19 +03:00
Dmitriy Novozhilov 44571fbd8f [FIR] Minor. Extract methods used DataFlowInfo from DataFlowInferenceContext 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 65edf73bee [FIR] Add node for enter to body of when branch 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 531c2b9617 [FIR] Add supprot of InvocationKind.UNKNOWN for in-place lambdas 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 2f6f07bc7d [FIR] Remove callbacks from stacks in DFA 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov beaab19eb9 [FIR] Replace ControlFlowGraphNodeBuilder with extensions on ControlFlowGraphBuilder 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 15ff86fc50 [FIR] Refactor DataFlowVariables
Make inheritors of DataFlowVariable public, replace flags in DFV with types
2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov f9d45d2f2a [FIR] Some minor fixes in DFA after review 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov 6b7aa21b8f [FIR] Minor. Remove useless creating data flow variables for value parameters 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov cb1322eaef [FIR] Add smartcasts on implicit receivers 2019-09-13 10:42:18 +03:00
Dmitriy Novozhilov f8459f8201 [FIR] Fix result type of const expressions with expected type 2019-09-13 10:42:17 +03:00
Dmitriy Novozhilov 546bbceeea [FIR] Reduce coping of flow and inline default value of it 2019-09-13 10:42:17 +03:00
Dmitriy Novozhilov c2180b9361 [FIR] Move reporting of errors in modularized tests in separate log file 2019-09-13 10:42:17 +03:00
Igor Yakovlev 5dc29b9059 Fix build 183 - add missing functions 2019-09-12 18:42:56 +03:00
Simon Ogorodnik 375920da58 [FIR] Add gradle property for extending jvmArgs of modularized test 2019-09-12 18:06:47 +03:00
Igor Yakovlev 841ed45440 Fix build 183 - missing imports added 2019-09-12 17:53:31 +03:00
Dmitry Petrov cb13dd3cdd Add psi2ir tests for 'break' and 'continue' inside 'when' 2019-09-12 15:11:01 +03:00
Dmitry Petrov f3837e91e3 Add BE tests for 'break' and 'continue' inside 'when' 2019-09-12 15:11:01 +03:00
Dmitry Petrov f06f6f4660 Allow 'break' and 'continue' inside 'when' in 1.4+ 2019-09-12 15:11:00 +03:00