# Copyright 2005 Kevin Reid, under the terms of the MIT X license # found at http://www.opensource.org/licenses/mit-license.html ................ pragma.enable("easy-return") pragma.disable("explicit-result-guard") def simplifyFQName := def EventuallyDeepFrozen := DeepFrozen."eventually"() def makeAdvisoryInterface implements DeepFrozen { to run(typeDesc) { # XXX typeDesc :DeepPassByCopy def advisoryInterface extends __makeGuard(advisoryInterface) implements EventuallyDeepFrozen { # XXX implements DeepPassByCopy method __optSealedDispatch(brand) :any { if (brand == EventuallyDeepFrozen.getPeekBrand()) { EventuallyDeepFrozen.getPeekSealer().seal(meta.getState()) } } to audit(objectExpr, witness) :any { # XXX allow stamping? return false } to coerce(specimen, _) { return specimen } to __printOn(out :TextWriter) :void { out.print(simplifyFQName(typeDesc.getFQName())) } # XXX should delegate TypeDesc query methods } return advisoryInterface } }