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

Side by Side Diff: src/objects.h

Issue 1901573003: [regexp] do not assume short external strings have a minimum size. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 9213 matching lines...) Expand 10 before | Expand all | Expand 10 after
9224 class ExternalString: public String { 9224 class ExternalString: public String {
9225 public: 9225 public:
9226 DECLARE_CAST(ExternalString) 9226 DECLARE_CAST(ExternalString)
9227 9227
9228 // Layout description. 9228 // Layout description.
9229 static const int kResourceOffset = POINTER_SIZE_ALIGN(String::kSize); 9229 static const int kResourceOffset = POINTER_SIZE_ALIGN(String::kSize);
9230 static const int kShortSize = kResourceOffset + kPointerSize; 9230 static const int kShortSize = kResourceOffset + kPointerSize;
9231 static const int kResourceDataOffset = kResourceOffset + kPointerSize; 9231 static const int kResourceDataOffset = kResourceOffset + kPointerSize;
9232 static const int kSize = kResourceDataOffset + kPointerSize; 9232 static const int kSize = kResourceDataOffset + kPointerSize;
9233 9233
9234 static const int kMaxShortLength =
9235 (kShortSize - SeqString::kHeaderSize) / kCharSize;
9236
9237 // Return whether external string is short (data pointer is not cached). 9234 // Return whether external string is short (data pointer is not cached).
9238 inline bool is_short(); 9235 inline bool is_short();
9239 9236
9240 STATIC_ASSERT(kResourceOffset == Internals::kStringResourceOffset); 9237 STATIC_ASSERT(kResourceOffset == Internals::kStringResourceOffset);
9241 9238
9242 private: 9239 private:
9243 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalString); 9240 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalString);
9244 }; 9241 };
9245 9242
9246 9243
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
10780 } 10777 }
10781 return value; 10778 return value;
10782 } 10779 }
10783 }; 10780 };
10784 10781
10785 10782
10786 } // NOLINT, false-positive due to second-order macros. 10783 } // NOLINT, false-positive due to second-order macros.
10787 } // NOLINT, false-positive due to second-order macros. 10784 } // NOLINT, false-positive due to second-order macros.
10788 10785
10789 #endif // V8_OBJECTS_H_ 10786 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698