V8 Project
v8::internal::CompareOutputArrayWriter Class Reference
+ Collaboration diagram for v8::internal::CompareOutputArrayWriter:

Public Member Functions

 CompareOutputArrayWriter (Isolate *isolate)
 
Handle< JSArrayGetResult ()
 
void WriteChunk (int char_pos1, int char_pos2, int char_len1, int char_len2)
 

Private Attributes

Handle< JSArrayarray_
 
int current_size_
 

Detailed Description

Definition at line 321 of file liveedit.cc.

Constructor & Destructor Documentation

◆ CompareOutputArrayWriter()

v8::internal::CompareOutputArrayWriter::CompareOutputArrayWriter ( Isolate isolate)
inlineexplicit

Definition at line 323 of file liveedit.cc.

324  : array_(isolate->factory()->NewJSArray(10)), current_size_(0) {}

Member Function Documentation

◆ GetResult()

Handle<JSArray> v8::internal::CompareOutputArrayWriter::GetResult ( )
inline

Definition at line 326 of file liveedit.cc.

326  {
327  return array_;
328  }

References array_.

Referenced by v8::internal::TokenizingLineArrayCompareOutput::GetResult().

+ Here is the caller graph for this function:

◆ WriteChunk()

void v8::internal::CompareOutputArrayWriter::WriteChunk ( int  char_pos1,
int  char_pos2,
int  char_len1,
int  char_len2 
)
inline

Definition at line 330 of file liveedit.cc.

330  {
331  Isolate* isolate = array_->GetIsolate();
334  Handle<Object>(Smi::FromInt(char_pos1), isolate));
336  current_size_ + 1,
337  Handle<Object>(Smi::FromInt(char_pos1 + char_len1),
338  isolate));
340  current_size_ + 2,
341  Handle<Object>(Smi::FromInt(char_pos2 + char_len2),
342  isolate));
343  current_size_ += 3;
344  }
static Smi * FromInt(int value)
Definition: objects-inl.h:1321
void SetElementSloppy(Handle< JSObject > object, uint32_t index, Handle< Object > value)
Definition: liveedit.cc:25

References array_, current_size_, v8::internal::Smi::FromInt(), and v8::internal::SetElementSloppy().

Referenced by v8::internal::TokenizingLineArrayCompareOutput::AddChunk(), and v8::internal::TokensCompareOutput::AddChunk().

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

Member Data Documentation

◆ array_

Handle<JSArray> v8::internal::CompareOutputArrayWriter::array_
private

Definition at line 347 of file liveedit.cc.

Referenced by GetResult(), and WriteChunk().

◆ current_size_

int v8::internal::CompareOutputArrayWriter::current_size_
private

Definition at line 348 of file liveedit.cc.

Referenced by WriteChunk().


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