[K/N] Replace escape analysis correctness check to RuntimeAssert to avoid checks in release mode
This commit is contained in:
@@ -512,13 +512,10 @@ extern "C" void MutationCheck(ObjHeader* obj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" RUNTIME_NOTHROW void CheckLifetimesConstraint(ObjHeader* obj, ObjHeader* pointee) {
|
extern "C" RUNTIME_NOTHROW void CheckLifetimesConstraint(ObjHeader* obj, ObjHeader* pointee) {
|
||||||
// TODO: Consider making it a `RuntimeCheck`. Probably all `RuntimeCheck`s and `RuntimeAssert`s should specify
|
RuntimeAssert(obj->local() || pointee == nullptr || !pointee->local(),
|
||||||
// that their firing is a compiler bug and should be reported.
|
"Attempt to store a stack object %p into a heap object %p. "
|
||||||
if (!obj->local() && pointee != nullptr && pointee->local()) {
|
"This is a compiler bug, please report it to https://kotl.in/issue",
|
||||||
konan::consolePrintf("Attempt to store a stack object %p into a heap object %p\n", pointee, obj);
|
pointee, obj);
|
||||||
konan::consolePrintf("This is a compiler bug, please report it to https://kotl.in/issue\n");
|
|
||||||
konan::abort();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void FreezeSubgraph(ObjHeader* obj) {
|
extern "C" void FreezeSubgraph(ObjHeader* obj) {
|
||||||
|
|||||||
Reference in New Issue
Block a user