Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: src/liveedit.cc

Issue 1737009: Rename Compare -> Comparator to resolve name conflict in v8::internal (Closed)
Patch Set: merge Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/liveedit.h ('k') | test/cctest/test-liveedit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index f016fc82983479596bb4263508d2857de6b8b95d..ba417e53c7274f67d277f13705a83456712682bb 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -49,7 +49,7 @@ namespace internal {
// that helps building the chunk list.
class Differencer {
public:
- explicit Differencer(Compare::Input* input)
+ explicit Differencer(Comparator::Input* input)
: input_(input), len1_(input->getLength1()), len2_(input->getLength2()) {
buffer_ = NewArray<int>(len1_ * len2_);
}
@@ -70,7 +70,7 @@ class Differencer {
CompareUpToTail(0, 0);
}
- void SaveResult(Compare::Output* chunk_writer) {
+ void SaveResult(Comparator::Output* chunk_writer) {
ResultWriter writer(chunk_writer);
int pos1 = 0;
@@ -112,7 +112,7 @@ class Differencer {
}
private:
- Compare::Input* input_;
+ Comparator::Input* input_;
int* buffer_;
int len1_;
int len2_;
@@ -195,7 +195,7 @@ class Differencer {
class ResultWriter {
public:
- explicit ResultWriter(Compare::Output* chunk_writer)
+ explicit ResultWriter(Comparator::Output* chunk_writer)
: chunk_writer_(chunk_writer), pos1_(0), pos2_(0),
pos1_begin_(-1), pos2_begin_(-1), has_open_chunk_(false) {
}
@@ -217,7 +217,7 @@ class Differencer {
}
private:
- Compare::Output* chunk_writer_;
+ Comparator::Output* chunk_writer_;
int pos1_;
int pos2_;
int pos1_begin_;
@@ -243,8 +243,8 @@ class Differencer {
};
-void Compare::CalculateDifference(Compare::Input* input,
- Compare::Output* result_writer) {
+void Comparator::CalculateDifference(Comparator::Input* input,
+ Comparator::Output* result_writer) {
Differencer differencer(input);
differencer.Initialize();
differencer.FillTable();
@@ -312,7 +312,7 @@ class LineEndsWrapper {
// Represents 2 strings as 2 arrays of lines.
-class LineArrayCompareInput : public Compare::Input {
+class LineArrayCompareInput : public Comparator::Input {
public:
LineArrayCompareInput(Handle<String> s1, Handle<String> s2,
LineEndsWrapper line_ends1, LineEndsWrapper line_ends2)
@@ -347,7 +347,7 @@ class LineArrayCompareInput : public Compare::Input {
// Stores compare result in JSArray. Each chunk is stored as 3 array elements:
// (pos1_begin, pos1_end, pos2_end).
-class LineArrayCompareOutput : public Compare::Output {
+class LineArrayCompareOutput : public Comparator::Output {
public:
LineArrayCompareOutput(LineEndsWrapper line_ends1, LineEndsWrapper line_ends2)
: array_(Factory::NewJSArray(10)), current_size_(0),
@@ -388,7 +388,7 @@ Handle<JSArray> LiveEdit::CompareStringsLinewise(Handle<String> s1,
LineArrayCompareInput input(s1, s2, line_ends1, line_ends2);
LineArrayCompareOutput output(line_ends1, line_ends2);
- Compare::CalculateDifference(&input, &output);
+ Comparator::CalculateDifference(&input, &output);
return output.GetResult();
}
« no previous file with comments | « src/liveedit.h ('k') | test/cctest/test-liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698