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