19. Cross-context evaluation helpers

The apply_in_context module exposes single [apply_in_context] annotation.

All functions and symbols are in “apply_in_context” module, use require to get access to it.

require daslib/apply_in_context

19.1. Function annotations

apply_in_context

[apply_in_context] function annotation. Function is modified, so that it is called in the debug agent context, specified in the annotation. If specified context is not insalled, panic is called.

For example::

[apply_in_context(opengl_cache)] def public cache_font(name:string implicit) : Font?

… let font = cache_font(“Arial”) // call invoked in the “opengl_cache” debug agent context