DefaultConstructorMarker is used as a marker to ensure that a
constructor is unique for companion objects. Prior to this change,
DefaultConstructorMarker was package private.
Being package private worked when calling the
DefaultConstructorMarker-marked constsructor using `invokespecial`,
likely because the JVM may not perform strict access checks in this
situation.
However, when access checks are performed, trying to call a
DefaultConstructorMarker-marked constructor will fail. This could happen
if the constructor was called using reflection or the MethodHandle API.
These APIs may be used by tools that perform bytecode instrumentation
on Kotlin JVM bytecode, such as Robolectric. It also caused problems
when using ByteBuddy validation.
Fixes https://youtrack.jetbrains.com/issue/KT-20869
Make :kotlin-stdlib-js:prepareComparableSource, :kotlin-stdlib-js:prepareBuiltinsSources, :kotlin-stdlib-js:compileJs, :kotlin-stdlib-js:compileJs, :prepare:build.version:writeBuildNumber, :kotlin-compiler:distKotlinc compatible with configuration cache
Relates to #KT-44611
* Make IntelliJInstrumentCodeTask compatible with configuration cache
* Make CoreXmlShadingTransformer compatible with configuration cache
* Make :kotlin-reflect:relocateCoreSources compatible with configuration cache
* Copy some properties to not capture it's owning object into lambda to support configuration cache
Relates to #KT-44611
:kotlin-test:kotlin-test-js:kotlin-test-js-it will still have old version as integration test run logic cannot be fully refactored to the new version (approximately till 3.1)
Relates to #KT-44611
Introduce Duration companion functions to convert numbers to Duration.
Deprecate number extension properties and propose to use these
new functions instead.
Refactor operator documentation generation for primitives and unsigned
types so that it is easier to specialize it.
Manually sync docs of numeric types in js-ir stdlib.
KT-26234
- floorDiv/mod for unsigned types
- floorDiv/mod for signed types
- mod for floating point types
- mod return type: same as divisor for integer types
- Update JS API dump
- Avoid triggering division overflow in tests due to K/N
- Workaround failing test in JS-legacy
This makes 'test.' an implicit package prefix, thus fixing the inspection
"Package directive doesn't match file location" positive in almost all
test files.
[JS IR] Add option for dce mode
[JS IR] Add logging to non useful declarations if appropriate dce mode
[JS IR] Add mode with throwing exception
[JS IR] unreachableDeclaration method is in rootDeclarations
[JS IR] Add js extra help arg with dce mode and include debug.kt to compile unreachableMethod
[JS IR] unreachableDeclaration as internal to not reproduce stdlib api
[JS IR] Fix description of dce mode argument
- Use console.error instead of console.log
- Use JsError instead Kotlin exception for lightweight
[JS IR] Remove body for throwing exception
[JS IR] Remove default parameter in unreachableDeclaration
[JS IR] Process without removing fields and declaration containers
[JS IR] Rename dce mode on dce runtime diagnostic
[JS IR] Use console.trace instead of console.error
[JS IR] Extract JsError
- Fix naming in prependFunctionCall
- Fix description on runtime diagnostic argument
- Using message collector instead of throwing exception
[JS IR] Distinguish unreachableMethods for log and exception
[JS IR] Extract checking of Kotlin packages of IrField
^KT-45059 fixed
Fixed by outlining JS code that uses Kotlin variables making usages of
these locals explicit and preventing bugs due to one-sided variable renaming.
This prevents using Kotlin variables as lvalue in JS code.
As soon as JVM IR is enabled by default (in language version 1.5), use
the CLI argument `-Xuse-old-backend` or Gradle option `useOldBackend` to
switch to the old JVM backend.
The current comparison method of inline classes makes
durations of positive and negative zeroes non-equal.
To avoid that, normalize the duration value upon construction
preventing negative zero being stored.