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

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

Issue 12186012: Merged r13471, r13504 into 3.15 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.15
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/runtime.cc » ('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 // 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 4950 matching lines...) Expand 10 before | Expand all | Expand 10 after
4961 FixedArray* fa = reinterpret_cast<FixedArray*>(data()); 4961 FixedArray* fa = reinterpret_cast<FixedArray*>(data());
4962 if (value->IsSmi()) { 4962 if (value->IsSmi()) {
4963 fa->set_unchecked(index, Smi::cast(value)); 4963 fa->set_unchecked(index, Smi::cast(value));
4964 } else { 4964 } else {
4965 // We only do this during GC, so we don't need to notify the write barrier. 4965 // We only do this during GC, so we don't need to notify the write barrier.
4966 fa->set_unchecked(heap, index, value, SKIP_WRITE_BARRIER); 4966 fa->set_unchecked(heap, index, value, SKIP_WRITE_BARRIER);
4967 } 4967 }
4968 } 4968 }
4969 4969
4970 4970
4971 void JSRegExp::ResetLastIndex() {
4972 InObjectPropertyAtPut(JSRegExp::kLastIndexFieldIndex,
4973 Smi::FromInt(0),
4974 SKIP_WRITE_BARRIER); // It's a Smi.
4975 }
4976
4977
4978 ElementsKind JSObject::GetElementsKind() { 4971 ElementsKind JSObject::GetElementsKind() {
4979 ElementsKind kind = map()->elements_kind(); 4972 ElementsKind kind = map()->elements_kind();
4980 #if DEBUG 4973 #if DEBUG
4981 FixedArrayBase* fixed_array = 4974 FixedArrayBase* fixed_array =
4982 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset)); 4975 reinterpret_cast<FixedArrayBase*>(READ_FIELD(this, kElementsOffset));
4983 Map* map = fixed_array->map(); 4976 Map* map = fixed_array->map();
4984 ASSERT((IsFastSmiOrObjectElementsKind(kind) && 4977 ASSERT((IsFastSmiOrObjectElementsKind(kind) &&
4985 (map == GetHeap()->fixed_array_map() || 4978 (map == GetHeap()->fixed_array_map() ||
4986 map == GetHeap()->fixed_cow_array_map())) || 4979 map == GetHeap()->fixed_cow_array_map())) ||
4987 (IsFastDoubleElementsKind(kind) && 4980 (IsFastDoubleElementsKind(kind) &&
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
5780 #undef WRITE_UINT32_FIELD 5773 #undef WRITE_UINT32_FIELD
5781 #undef READ_SHORT_FIELD 5774 #undef READ_SHORT_FIELD
5782 #undef WRITE_SHORT_FIELD 5775 #undef WRITE_SHORT_FIELD
5783 #undef READ_BYTE_FIELD 5776 #undef READ_BYTE_FIELD
5784 #undef WRITE_BYTE_FIELD 5777 #undef WRITE_BYTE_FIELD
5785 5778
5786 5779
5787 } } // namespace v8::internal 5780 } } // namespace v8::internal
5788 5781
5789 #endif // V8_OBJECTS_INL_H_ 5782 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698