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

Side by Side Diff: src/objects.h

Issue 1350003: Pre-create properties on JSRegExp objects (Closed)
Patch Set: Created 10 years, 9 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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3649 matching lines...) Expand 10 before | Expand all | Expand 10 after
3660 3660
3661 // Offsets directly into the data fixed array. 3661 // Offsets directly into the data fixed array.
3662 static const int kDataTagOffset = 3662 static const int kDataTagOffset =
3663 FixedArray::kHeaderSize + kTagIndex * kPointerSize; 3663 FixedArray::kHeaderSize + kTagIndex * kPointerSize;
3664 static const int kDataAsciiCodeOffset = 3664 static const int kDataAsciiCodeOffset =
3665 FixedArray::kHeaderSize + kIrregexpASCIICodeIndex * kPointerSize; 3665 FixedArray::kHeaderSize + kIrregexpASCIICodeIndex * kPointerSize;
3666 static const int kDataUC16CodeOffset = 3666 static const int kDataUC16CodeOffset =
3667 FixedArray::kHeaderSize + kIrregexpUC16CodeIndex * kPointerSize; 3667 FixedArray::kHeaderSize + kIrregexpUC16CodeIndex * kPointerSize;
3668 static const int kIrregexpCaptureCountOffset = 3668 static const int kIrregexpCaptureCountOffset =
3669 FixedArray::kHeaderSize + kIrregexpCaptureCountIndex * kPointerSize; 3669 FixedArray::kHeaderSize + kIrregexpCaptureCountIndex * kPointerSize;
3670
3671 // In-object fields.
3672 static const int kSourceFieldIndex = 0;
3673 static const int kGlobalFieldIndex = 1;
3674 static const int kIgnoreCaseFieldIndex = 2;
3675 static const int kMultilineFieldIndex = 3;
3676 static const int kLastIndexFieldIndex = 4;
3670 }; 3677 };
3671 3678
3672 3679
3673 class CompilationCacheShape { 3680 class CompilationCacheShape {
3674 public: 3681 public:
3675 static inline bool IsMatch(HashTableKey* key, Object* value) { 3682 static inline bool IsMatch(HashTableKey* key, Object* value) {
3676 return key->IsMatch(value); 3683 return key->IsMatch(value);
3677 } 3684 }
3678 3685
3679 static inline uint32_t Hash(HashTableKey* key) { 3686 static inline uint32_t Hash(HashTableKey* key) {
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
5067 } else { 5074 } else {
5068 value &= ~(1 << bit_position); 5075 value &= ~(1 << bit_position);
5069 } 5076 }
5070 return value; 5077 return value;
5071 } 5078 }
5072 }; 5079 };
5073 5080
5074 } } // namespace v8::internal 5081 } } // namespace v8::internal
5075 5082
5076 #endif // V8_OBJECTS_H_ 5083 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698