@Override public void visitCallSite(NodeTraversal t, Node callNode, FunctionState fs) { Preconditions.checkState(fs.hasExistingFunctionDefinition()); if (fs.canInline()) { Reference ref = fs.getReference(callNode); // There are two cases ref can be null: if the call site was introduced // because it was part of a function that was inlined during this pass // or if the call site was trimmed from the list of references because // the function couldn't be inlined at this location. if (ref != null) { if (specializationState != null) { Node containingFunction = getContainingFunction(t); if (containingFunction != null) { // Report that the function was specialized so that // {@link SpecializeModule} can fix it up. specializationState.reportSpecializedFunction(containingFunction); } } inlineFunction(t, ref, fs); // Keep track of references that have been inlined so that // we can verify that none have been missed. ref.inlined = true; } } }