Commit Graph

17677 Commits

Author SHA1 Message Date
Alexey Tsvetkov 48bd71e0b6 JS inline minor: removed unused parameter 2014-10-03 14:23:57 +04:00
Alexey Tsvetkov f022cd6281 JS backend: restored old label naming strategy 2014-10-03 14:23:57 +04:00
Alexey Tsvetkov 886ae36e1f JS backend: removed nullable parameters
Since JsScope declareName() parameter became NotNull
2014-10-03 14:23:57 +04:00
Alexey Tsvetkov 0eedb0dc6b JS backend: added @NotNull annotation to JsNameRef's getIdent() and constructor parameters 2014-10-03 14:23:56 +04:00
Alexey Tsvetkov 89d74d94c9 JS backend: added @NotNull annotation to JsName's getIdent() 2014-10-03 14:23:56 +04:00
Zalim Bashorov 3b9232e8d4 Drop extra fields which covered by metadata: hasDefaultValue from JsParameter. 2014-10-03 14:23:56 +04:00
Zalim Bashorov aa6ab1ffee Drop extra fields which covered by metadata: isLocal from JsFunction. 2014-10-03 14:23:56 +04:00
Zalim Bashorov afdec6ecc4 Drop extra fields which covered by metadata: inlineStrategy from JsInvocation. 2014-10-03 14:23:56 +04:00
Zalim Bashorov b5ab6cbad0 Drop extra fields which covered by metadata: staticRef from JsName. 2014-10-03 14:23:56 +04:00
Zalim Bashorov d16ddd081a JS backend: copy metdata when copy node. 2014-10-03 14:23:56 +04:00
Zalim Bashorov 1c5338ccf7 JS backend: added the ability to add metadata to js nodes. 2014-10-03 14:23:55 +04:00
Zalim Bashorov 03539c1945 Minor: removed unused ChameleonJsExpression. 2014-10-03 14:23:55 +04:00
Zalim Bashorov 4816e391ff Minor in JS backend: moved js.inliner to "compiler/js" group and added descriptors to its dependencies. 2014-10-03 14:23:55 +04:00
Alexey Tsvetkov d3fce0d0ec JS inline return statements after top return 2014-10-03 14:23:55 +04:00
Alexey Tsvetkov 7a8ba9c733 JS backend refactor: refactored LiteralFunctionTranslator after code review 2014-10-03 14:23:55 +04:00
Alexey Tsvetkov c47732e7eb JS inline minor: optimized imports 2014-10-03 14:23:55 +04:00
Alexey Tsvetkov 64982aa72e JS backend minor: made CALL_FUNCTION constant public 2014-10-03 14:23:54 +04:00
Alexey Tsvetkov d6f8aa6f03 JS backend minor: made undefined expression static field 2014-10-03 14:23:54 +04:00
Alexey Tsvetkov fb475775c9 JS inline minor: inlined doDirectInline() 2014-10-03 14:23:54 +04:00
Alexey Tsvetkov 6018b103cc JS inline refactor: splitted Renaming.kt 2014-10-03 14:23:54 +04:00
Alexey Tsvetkov 17a78dd522 JS inline refactor: moved invocation and function utils to separate files 2014-10-03 14:23:54 +04:00
Alexey Tsvetkov 7fbed5ee86 JS inline refactor: extracted flattenStatement() function 2014-10-03 14:23:54 +04:00
Alexey Tsvetkov 80eca3e49e JS inline refactor: refactored clean utils after code review 2014-10-03 14:23:53 +04:00
Alexey Tsvetkov 1ad090e3a7 JS inline refactor: moved contexts to 'context' package 2014-10-03 14:23:53 +04:00
Alexey Tsvetkov cd9349deb7 JS inline refactor: moved JS AST collecting utils to 'collectors' package 2014-10-03 14:23:53 +04:00
Alexey Tsvetkov 86c253ef6d JS inline refactor: moved JS AST modifying utils to 'rewriters' package 2014-10-03 14:23:53 +04:00
Alexey Tsvetkov d3a8f78a88 JS inline minor: moved JsInliningContext definition to the bottom of JsInliner 2014-10-03 14:23:53 +04:00
Zalim Bashorov 0e075c7d5f JS backend: added the ability to turn off the inline optimization. 2014-10-03 14:23:53 +04:00
Alexey Tsvetkov 338789664c JS inline: use inlined function name for inline labels 2014-10-03 14:23:53 +04:00
Alexey Tsvetkov cbb9e9c40e JS inline: inline simple-return functions directly 2014-10-03 14:23:52 +04:00
Alexey Tsvetkov da817e7ed2 JS inline: use dfs processing order, as it is independent of declaration order 2014-10-03 14:23:52 +04:00
Alexey Tsvetkov a5688440a1 JS inline: added inline recursion exception 2014-10-03 14:23:52 +04:00
Alexey Tsvetkov 5aaa186180 JS inline: remove unused function literals and local functions 2014-10-03 14:23:52 +04:00
Alexey Tsvetkov ec6108ee05 JS inline: remove unused local function instances 2014-10-03 14:23:52 +04:00
Alexey Tsvetkov 7f98ceb427 JS inline: common reference utilities for cleaning up after inline 2014-10-03 14:23:52 +04:00
Alexey Tsvetkov ddb3157a58 JS inline: added collections utils 2014-10-03 14:23:52 +04:00
Alexey Tsvetkov c78169d236 JS inline: support inline local functions 2014-10-03 14:23:51 +04:00
Alexey Tsvetkov 1dafa79eaf JS inline: prevent inliner from inlining multiple subexpressions at once 2014-10-03 14:23:51 +04:00
Alexey Tsvetkov 87d108e75e JS inline: default parameter processing for inlined functions
When function is inlined initializers
for default parameters can be:
1. removed  if argument is not `void 0`
2. expanded otherwise
2014-10-03 14:23:51 +04:00
Alexey Tsvetkov 1f68b43558 JS inline: support inline extension functions 2014-10-03 14:23:51 +04:00
Alexey Tsvetkov 78e7b9c32b JS inline: replace returns with result variable assignment and break 2014-10-03 14:23:51 +04:00
Alexey Tsvetkov 667a22f84e JS inline: alias arguments and local variables 2014-10-03 14:23:51 +04:00
Alexey Tsvetkov 49718f143b JS inline: create JsInliningContext per function processed by JsInliner 2014-10-03 14:23:51 +04:00
Alexey Tsvetkov 0151b7a2d1 JS inline: added inlining context utilities 2014-10-03 14:23:50 +04:00
Alexey Tsvetkov f29816f19c JS inline: added invocation utils 2014-10-03 14:23:50 +04:00
Alexey Tsvetkov 1aa55f3e54 JS inline: run JsInliner after AST is built 2014-10-03 14:23:50 +04:00
Alexey Tsvetkov 3c4125c233 JS inline: inline function calls 2014-10-03 14:23:50 +04:00
Alexey Tsvetkov 3c7677e73e JS inline: collect defined functions 2014-10-03 14:23:50 +04:00
Alexey Tsvetkov 2e38833367 JS inline: save static ref to JsFunction in JsName 2014-10-03 14:23:50 +04:00
Alexey Tsvetkov e4cd733879 JS inline: added JsInliner 2014-10-03 14:23:50 +04:00