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

Unified Diff: src/objects.h

Issue 882973002: [turbofan] Improve JSON output (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix ASAN Created 5 years, 11 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
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index fdba599126c884503e9028c6b12cfef79bce56e3..135280125e1d52ca55182348fcf9da62178934a9 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8847,6 +8847,22 @@ class String: public Name {
<< ArrayIndexLengthBits::kShift) |
kIsNotArrayIndexMask;
+ class SubStringRange {
+ public:
+ explicit SubStringRange(String* string, int first = 0, int length = -1)
+ : string_(string),
+ first_(first),
+ length_(length == -1 ? string->length() : length) {}
+ class iterator;
+ inline iterator begin();
+ inline iterator end();
+
+ private:
+ String* string_;
+ int first_;
+ int length_;
+ };
+
// Representation of the flat content of a String.
// A non-flat string doesn't have flat content.
// A flat string has content that's encoded as a sequence of either
@@ -8881,6 +8897,10 @@ class String: public Name {
return twobyte_start[i];
}
+ bool UsesSameString(const FlatContent& other) const {
+ return onebyte_start == other.onebyte_start;
+ }
+
private:
enum State { NON_FLAT, ONE_BYTE, TWO_BYTE };
@@ -8899,6 +8919,7 @@ class String: public Name {
State state_;
friend class String;
+ friend class IterableSubString;
};
template <typename Char>
« src/compiler/pipeline.cc ('K') | « src/hydrogen.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698