Interface InjectPayload

    • Method Detail

      • getName

        java.lang.String getName()
        Returns:
        formal name for this injection
      • getType

        int getType()
        Returns:
        the type of this injection: CALLFIXUP_TYPE, CALLMECHANISM_TYPE, etc.
      • getSource

        java.lang.String getSource()
        Returns:
        a String describing the source of this payload
      • getParamShift

        int getParamShift()
        Returns:
        number of parameters from the original call which should be truncated
      • isErrorPlaceholder

        boolean isErrorPlaceholder()
        If parsing a payload (from XML) fails, a placeholder payload may be substituted and this method returns true for the substitute. In all other cases, this returns false.
        Returns:
        true if this is a placeholder for a payload with parse errors.
      • inject

        void inject​(InjectContext context,
                    PcodeEmit emit)
        Given a context, send the p-code payload to the emitter
        Parameters:
        context - is the context for injection
        emit - is the object accumulating the final p-code
      • getPcode

        PcodeOp[] getPcode​(Program program,
                           InjectContext con)
        A convenience function wrapping the inject method, to produce the final set of PcodeOp objects in an array
        Parameters:
        program - is the Program for which injection is happening
        con - is the context for injection
        Returns:
        the array of PcodeOps
      • isFallThru

        boolean isFallThru()
        Returns:
        true if the injected p-code falls thru
      • isIncidentalCopy

        boolean isIncidentalCopy()
        Returns:
        true if this inject's COPY operations should be treated as incidental
      • saveXml

        void saveXml​(java.lang.StringBuilder buffer)
        Write out configuration parameters as a \ XML tag
        Parameters:
        buffer - is the stream to write to
      • restoreXml

        void restoreXml​(XmlPullParser parser,
                        SleighLanguage language)
                 throws XmlParseException
        Restore the payload from an XML stream. The root expected document is the \ tag, which may be wrapped with another tag by the derived class.
        Parameters:
        parser - is the XML stream
        language - is used to resolve registers and address spaces
        Throws:
        XmlParseException - for badly formed XML