From 7dd740f51a6d38832a7a43d1f1b523dc348cb9ef Mon Sep 17 00:00:00 2001 From: xushiwei Date: Wed, 12 Jun 2024 23:27:54 +0800 Subject: [PATCH] README: panic/defer --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 69d14a6a..149cbe70 100644 --- a/README.md +++ b/README.md @@ -170,9 +170,7 @@ Here are some examples related to them: Common Go syntax is already supported. Except for the following, which needs to be improved: * map (Very limited support) -* panic (Limited support) * recover (Not supported yet) -* defer (Limited: defer in loops is not supported) * chan (Not supported yet) * generics (Not supported yet) @@ -185,6 +183,11 @@ Here are some examples related to Go syntax: * [goroutine](_demo/goroutine/goroutine.go): goroutine demo +## Defer + +LLGo defer does not support usage in loops. This is not a bug but a feature, because we think that using defer in a loop is a very unrecommended practice. + + ### Garbage Collection (GC) By default, LLGo implements `gc` based on [bdwgc](https://www.hboehm.info/gc/) (also known as [libgc](https://www.hboehm.info/gc/)).