diff options
| author | Jeff Carr <[email protected]> | 2025-03-19 04:40:49 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-19 04:40:49 -0500 |
| commit | 17119d9298e132aa309f1cc95e439f29f61214b0 (patch) | |
| tree | 578abd95ba2cfe0cdcec3f6e51d609ccb9e2f36b /abi/rangefuncconsts.go | |
day1v0.0.1
Diffstat (limited to 'abi/rangefuncconsts.go')
| -rw-r--r-- | abi/rangefuncconsts.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/abi/rangefuncconsts.go b/abi/rangefuncconsts.go new file mode 100644 index 0000000..4e9248d --- /dev/null +++ b/abi/rangefuncconsts.go @@ -0,0 +1,18 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package abi + +type RF_State int + +// These constants are shared between the compiler, which uses them for state functions +// and panic indicators, and the runtime, which turns them into more meaningful strings +// For best code generation, RF_DONE and RF_READY should be 0 and 1. +const ( + RF_DONE = RF_State(iota) // body of loop has exited in a non-panic way + RF_READY // body of loop has not exited yet, is not running -- this is not a panic index + RF_PANIC // body of loop is either currently running, or has panicked + RF_EXHAUSTED // iterator function return, i.e., sequence is "exhausted" + RF_MISSING_PANIC = 4 // body of loop panicked but iterator function defer-recovered it away +) |
