decInterruptFolds creates an intepretable decorator which marks comprehensions as interruptable where the interrupt state is communicated via a hidden variable on the Activation.
()
| 63 | // decInterruptFolds creates an intepretable decorator which marks comprehensions as interruptable |
| 64 | // where the interrupt state is communicated via a hidden variable on the Activation. |
| 65 | func decInterruptFolds() InterpretableDecoratorV2 { |
| 66 | return func(i InterpretableV2) (InterpretableV2, error) { |
| 67 | fold, ok := i.(*evalFold) |
| 68 | if !ok { |
| 69 | return i, nil |
| 70 | } |
| 71 | fold.interruptable = true |
| 72 | return fold, nil |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | // decDisableShortcircuits ensures that all branches of an expression will be evaluated, no short-circuiting. |
| 77 | func decDisableShortcircuits() InterpretableDecoratorV2 { |