compile method
Implementation
DirectiveCompileResult compile(ir.Directive directive) {
assert(directive.requiresDirectiveChangeDetector);
final nameResolver = DirectiveNameResolver();
final storage = CompileViewStorage();
final classStmt = _buildChangeDetector(directive, nameResolver, storage);
return DirectiveCompileResult(classStmt);
}