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

Side by Side Diff: src/objects.h

Issue 1110603005: Remove support for malloc'd typed arrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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/d8.cc ('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 10230 matching lines...) Expand 10 before | Expand all | Expand 10 after
10241 10241
10242 // [byte_length]: length in bytes 10242 // [byte_length]: length in bytes
10243 DECL_ACCESSORS(byte_length, Object) 10243 DECL_ACCESSORS(byte_length, Object)
10244 10244
10245 inline uint32_t bit_field() const; 10245 inline uint32_t bit_field() const;
10246 inline void set_bit_field(uint32_t bits); 10246 inline void set_bit_field(uint32_t bits);
10247 10247
10248 inline bool is_external(); 10248 inline bool is_external();
10249 inline void set_is_external(bool value); 10249 inline void set_is_external(bool value);
10250 10250
10251 inline bool should_be_freed();
10252 inline void set_should_be_freed(bool value);
10253
10254 inline bool is_neuterable(); 10251 inline bool is_neuterable();
10255 inline void set_is_neuterable(bool value); 10252 inline void set_is_neuterable(bool value);
10256 10253
10257 inline bool was_neutered(); 10254 inline bool was_neutered();
10258 inline void set_was_neutered(bool value); 10255 inline void set_was_neutered(bool value);
10259 10256
10260 // [weak_next]: linked list of array buffers. 10257 // [weak_next]: linked list of array buffers.
10261 DECL_ACCESSORS(weak_next, Object) 10258 DECL_ACCESSORS(weak_next, Object)
10262 10259
10263 DECLARE_CAST(JSArrayBuffer) 10260 DECLARE_CAST(JSArrayBuffer)
10264 10261
10265 void Neuter(); 10262 void Neuter();
10266 10263
10267 // Dispatched behavior. 10264 // Dispatched behavior.
10268 DECLARE_PRINTER(JSArrayBuffer) 10265 DECLARE_PRINTER(JSArrayBuffer)
10269 DECLARE_VERIFIER(JSArrayBuffer) 10266 DECLARE_VERIFIER(JSArrayBuffer)
10270 10267
10271 static const int kBackingStoreOffset = JSObject::kHeaderSize; 10268 static const int kBackingStoreOffset = JSObject::kHeaderSize;
10272 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; 10269 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize;
10273 static const int kBitFieldOffset = kByteLengthOffset + kPointerSize; 10270 static const int kBitFieldOffset = kByteLengthOffset + kPointerSize;
10274 static const int kWeakNextOffset = kBitFieldOffset + kPointerSize; 10271 static const int kWeakNextOffset = kBitFieldOffset + kPointerSize;
10275 static const int kSize = kWeakNextOffset + kPointerSize; 10272 static const int kSize = kWeakNextOffset + kPointerSize;
10276 10273
10277 static const int kSizeWithInternalFields = 10274 static const int kSizeWithInternalFields =
10278 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; 10275 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize;
10279 10276
10280 class IsExternal : public BitField<bool, 1, 1> {}; 10277 class IsExternal : public BitField<bool, 1, 1> {};
10281 class ShouldBeFreed : public BitField<bool, 2, 1> {}; 10278 class IsNeuterable : public BitField<bool, 2, 1> {};
10282 class IsNeuterable : public BitField<bool, 3, 1> {}; 10279 class WasNeutered : public BitField<bool, 3, 1> {};
10283 class WasNeutered : public BitField<bool, 4, 1> {};
10284 10280
10285 private: 10281 private:
10286 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); 10282 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer);
10287 }; 10283 };
10288 10284
10289 10285
10290 class JSArrayBufferView: public JSObject { 10286 class JSArrayBufferView: public JSObject {
10291 public: 10287 public:
10292 // [buffer]: ArrayBuffer that this typed array views. 10288 // [buffer]: ArrayBuffer that this typed array views.
10293 DECL_ACCESSORS(buffer, Object) 10289 DECL_ACCESSORS(buffer, Object)
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
11102 } else { 11098 } else {
11103 value &= ~(1 << bit_position); 11099 value &= ~(1 << bit_position);
11104 } 11100 }
11105 return value; 11101 return value;
11106 } 11102 }
11107 }; 11103 };
11108 11104
11109 } } // namespace v8::internal 11105 } } // namespace v8::internal
11110 11106
11111 #endif // V8_OBJECTS_H_ 11107 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698