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

Side by Side Diff: src/objects.h

Issue 1432453005: Revert of Use in-object fields instead of private symbols for regexp slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « src/js/string.js ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/allocation.h" 10 #include "src/allocation.h"
(...skipping 7699 matching lines...) Expand 10 before | Expand all | Expand 10 after
7710 bool is_ignore_case() { return (value_ & IGNORE_CASE) != 0; } 7710 bool is_ignore_case() { return (value_ & IGNORE_CASE) != 0; }
7711 bool is_multiline() { return (value_ & MULTILINE) != 0; } 7711 bool is_multiline() { return (value_ & MULTILINE) != 0; }
7712 bool is_sticky() { return (value_ & STICKY) != 0; } 7712 bool is_sticky() { return (value_ & STICKY) != 0; }
7713 bool is_unicode() { return (value_ & UNICODE_ESCAPES) != 0; } 7713 bool is_unicode() { return (value_ & UNICODE_ESCAPES) != 0; }
7714 uint32_t value() { return value_; } 7714 uint32_t value() { return value_; }
7715 private: 7715 private:
7716 uint32_t value_; 7716 uint32_t value_;
7717 }; 7717 };
7718 7718
7719 DECL_ACCESSORS(data, Object) 7719 DECL_ACCESSORS(data, Object)
7720 DECL_ACCESSORS(flags, Object)
7721 DECL_ACCESSORS(source, Object)
7722 7720
7723 inline Type TypeTag(); 7721 inline Type TypeTag();
7724 inline int CaptureCount(); 7722 inline int CaptureCount();
7725 inline Flags GetFlags(); 7723 inline Flags GetFlags();
7726 inline String* Pattern(); 7724 inline String* Pattern();
7727 inline Object* DataAt(int index); 7725 inline Object* DataAt(int index);
7728 // Set implementation data after the object has been prepared. 7726 // Set implementation data after the object has been prepared.
7729 inline void SetDataAt(int index, Object* value); 7727 inline void SetDataAt(int index, Object* value);
7730 7728
7731 static int code_index(bool is_latin1) { 7729 static int code_index(bool is_latin1) {
(...skipping 12 matching lines...) Expand all
7744 } 7742 }
7745 } 7743 }
7746 7744
7747 DECLARE_CAST(JSRegExp) 7745 DECLARE_CAST(JSRegExp)
7748 7746
7749 // Dispatched behavior. 7747 // Dispatched behavior.
7750 DECLARE_PRINTER(JSRegExp) 7748 DECLARE_PRINTER(JSRegExp)
7751 DECLARE_VERIFIER(JSRegExp) 7749 DECLARE_VERIFIER(JSRegExp)
7752 7750
7753 static const int kDataOffset = JSObject::kHeaderSize; 7751 static const int kDataOffset = JSObject::kHeaderSize;
7754 static const int kSourceOffset = kDataOffset + kPointerSize; 7752 static const int kSize = kDataOffset + kPointerSize;
7755 static const int kFlagsOffset = kSourceOffset + kPointerSize;
7756 static const int kSize = kFlagsOffset + kPointerSize;
7757 7753
7758 // Indices in the data array. 7754 // Indices in the data array.
7759 static const int kTagIndex = 0; 7755 static const int kTagIndex = 0;
7760 static const int kSourceIndex = kTagIndex + 1; 7756 static const int kSourceIndex = kTagIndex + 1;
7761 static const int kFlagsIndex = kSourceIndex + 1; 7757 static const int kFlagsIndex = kSourceIndex + 1;
7762 static const int kDataIndex = kFlagsIndex + 1; 7758 static const int kDataIndex = kFlagsIndex + 1;
7763 // The data fields are used in different ways depending on the 7759 // The data fields are used in different ways depending on the
7764 // value of the tag. 7760 // value of the tag.
7765 // Atom regexps (literal strings). 7761 // Atom regexps (literal strings).
7766 static const int kAtomPatternIndex = kDataIndex; 7762 static const int kAtomPatternIndex = kDataIndex;
(...skipping 28 matching lines...) Expand all
7795 static const int kDataTagOffset = 7791 static const int kDataTagOffset =
7796 FixedArray::kHeaderSize + kTagIndex * kPointerSize; 7792 FixedArray::kHeaderSize + kTagIndex * kPointerSize;
7797 static const int kDataOneByteCodeOffset = 7793 static const int kDataOneByteCodeOffset =
7798 FixedArray::kHeaderSize + kIrregexpLatin1CodeIndex * kPointerSize; 7794 FixedArray::kHeaderSize + kIrregexpLatin1CodeIndex * kPointerSize;
7799 static const int kDataUC16CodeOffset = 7795 static const int kDataUC16CodeOffset =
7800 FixedArray::kHeaderSize + kIrregexpUC16CodeIndex * kPointerSize; 7796 FixedArray::kHeaderSize + kIrregexpUC16CodeIndex * kPointerSize;
7801 static const int kIrregexpCaptureCountOffset = 7797 static const int kIrregexpCaptureCountOffset =
7802 FixedArray::kHeaderSize + kIrregexpCaptureCountIndex * kPointerSize; 7798 FixedArray::kHeaderSize + kIrregexpCaptureCountIndex * kPointerSize;
7803 7799
7804 // In-object fields. 7800 // In-object fields.
7805 static const int kLastIndexFieldIndex = 0; 7801 static const int kSourceFieldIndex = 0;
7806 static const int kInObjectFieldCount = 1; 7802 static const int kFlagsFieldIndex = 1;
7803 static const int kLastIndexFieldIndex = 2;
7804 static const int kInObjectFieldCount = 3;
7807 7805
7808 // The uninitialized value for a regexp code object. 7806 // The uninitialized value for a regexp code object.
7809 static const int kUninitializedValue = -1; 7807 static const int kUninitializedValue = -1;
7810 7808
7811 // The compilation error value for the regexp code object. The real error 7809 // The compilation error value for the regexp code object. The real error
7812 // object is in the saved code field. 7810 // object is in the saved code field.
7813 static const int kCompilationErrorValue = -2; 7811 static const int kCompilationErrorValue = -2;
7814 7812
7815 // When we store the sweep generation at which we moved the code from the 7813 // When we store the sweep generation at which we moved the code from the
7816 // code index to the saved code index we mask it of to be in the [0:255] 7814 // code index to the saved code index we mask it of to be in the [0:255]
(...skipping 2999 matching lines...) Expand 10 before | Expand all | Expand 10 after
10816 // (elements + properties) in the current level. 10814 // (elements + properties) in the current level.
10817 int levelLength_ = 0; 10815 int levelLength_ = 0;
10818 10816
10819 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator); 10817 DISALLOW_COPY_AND_ASSIGN(KeyAccumulator);
10820 }; 10818 };
10821 10819
10822 } // NOLINT, false-positive due to second-order macros. 10820 } // NOLINT, false-positive due to second-order macros.
10823 } // NOLINT, false-positive due to second-order macros. 10821 } // NOLINT, false-positive due to second-order macros.
10824 10822
10825 #endif // V8_OBJECTS_H_ 10823 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/js/string.js ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698