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

Side by Side Diff: src/objects-inl.h

Issue 2394713003: [regexp] Port test, match, and search (Closed)
Patch Set: Rebaseline bytecode expectations Created 4 years, 2 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
« no previous file with comments | « src/objects.cc ('k') | test/cctest/interpreter/bytecode_expectations/CallRuntime.golden » ('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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 7012 matching lines...) Expand 10 before | Expand all | Expand 10 after
7023 return FixedArray::cast(data())->get(index); 7023 return FixedArray::cast(data())->get(index);
7024 } 7024 }
7025 7025
7026 7026
7027 void JSRegExp::SetDataAt(int index, Object* value) { 7027 void JSRegExp::SetDataAt(int index, Object* value) {
7028 DCHECK(TypeTag() != NOT_COMPILED); 7028 DCHECK(TypeTag() != NOT_COMPILED);
7029 DCHECK(index >= kDataIndex); // Only implementation data can be set this way. 7029 DCHECK(index >= kDataIndex); // Only implementation data can be set this way.
7030 FixedArray::cast(data())->set(index, value); 7030 FixedArray::cast(data())->set(index, value);
7031 } 7031 }
7032 7032
7033 void JSRegExp::SetLastIndex(int index) {
7034 static const int offset =
7035 kSize + JSRegExp::kLastIndexFieldIndex * kPointerSize;
7036 Smi* value = Smi::FromInt(index);
7037 WRITE_FIELD(this, offset, value);
7038 }
7039
7040 Object* JSRegExp::LastIndex() {
7041 static const int offset =
7042 kSize + JSRegExp::kLastIndexFieldIndex * kPointerSize;
7043 return READ_FIELD(this, offset);
7044 }
7033 7045
7034 ElementsKind JSObject::GetElementsKind() { 7046 ElementsKind JSObject::GetElementsKind() {
7035 ElementsKind kind = map()->elements_kind(); 7047 ElementsKind kind = map()->elements_kind();
7036 #if VERIFY_HEAP && DEBUG 7048 #if VERIFY_HEAP && DEBUG
7037 FixedArrayBase* fixed_array = 7049 FixedArrayBase* fixed_array =
7038 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset)); 7050 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset));
7039 7051
7040 // If a GC was caused while constructing this object, the elements 7052 // If a GC was caused while constructing this object, the elements
7041 // pointer may point to a one pointer filler map. 7053 // pointer may point to a one pointer filler map.
7042 if (ElementsAreSafeToExamine()) { 7054 if (ElementsAreSafeToExamine()) {
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
8314 #undef WRITE_INT64_FIELD 8326 #undef WRITE_INT64_FIELD
8315 #undef READ_BYTE_FIELD 8327 #undef READ_BYTE_FIELD
8316 #undef WRITE_BYTE_FIELD 8328 #undef WRITE_BYTE_FIELD
8317 #undef NOBARRIER_READ_BYTE_FIELD 8329 #undef NOBARRIER_READ_BYTE_FIELD
8318 #undef NOBARRIER_WRITE_BYTE_FIELD 8330 #undef NOBARRIER_WRITE_BYTE_FIELD
8319 8331
8320 } // namespace internal 8332 } // namespace internal
8321 } // namespace v8 8333 } // namespace v8
8322 8334
8323 #endif // V8_OBJECTS_INL_H_ 8335 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/interpreter/bytecode_expectations/CallRuntime.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698