KT-16713 Insufficient maximum stack size
1. Analyze method node with fake jumps for loops to make sure that all instructions reachable only through break/continue jumps are processed. 2. Fix stack for break/continue jumps. 3. Drop fake jumps for loops, analyze method node again. 4. Fix stack for try/catch and beforeInline.
This commit is contained in:
committed by
Mikhael Bogdanov
parent
80063b6f91
commit
11caa03427
+30
@@ -0,0 +1,30 @@
|
||||
class MyQueue {
|
||||
fun poll(): String? = null
|
||||
}
|
||||
|
||||
class A {
|
||||
val delayedQueue = MyQueue()
|
||||
|
||||
fun next() {
|
||||
while (true) {
|
||||
delayedQueue.poll() ?: break
|
||||
}
|
||||
|
||||
while (true) {
|
||||
unblock(delayedQueue.poll() ?: break)
|
||||
}
|
||||
|
||||
while (true) {
|
||||
unblock(delayedQueue.poll() ?: break)
|
||||
}
|
||||
}
|
||||
|
||||
fun unblock(p: String) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
A().next()
|
||||
return "OK"
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
class MyQueue {
|
||||
fun poll(): String? = null
|
||||
}
|
||||
|
||||
class A {
|
||||
val delayedQueue = MyQueue()
|
||||
|
||||
var cond = true
|
||||
|
||||
fun next() {
|
||||
while (cond) {
|
||||
delayedQueue.poll() ?: break
|
||||
}
|
||||
|
||||
while (cond) {
|
||||
unblock(delayedQueue.poll() ?: break)
|
||||
}
|
||||
|
||||
while (cond) {
|
||||
unblock(delayedQueue.poll() ?: break)
|
||||
}
|
||||
}
|
||||
|
||||
fun unblock(p: String) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : String {
|
||||
A().next()
|
||||
return "OK"
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
@kotlin.Metadata
|
||||
public final class A {
|
||||
private final @org.jetbrains.annotations.NotNull field delayedQueue: MyQueue
|
||||
public method <init>(): void
|
||||
public final @org.jetbrains.annotations.NotNull method getDelayedQueue(): MyQueue
|
||||
public final method next(): void
|
||||
public final method unblock(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Kt16713Kt {
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyQueue {
|
||||
public method <init>(): void
|
||||
public final @org.jetbrains.annotations.Nullable method poll(): java.lang.String
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
@kotlin.Metadata
|
||||
public final class A {
|
||||
private field cond: boolean
|
||||
private final @org.jetbrains.annotations.NotNull field delayedQueue: MyQueue
|
||||
public method <init>(): void
|
||||
public final method getCond(): boolean
|
||||
public final @org.jetbrains.annotations.NotNull method getDelayedQueue(): MyQueue
|
||||
public final method next(): void
|
||||
public final method setCond(p0: boolean): void
|
||||
public final method unblock(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class Kt16713_2Kt {
|
||||
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyQueue {
|
||||
public method <init>(): void
|
||||
public final @org.jetbrains.annotations.Nullable method poll(): java.lang.String
|
||||
}
|
||||
Reference in New Issue
Block a user