Size: a a a

Kotlin Community

2019 December 06

AM

Andrew Mikhaylov in Kotlin Community
Yeah, it's a matter of terminology. So rewording Quantum's message, input sources are not always available, so compiler has to operate minified JS code, which is roughly the same as operating JVM bytecode.
источник

AM

Andrew Mikhaylov in Kotlin Community
Viacheslav Blinov
I would assume there is some sort of IR in between KtJs sources and JS output anyway
In the newer compiler — yes, but original Kotlin/JS appeared before formalizing IR.
источник

AT

Alexey Tkachenko in Kotlin Community
Andrew Mikhaylov
Yeah, it's a matter of terminology. So rewording Quantum's message, input sources are not always available, so compiler has to operate minified JS code, which is roughly the same as operating JVM bytecode.
good metaphor
источник

VB

Viacheslav Blinov in Kotlin Community
Andrew Mikhaylov
In the newer compiler — yes, but original Kotlin/JS appeared before formalizing IR.
thats ok, it does not really changes much for this matter I suppose, IR is just a means of abtracting the outcome 'bytecode' and platform
источник

AT

Alexey Tkachenko in Kotlin Community
guys don't you mind me asking what is “IR” you are talking about?
источник

AL

Anton Lakotka in Kotlin Community
🏴󠁧󠁢󠁥󠁮󠁧󠁿
источник

AM

Andrew Mikhaylov in Kotlin Community
@iseki_w you should check in with people on kotl.in/slack, there are corresponding channels like #compiler or #language-evolution. There is a chance you'll get more than educated guesses there (or maybe this question was already asked before).
источник

i

iseki in Kotlin Community
Yeah,I think it's important...
источник

VB

Viacheslav Blinov in Kotlin Community
Alexey Tkachenko
guys don't you mind me asking what is “IR” you are talking about?
It's Internal Representation. Think of it as of kotlin's own bytecode which can then be translated to other platforms
источник

i

iseki in Kotlin Community
Thank you.
источник

AT

Alexey Tkachenko in Kotlin Community
Viacheslav Blinov
It's Internal Representation. Think of it as of kotlin's own bytecode which can then be translated to other platforms
thanks
источник

i

iseki in Kotlin Community
I 'll have a try(x
источник

AM

Andrew Mikhaylov in Kotlin Community
Probably intermediate representation, in an analogy to LLVM IR and CLR IR :)
источник

VB

Viacheslav Blinov in Kotlin Community
Andrew Mikhaylov
Probably intermediate representation, in an analogy to LLVM IR and CLR IR :)
right, intermediate it is
источник

i

iseki in Kotlin Community
Maybe we can have a try: make some changes on output js code. then compile something which use it....
I am not sure it useful.
источник

AM

Andrew Mikhaylov in Kotlin Community
Make sure to do that with inline function in one module and call site in another one, as within one module compiler most probably optimises away intermediate step if it's possible.
источник

VM

Vadim Morozov in Kotlin Community
class A {
   val a = 10
}
class B {
   val a = 20
   val b = 30

   fun A.test() = a + b
}


в экстеншене какое a будет использоваться?
источник

AT

Alexey Tkachenko in Kotlin Community
Vadim Morozov
class A {
   val a = 10
}
class B {
   val a = 20
   val b = 30

   fun A.test() = a + b
}


в экстеншене какое a будет использоваться?
очевидно B.a
источник

VP

Vladimir Petrakovich in Kotlin Community
Vadim Morozov
class A {
   val a = 10
}
class B {
   val a = 20
   val b = 30

   fun A.test() = a + b
}


в экстеншене какое a будет использоваться?
Паззлеры будут через полчаса
источник

VM

Vadim Morozov in Kotlin Community
Vladimir Petrakovich
Паззлеры будут через полчаса
не понял)
источник