Optimization for const closures: access it via GETSTATIC

This commit is contained in:
Mikhael Bogdanov
2014-03-27 14:03:12 +04:00
parent c7c1e33655
commit 7dc662f613
5 changed files with 55 additions and 6 deletions
@@ -0,0 +1,22 @@
fun test() {
fun local(){
{
//static instance access
local()
}()
}
//static instance access
{
//static instance access
local()
}()
//static instance access
(::local)()
}
// 3 GETSTATIC _DefaultPackage\$test\$1\.instance\$
// 1 GETSTATIC _DefaultPackage\$test\$2\.instance\$
// 1 GETSTATIC _DefaultPackage\$test\$3\.instance\$