V8 Project
v8::internal::Differencer::ResultWriter Class Reference
+ Collaboration diagram for v8::internal::Differencer::ResultWriter:

Public Member Functions

 ResultWriter (Comparator::Output *chunk_writer)
 
void eq ()
 
void skip1 (int len1)
 
void skip2 (int len2)
 
void close ()
 

Private Member Functions

void StartChunk ()
 
void FlushChunk ()
 

Private Attributes

Comparator::Outputchunk_writer_
 
int pos1_
 
int pos2_
 
int pos1_begin_
 
int pos2_begin_
 
bool has_open_chunk_
 

Detailed Description

Definition at line 185 of file liveedit.cc.

Constructor & Destructor Documentation

◆ ResultWriter()

v8::internal::Differencer::ResultWriter::ResultWriter ( Comparator::Output chunk_writer)
inlineexplicit

Member Function Documentation

◆ close()

void v8::internal::Differencer::ResultWriter::close ( )
inline

Definition at line 204 of file liveedit.cc.

204  {
205  FlushChunk();
206  }

References FlushChunk().

Referenced by v8::internal::Differencer::SaveResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eq()

void v8::internal::Differencer::ResultWriter::eq ( )
inline

Definition at line 191 of file liveedit.cc.

191  {
192  FlushChunk();
193  pos1_++;
194  pos2_++;
195  }

References FlushChunk(), pos1_, and pos2_.

Referenced by v8::internal::Differencer::SaveResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FlushChunk()

void v8::internal::Differencer::ResultWriter::FlushChunk ( )
inlineprivate

Definition at line 224 of file liveedit.cc.

224  {
225  if (has_open_chunk_) {
228  has_open_chunk_ = false;
229  }
230  }
virtual void AddChunk(int pos1, int pos2, int len1, int len2)=0

References v8::internal::Comparator::Output::AddChunk(), chunk_writer_, has_open_chunk_, pos1_, pos1_begin_, pos2_, and pos2_begin_.

Referenced by close(), and eq().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ skip1()

void v8::internal::Differencer::ResultWriter::skip1 ( int  len1)
inline

Definition at line 196 of file liveedit.cc.

196  {
197  StartChunk();
198  pos1_ += len1;
199  }

References pos1_, and StartChunk().

Referenced by v8::internal::Differencer::SaveResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ skip2()

void v8::internal::Differencer::ResultWriter::skip2 ( int  len2)
inline

Definition at line 200 of file liveedit.cc.

200  {
201  StartChunk();
202  pos2_ += len2;
203  }

References pos2_, and StartChunk().

Referenced by v8::internal::Differencer::SaveResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StartChunk()

void v8::internal::Differencer::ResultWriter::StartChunk ( )
inlineprivate

Definition at line 216 of file liveedit.cc.

216  {
217  if (!has_open_chunk_) {
218  pos1_begin_ = pos1_;
219  pos2_begin_ = pos2_;
220  has_open_chunk_ = true;
221  }
222  }

References has_open_chunk_, pos1_, pos1_begin_, pos2_, and pos2_begin_.

Referenced by skip1(), and skip2().

+ Here is the caller graph for this function:

Member Data Documentation

◆ chunk_writer_

Comparator::Output* v8::internal::Differencer::ResultWriter::chunk_writer_
private

Definition at line 209 of file liveedit.cc.

Referenced by FlushChunk().

◆ has_open_chunk_

bool v8::internal::Differencer::ResultWriter::has_open_chunk_
private

Definition at line 214 of file liveedit.cc.

Referenced by FlushChunk(), and StartChunk().

◆ pos1_

int v8::internal::Differencer::ResultWriter::pos1_
private

Definition at line 210 of file liveedit.cc.

Referenced by eq(), FlushChunk(), skip1(), and StartChunk().

◆ pos1_begin_

int v8::internal::Differencer::ResultWriter::pos1_begin_
private

Definition at line 212 of file liveedit.cc.

Referenced by FlushChunk(), and StartChunk().

◆ pos2_

int v8::internal::Differencer::ResultWriter::pos2_
private

Definition at line 211 of file liveedit.cc.

Referenced by eq(), FlushChunk(), skip2(), and StartChunk().

◆ pos2_begin_

int v8::internal::Differencer::ResultWriter::pos2_begin_
private

Definition at line 213 of file liveedit.cc.

Referenced by FlushChunk(), and StartChunk().


The documentation for this class was generated from the following file: