Georgy Bronnikov
08aeed3b46
IR: do not use lazyWrapper for Ir.Symbols
...
The reason for switching from lazyWrapper to SymbolTable itself is that
(at least in JS_IR) some of those lazily created structures could later
be deserialized, which created conflicts.
2019-12-04 16:05:53 +03:00
Dmitry Petrov
31b63c0fc8
JS_IR: IrSimpleFunction.isOperator
2019-11-29 13:53:05 +03:00
Roman Artemev
4759c16428
[JS IR] Fix IrGetClass for Throwable successors
...
- add test
2019-11-28 14:45:34 +03:00
Georgy Bronnikov
1ed23d7c54
IR: reorganize IrProvider handling
...
Make DeclarationStubGenerator a subclass of IrProvider,
anticipating deserialization of IR structures for JVM_IR backend.
2019-11-27 20:02:27 +03:00
Anton Bannykh
9fec2c78d1
JS IR: apply forLoopsLowering
...
Replaced createTemporaryVariable usages with createTmpVariables.
The latter doesn't rely on KotlinType's. Using KotlinType with
JS_IR backend causes runtime excpetions, as some expected descriptor
API is not implemented, because it avoids descriptors as much as
possible.
2019-11-26 15:08:10 +03:00
Anton Bannykh
81699299f5
JS_IR: DCE
...
Could be enabled by toggling `-Xir-dce`
Box test output in js/js.translator/testData/out-min
2019-11-26 12:20:39 +03:00
Roman Artemev
1e4f8b2946
[JS IR] Do not forbid typeOf inlining if it is not required
2019-11-25 20:22:03 +03:00
Roman Artemev
2e22ddba39
[JS IR] Fix annotation constructor body generation
2019-11-25 20:22:03 +03:00
Roman Artemev
c5e25a0382
[JS IR] Make PrivateMembersLowering global to handle inlined private references correctly
...
- Fixes [KT-33334]
2019-11-25 20:22:03 +03:00
Roman Artemev
9946feb66c
[JS IR] Fix name clash between class members defined on prototype
...
- Fixes [KT-33327]
2019-11-25 20:22:03 +03:00
Zalim Bashorov
3fa431e114
[JS IR] Don't use full paths when generating comments with a path for file blocks
2019-11-21 23:51:09 +03:00
Zalim Bashorov
c05c07f243
[JS IR] Generate special region comments at the start and the end of each file block
...
It allows to fold these blocks and navigate to them in the IDEA.
Also, this commit adds compiler configuration keys to control generating comments with paths for file blocks,
and now generating such comments is enabled only in our tests.
2019-11-21 23:51:08 +03:00
Zalim Bashorov
fa76b9cf83
[JS IR] Use single line comment instead of JsDoc comment for comments with path
2019-11-21 23:51:08 +03:00
Zalim Bashorov
5fe79f71ad
[JS IR] Don't generate comment with path for "empty" files
2019-11-21 23:51:08 +03:00
Alexander Udalov
608449f41d
IR: introduce StubGeneratorExtensions for ExternalDependenciesGenerator
...
This is a refactoring to simplify the API of
ExternalDependenciesGenerator and to constrain future additions of
platform-specific stub generator extensions.
2019-11-20 15:16:57 +01:00
Mads Ager
15ed342282
JVM_IR: Generate args check in existing methods for special bridge methods.
...
Fix the number of arguments checked (1 for getOrDefault and 2 for
remove).
2019-11-19 19:10:04 +03:00
Roman Artemev
c459b2ca6e
[JS IR] Fix state machine control flow
...
- exception loop unwinding: make sure exception state is reset after try block is finished
- break/continue of suspended loops
2019-11-19 11:15:36 +03:00
Roman Artemev
f2093a1763
[JS IR] Fix boxing/unboxing of inline classes in coroutine scope
...
- don't box/unbox when value is known to be an inline class
- add unbox state when coroutine resumed
- correctly handle suspension in case of inline class
- add tests
2019-11-19 11:15:35 +03:00
Roman Artemev
52b24ead91
[IR] Add REINTERPRET_CAST operator in IrTypeOperatorCall
...
- fix BE
- fix Serializer
- implement builder
- make Ir a bit more type-correct
- support developer mode (lowering [dynamic]implicit cast meterialized as general cast)
- fix autoboxing lowering
2019-11-19 11:15:35 +03:00
Roman Artemev
3795897fb7
[JS IR] Add developer mode in configuration
2019-11-19 11:15:35 +03:00
Steven Schäfer
85b36dcd88
IR: Introduce IrClassifierSymbol.defaultType
2019-11-18 19:40:04 +01:00
Georgy Bronnikov
c5159d9cbe
IR: Add UniqId to IrSymbol
2019-11-13 20:07:57 +03:00
Georgy Bronnikov
2f5442800b
Move WrappedDescriptors to ir.tree module
2019-11-13 20:07:57 +03:00
Alexander Udalov
9a55f418fa
IR: extract StaticInitializersLowering out of InitializersLowering
...
And use it in JVM backend only. Also remove unneeded
`patchDeclarationParents` call.
2019-11-12 19:21:46 +01:00
Roman Artemev
a343a57207
[IR] Refactor ir infrastructure
...
- Remove range-based uniq id indexes using to link built ins
- Limit KotlinType usages, replace them with corresponding IrType
2019-11-12 20:45:11 +03:00
Roman Artemev
b391c066d6
[IR] Pass class Type Parameters into IrConstructorCall factory explicitly
...
to avoid unexpected crash on uninitialized parent in psi2ir phase
2019-11-12 20:45:11 +03:00
Roman Artemev
ba373c67d7
[IR] Remove FunctionDescriptor from IrCall-like node's constructor interface
2019-11-12 20:45:11 +03:00
Roman Artemev
bf367003f9
[IR] Make IrMemberAccessExpression be IrDeclarationReference
2019-11-12 20:45:10 +03:00
Dmitry Petrov
0b26f32674
JS_IR: IrField.isFakeOverride
2019-11-01 14:55:11 +03:00
Dmitry Petrov
f24278941d
JS_IR: IrSimpleFunction.isFakeOverride
2019-11-01 14:55:09 +03:00
Roman Artemev
78b29349c9
Fix lateinit isInitialized check in multi-file case
2019-10-31 14:45:15 +03:00
Dmitry Petrov
66b63c4296
JS_IR: isExpect
2019-10-21 13:04:59 +03:00
Roman Artemev
c0f279811e
[JS SCRIPT] refactor js script infrastructure
...
- Implement proper script compiler proxy to correctly handle script and its closed-world dependencies
- Clean up zoo of JsScriptCompilers
2019-10-10 12:52:06 +03:00
Vitaliy.Tikhonov
24cfd0e88c
[IR JS BE] update NameTables for working with repl
2019-10-10 12:52:05 +03:00
Vitaliy.Tikhonov
184ae2fa43
[IR JS BE] create lowering for scripts
2019-10-10 12:52:05 +03:00
Vitaliy.Tikhonov
240abdb750
[JS IR BE] update current lowerings for IrScript
2019-10-10 12:52:05 +03:00
Vitaliy.Tikhonov
d79279d8a5
[JS SCRIPTING] create CoreCompiler for scripting
2019-10-10 12:52:05 +03:00
Vitaliy.Tikhonov
14510c1da3
[IR] create IrScript, infrastructure for it and update visitors
2019-10-10 12:52:05 +03:00
pyos
35a0fc40a6
Don't create redundant copies in DefaultArgumentStubGenerator
2019-10-02 14:48:05 +02:00
Georgy Bronnikov
2e3428bbe7
JVM_IR: incorporate validation into jvmPhases
2019-10-02 14:56:54 +03:00
Alexander Gorshenev
c227c13799
Commonizing klib metadata between native and js
2019-10-01 17:38:57 +03:00
Georgy Bronnikov
7e9cfbc91a
IR: use toLowerCaseAsciiOnly
2019-10-01 16:43:23 +03:00
Georgy Bronnikov
53b7766910
IR: call toLowerCase() with root locale
...
Preventing complexities with Turkish Iı vs. İi.
2019-09-30 22:55:19 +03:00
pyos
20626e4aaf
Make ReturnableBlockLowering common
...
and remove special handling in JVM_IR codegen.
2019-09-05 15:48:26 +02:00
Alexander Udalov
bf5ca2ed84
Cleanup compiler warnings in IR-related modules
2019-09-03 19:32:57 +02:00
Roman Artemev
f14107bf65
[IR] Sort dependencies a bit early
2019-09-03 14:21:29 +03:00
Svyatoslav Kuzmich
9594e9b3b1
[JS IR BE] Initial export generation
2019-08-30 13:15:37 +03:00
Svyatoslav Kuzmich
6670180782
[JS IR BE] Use internal visibility for generated helper methods
2019-08-30 13:15:37 +03:00
Svyatoslav Kuzmich
6e6ffa12a6
[WASM] Initial infrastructure
...
- New module ":compiler:backend.wasm"
- Initial compiler infra (driver, phaser, context)
- Subset of Wasm AST
- Skeleton of IR -> Wasm AST
- Wasm AST -> WAT transformer
- Testing infra
- SpiderMonkey jsshell tool
2019-08-22 15:59:54 +03:00
Svyatoslav Kuzmich
1891fa1bf1
[JS IR BE] Commonize JS lowerings
2019-08-22 15:59:41 +03:00