refactor(ivy): remove unnecessary fac wrapper (#34076)
For injectables, we currently generate a factory function in the injectable def (prov) that delegates to the factory function in the factory def (fac). It looks something like this: ``` factory: function(t) { return Svc.fac(t); } ``` The extra wrapper function is unnecessary since the args for the factory functions are the same. This commit changes the compiler to generate this instead: ``` factory: Svc.fac ``` Because we are generating less code for each injectable, we should see some modest code size savings. AIO's main bundle is about 1 KB smaller. PR Close #34076
This commit is contained in:

committed by
Miško Hevery

parent
7504543962
commit
ce79cacd03
@ -3,7 +3,7 @@
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime-es2015": 1485,
|
||||
"main-es2015": 142186,
|
||||
"main-es2015": 141476,
|
||||
"polyfills-es2015": 36808
|
||||
}
|
||||
}
|
||||
@ -21,7 +21,7 @@
|
||||
"master": {
|
||||
"uncompressed": {
|
||||
"runtime-es2015": 1485,
|
||||
"main-es2015": 148320,
|
||||
"main-es2015": 147610,
|
||||
"polyfills-es2015": 36808
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user