| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 79e2a5ee974effcdf534a54f1d380bb724b2f64c..026caf8257852cf4040095721233eadc4691212a 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -7326,6 +7326,8 @@ class Symbol: public Name {
|
| };
|
|
|
|
|
| +class ConsString;
|
| +
|
| // The String abstract class captures JavaScript string values:
|
| //
|
| // Ecma-262:
|
| @@ -7604,6 +7606,7 @@ class String: public Name {
|
| return NonOneByteStart(chars, length) >= length;
|
| }
|
|
|
| + // TODO(dcarney): Replace all instances of this with VisitFlat.
|
| template<class Visitor, class ConsOp>
|
| static inline void Visit(String* string,
|
| unsigned offset,
|
| @@ -7612,6 +7615,21 @@ class String: public Name {
|
| int32_t type,
|
| unsigned length);
|
|
|
| + template<class Visitor>
|
| + static inline ConsString* VisitFlat(Visitor* visitor,
|
| + String* string,
|
| + int offset,
|
| + int length,
|
| + int32_t type);
|
| +
|
| + template<class Visitor>
|
| + static inline ConsString* VisitFlat(Visitor* visitor,
|
| + String* string,
|
| + int offset = 0) {
|
| + int32_t type = string->map()->instance_type();
|
| + return VisitFlat(visitor, string, offset, string->length(), type);
|
| + }
|
| +
|
| private:
|
| friend class Name;
|
|
|
|
|