Package-level declarations

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class DependsOn(val value: KClass<out Pass<*>>, val softDependency: Boolean = false)

Register a dependency for the annotated pass. This ensures that:

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ExecuteBefore(val other: KClass<out Pass<*>>)

Register a dependency for the annotated pass. This ensures that the annotated pass is executed before other pass.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ExecuteFirst

Indicates whether this pass should be executed as the first pass. Note: setting this flag for more than one active pass will yield an error. Note: setting this flag will not activate the pass. You must register the pass manually.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ExecuteLast

Indicates whether this pass should be executed as the last pass. Note: setting this flag for more than one active pass will yield an error. Note: setting this flag will not activate the pass. You must register the pass manually.

Link copied to clipboard
data class PassWithDependencies(val pass: KClass<out Pass<*>>, val softDependencies: MutableSet<KClass<out Pass<*>>>, val hardDependencies: MutableSet<KClass<out Pass<*>>>)

A simple helper class to match a pass with dependencies.

Link copied to clipboard

A simple helper class for keeping track of passes and their (currently not satisfied) dependencies during ordering.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class RegisterExtraPass(val value: KClass<out Pass<*>>)

Register a new default pass required by a frontend. Passes annotated this way are collected by TranslationConfiguration.Builder.registerExtraFrontendPasses and automatically registered in TranslationConfiguration.Builder.build, but only if TranslationConfiguration.Builder.defaultPasses was called.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class ReplacePass(val old: KClass<out Pass<*>>, val lang: KClass<out Language<*>>, val with: KClass<out Pass<*>>)

This annotation can be used to replace a certain Pass (identified by old) for a specific Language (identified by lang) with another Pass (identified by with).

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class RequiredFrontend(val value: KClass<out LanguageFrontend>)

This annotation can only enable a pass for a given LanguageFrontend. The pass's accept function will not be executed when the current language does not match the required language.