| 1 | module scheme |
| 2 | |
| 3 | // Global values can change without changing name-resolution epochs. Primitive |
| 4 | // generic installation can also change an existing Procedure's protocol. Keep |
| 5 | // these changes distinct from the public binding topology and syntax identity. |
| 6 | @[inline] |
| 7 | fn (vm &VM) invalidate_native_bindings() { |
| 8 | $if vile_native ? { |
| 9 | if !isnil(vm.native_execution_scope) { |
| 10 | mut scope := unsafe { &NativeScope(vm.native_execution_scope) } |
| 11 | scope.binding_revision++ |
| 12 | if scope.binding_revision == 0 { |
| 13 | for i in 0 .. scope.plans.len { scope.plans[i].guards_valid = false } |
| 14 | } |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | |