JS: store whole JsImportedModule's in the module local alias

Module references were stored as plain JsName's. When inlining a function
from one fragment to another, those references should be re-interpreted
in terms of the destination fragment. Storing the whole module information
makes that much easier.
This commit is contained in:
Anton Bannykh
2018-12-11 23:40:05 +03:00
committed by Anton Bannykh
parent a0ff581a2f
commit 2cbdc7ecb0
11 changed files with 2073 additions and 419 deletions
@@ -34,7 +34,7 @@ var JsName.localAlias: JsName? by MetadataProperty(default = null)
var JsName.specialFunction: SpecialFunction? by MetadataProperty(default = null)
var JsExpression.localAlias: JsName? by MetadataProperty(default = null)
var JsExpression.localAlias: JsImportedModule? by MetadataProperty(default = null)
// TODO: move this to module 'js.inliner' and change dependency on 'frontend' to dependency on 'descriptors'
var JsInvocation.inlineStrategy: InlineStrategy? by MetadataProperty(default = null)