Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 STORE_AND_GROW_TRANSITION_SMI_TO_DOUBLE, | 167 STORE_AND_GROW_TRANSITION_SMI_TO_DOUBLE, |
| 168 STORE_AND_GROW_TRANSITION_DOUBLE_TO_OBJECT, | 168 STORE_AND_GROW_TRANSITION_DOUBLE_TO_OBJECT, |
| 169 STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_OBJECT, | 169 STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_OBJECT, |
| 170 STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_DOUBLE, | 170 STORE_AND_GROW_TRANSITION_HOLEY_SMI_TO_DOUBLE, |
| 171 STORE_AND_GROW_TRANSITION_HOLEY_DOUBLE_TO_OBJECT, | 171 STORE_AND_GROW_TRANSITION_HOLEY_DOUBLE_TO_OBJECT, |
| 172 STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS, | 172 STORE_NO_TRANSITION_IGNORE_OUT_OF_BOUNDS, |
| 173 STORE_NO_TRANSITION_HANDLE_COW | 173 STORE_NO_TRANSITION_HANDLE_COW |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 | 176 |
| 177 enum SharedFlag { NOT_SHARED, SHARED }; | |
|
jochen (gone - plz use gerrit)
2015/05/22 08:37:47
not needed?
binji
2015/05/22 09:27:34
It was suggested in the other CL that this would m
Jarin
2015/05/22 09:37:35
Indeed, I suggested that for making it clear at ca
| |
| 178 | |
| 179 | |
| 177 enum ContextualMode { | 180 enum ContextualMode { |
| 178 NOT_CONTEXTUAL, | 181 NOT_CONTEXTUAL, |
| 179 CONTEXTUAL | 182 CONTEXTUAL |
| 180 }; | 183 }; |
| 181 | 184 |
| 182 | 185 |
| 183 enum MutableMode { | 186 enum MutableMode { |
| 184 MUTABLE, | 187 MUTABLE, |
| 185 IMMUTABLE | 188 IMMUTABLE |
| 186 }; | 189 }; |
| (...skipping 10086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10273 | 10276 |
| 10274 inline bool is_external(); | 10277 inline bool is_external(); |
| 10275 inline void set_is_external(bool value); | 10278 inline void set_is_external(bool value); |
| 10276 | 10279 |
| 10277 inline bool is_neuterable(); | 10280 inline bool is_neuterable(); |
| 10278 inline void set_is_neuterable(bool value); | 10281 inline void set_is_neuterable(bool value); |
| 10279 | 10282 |
| 10280 inline bool was_neutered(); | 10283 inline bool was_neutered(); |
| 10281 inline void set_was_neutered(bool value); | 10284 inline void set_was_neutered(bool value); |
| 10282 | 10285 |
| 10286 inline bool is_shared(); | |
| 10287 inline void set_is_shared(bool value); | |
| 10288 | |
| 10283 DECLARE_CAST(JSArrayBuffer) | 10289 DECLARE_CAST(JSArrayBuffer) |
| 10284 | 10290 |
| 10285 void Neuter(); | 10291 void Neuter(); |
| 10286 | 10292 |
| 10287 // Dispatched behavior. | 10293 // Dispatched behavior. |
| 10288 DECLARE_PRINTER(JSArrayBuffer) | 10294 DECLARE_PRINTER(JSArrayBuffer) |
| 10289 DECLARE_VERIFIER(JSArrayBuffer) | 10295 DECLARE_VERIFIER(JSArrayBuffer) |
| 10290 | 10296 |
| 10291 static const int kBackingStoreOffset = JSObject::kHeaderSize; | 10297 static const int kBackingStoreOffset = JSObject::kHeaderSize; |
| 10292 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; | 10298 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; |
| 10293 static const int kBitFieldSlot = kByteLengthOffset + kPointerSize; | 10299 static const int kBitFieldSlot = kByteLengthOffset + kPointerSize; |
| 10294 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT | 10300 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT |
| 10295 static const int kBitFieldOffset = kBitFieldSlot; | 10301 static const int kBitFieldOffset = kBitFieldSlot; |
| 10296 #else | 10302 #else |
| 10297 static const int kBitFieldOffset = kBitFieldSlot + kIntSize; | 10303 static const int kBitFieldOffset = kBitFieldSlot + kIntSize; |
| 10298 #endif | 10304 #endif |
| 10299 static const int kSize = kBitFieldSlot + kPointerSize; | 10305 static const int kSize = kBitFieldSlot + kPointerSize; |
| 10300 | 10306 |
| 10301 static const int kSizeWithInternalFields = | 10307 static const int kSizeWithInternalFields = |
| 10302 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; | 10308 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; |
| 10303 | 10309 |
| 10304 class IsExternal : public BitField<bool, 1, 1> {}; | 10310 class IsExternal : public BitField<bool, 1, 1> {}; |
| 10305 class IsNeuterable : public BitField<bool, 2, 1> {}; | 10311 class IsNeuterable : public BitField<bool, 2, 1> {}; |
| 10306 class WasNeutered : public BitField<bool, 3, 1> {}; | 10312 class WasNeutered : public BitField<bool, 3, 1> {}; |
| 10313 class IsShared : public BitField<bool, 4, 1> {}; | |
| 10307 | 10314 |
| 10308 private: | 10315 private: |
| 10309 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); | 10316 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); |
| 10310 }; | 10317 }; |
| 10311 | 10318 |
| 10312 | 10319 |
| 10313 class JSArrayBufferView: public JSObject { | 10320 class JSArrayBufferView: public JSObject { |
| 10314 public: | 10321 public: |
| 10315 // [buffer]: ArrayBuffer that this typed array views. | 10322 // [buffer]: ArrayBuffer that this typed array views. |
| 10316 DECL_ACCESSORS(buffer, Object) | 10323 DECL_ACCESSORS(buffer, Object) |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11130 } else { | 11137 } else { |
| 11131 value &= ~(1 << bit_position); | 11138 value &= ~(1 << bit_position); |
| 11132 } | 11139 } |
| 11133 return value; | 11140 return value; |
| 11134 } | 11141 } |
| 11135 }; | 11142 }; |
| 11136 | 11143 |
| 11137 } } // namespace v8::internal | 11144 } } // namespace v8::internal |
| 11138 | 11145 |
| 11139 #endif // V8_OBJECTS_H_ | 11146 #endif // V8_OBJECTS_H_ |
| OLD | NEW |