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

Side by Side Diff: src/objects.h

Issue 1115043005: Revert of Remove the weak list of array buffers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/heap/objects-visiting-inl.h ('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 10240 matching lines...) Expand 10 before | Expand all | Expand 10 after
10251 10251
10252 inline bool is_external(); 10252 inline bool is_external();
10253 inline void set_is_external(bool value); 10253 inline void set_is_external(bool value);
10254 10254
10255 inline bool is_neuterable(); 10255 inline bool is_neuterable();
10256 inline void set_is_neuterable(bool value); 10256 inline void set_is_neuterable(bool value);
10257 10257
10258 inline bool was_neutered(); 10258 inline bool was_neutered();
10259 inline void set_was_neutered(bool value); 10259 inline void set_was_neutered(bool value);
10260 10260
10261 // [weak_next]: linked list of array buffers.
10262 DECL_ACCESSORS(weak_next, Object)
10263
10261 DECLARE_CAST(JSArrayBuffer) 10264 DECLARE_CAST(JSArrayBuffer)
10262 10265
10263 void Neuter(); 10266 void Neuter();
10264 10267
10265 // Dispatched behavior. 10268 // Dispatched behavior.
10266 DECLARE_PRINTER(JSArrayBuffer) 10269 DECLARE_PRINTER(JSArrayBuffer)
10267 DECLARE_VERIFIER(JSArrayBuffer) 10270 DECLARE_VERIFIER(JSArrayBuffer)
10268 10271
10269 static const int kBackingStoreOffset = JSObject::kHeaderSize; 10272 static const int kBackingStoreOffset = JSObject::kHeaderSize;
10270 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; 10273 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize;
10271 static const int kBitFieldSlot = kByteLengthOffset + kPointerSize; 10274 static const int kBitFieldSlot = kByteLengthOffset + kPointerSize;
10272 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT 10275 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT
10273 static const int kBitFieldOffset = kBitFieldSlot; 10276 static const int kBitFieldOffset = kBitFieldSlot;
10274 #else 10277 #else
10275 static const int kBitFieldOffset = kBitFieldSlot + kIntSize; 10278 static const int kBitFieldOffset = kBitFieldSlot + kIntSize;
10276 #endif 10279 #endif
10277 static const int kSize = kBitFieldSlot + kPointerSize; 10280 static const int kWeakNextOffset = kBitFieldSlot + kPointerSize;
10281 static const int kSize = kWeakNextOffset + kPointerSize;
10278 10282
10279 static const int kSizeWithInternalFields = 10283 static const int kSizeWithInternalFields =
10280 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; 10284 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize;
10281 10285
10282 class IsExternal : public BitField<bool, 1, 1> {}; 10286 class IsExternal : public BitField<bool, 1, 1> {};
10283 class IsNeuterable : public BitField<bool, 2, 1> {}; 10287 class IsNeuterable : public BitField<bool, 2, 1> {};
10284 class WasNeutered : public BitField<bool, 3, 1> {}; 10288 class WasNeutered : public BitField<bool, 3, 1> {};
10285 10289
10286 private: 10290 private:
10287 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); 10291 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer);
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
11103 } else { 11107 } else {
11104 value &= ~(1 << bit_position); 11108 value &= ~(1 << bit_position);
11105 } 11109 }
11106 return value; 11110 return value;
11107 } 11111 }
11108 }; 11112 };
11109 11113
11110 } } // namespace v8::internal 11114 } } // namespace v8::internal
11111 11115
11112 #endif // V8_OBJECTS_H_ 11116 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698