* @return DiffOp[]
*/
public function diff( $from_lines, $to_lines ) {
- wfProfileIn( __METHOD__ );
// Diff and store locally
$this->diffLocal( $from_lines, $to_lines );
$edits[] = new DiffOpAdd( $add );
}
}
- wfProfileOut( __METHOD__ );
return $edits;
}
*/
private function diffLocal( $from_lines, $to_lines ) {
global $wgExternalDiffEngine;
- wfProfileIn( __METHOD__ );
if ( $wgExternalDiffEngine == 'wikidiff3' ) {
// wikidiff3
// Find the LCS.
$this->compareSeq( 0, count( $this->xv ), 0, count( $this->yv ) );
}
- wfProfileOut( __METHOD__ );
}
/**
* This is extracted verbatim from analyze.c (GNU diffutils-2.7).
*/
private function shiftBoundaries( $lines, &$changed, $other_changed ) {
- wfProfileIn( __METHOD__ );
$i = 0;
$j = 0;
assert( '$j >= 0 && !$other_changed[$j]' );
}
}
- wfProfileOut( __METHOD__ );
}
}
*/
public function __construct( $from_lines, $to_lines,
$mapped_from_lines, $mapped_to_lines ) {
- wfProfileIn( __METHOD__ );
assert( 'count( $from_lines ) == count( $mapped_from_lines )' );
assert( 'count( $to_lines ) == count( $mapped_to_lines )' );
$yi += count( $closing );
}
}
- wfProfileOut( __METHOD__ );
}
}
* @param string[] $closing_lines
*/
public function __construct( $orig_lines, $closing_lines ) {
- wfProfileIn( __METHOD__ );
list( $orig_words, $orig_stripped ) = $this->split( $orig_lines );
list( $closing_words, $closing_stripped ) = $this->split( $closing_lines );
parent::__construct( $orig_words, $closing_words,
$orig_stripped, $closing_stripped );
- wfProfileOut( __METHOD__ );
}
/**
* @return array[]
*/
private function split( $lines ) {
- wfProfileIn( __METHOD__ );
$words = array();
$stripped = array();
}
}
}
- wfProfileOut( __METHOD__ );
return array( $words, $stripped );
}
* @return string[]
*/
public function orig() {
- wfProfileIn( __METHOD__ );
$orig = new HWLDFWordAccumulator;
foreach ( $this->edits as $edit ) {
}
}
$lines = $orig->getLines();
- wfProfileOut( __METHOD__ );
return $lines;
}
* @return string[]
*/
public function closing() {
- wfProfileIn( __METHOD__ );
$closing = new HWLDFWordAccumulator;
foreach ( $this->edits as $edit ) {
}
}
$lines = $closing->getLines();
- wfProfileOut( __METHOD__ );
return $lines;
}