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

Side by Side Diff: src/objects.h

Issue 1034163002: Use atomic operation to read the length of a fixed array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile error Created 5 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
« no previous file with comments | « src/layout-descriptor.cc ('k') | src/objects.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 // 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 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 void SwapPairs(FixedArray* numbers, int i, int j); 2523 void SwapPairs(FixedArray* numbers, int i, int j);
2524 2524
2525 // Sort prefix of this array and the numbers array as pairs wrt. the 2525 // Sort prefix of this array and the numbers array as pairs wrt. the
2526 // numbers. If the numbers array and the this array are the same 2526 // numbers. If the numbers array and the this array are the same
2527 // object, the prefix of this array is sorted. 2527 // object, the prefix of this array is sorted.
2528 void SortPairs(FixedArray* numbers, uint32_t len); 2528 void SortPairs(FixedArray* numbers, uint32_t len);
2529 2529
2530 class BodyDescriptor : public FlexibleBodyDescriptor<kHeaderSize> { 2530 class BodyDescriptor : public FlexibleBodyDescriptor<kHeaderSize> {
2531 public: 2531 public:
2532 static inline int SizeOf(Map* map, HeapObject* object) { 2532 static inline int SizeOf(Map* map, HeapObject* object) {
2533 return SizeFor(reinterpret_cast<FixedArray*>(object)->length()); 2533 return SizeFor(
2534 reinterpret_cast<FixedArray*>(object)->synchronized_length());
2534 } 2535 }
2535 }; 2536 };
2536 2537
2537 protected: 2538 protected:
2538 // Set operation on FixedArray without using write barriers. Can 2539 // Set operation on FixedArray without using write barriers. Can
2539 // only be used for storing old space objects or smis. 2540 // only be used for storing old space objects or smis.
2540 static inline void NoWriteBarrierSet(FixedArray* array, 2541 static inline void NoWriteBarrierSet(FixedArray* array,
2541 int index, 2542 int index,
2542 Object* value); 2543 Object* value);
2543 2544
(...skipping 8531 matching lines...) Expand 10 before | Expand all | Expand 10 after
11075 } else { 11076 } else {
11076 value &= ~(1 << bit_position); 11077 value &= ~(1 << bit_position);
11077 } 11078 }
11078 return value; 11079 return value;
11079 } 11080 }
11080 }; 11081 };
11081 11082
11082 } } // namespace v8::internal 11083 } } // namespace v8::internal
11083 11084
11084 #endif // V8_OBJECTS_H_ 11085 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/layout-descriptor.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698