| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
| 6 #define VM_RAW_OBJECT_H_ | 6 #define VM_RAW_OBJECT_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 #define DEFINE_OBJECT_KIND(clazz) \ | 107 #define DEFINE_OBJECT_KIND(clazz) \ |
| 108 k##clazz, | 108 k##clazz, |
| 109 CLASS_LIST(DEFINE_OBJECT_KIND) | 109 CLASS_LIST(DEFINE_OBJECT_KIND) |
| 110 #undef DEFINE_OBJECT_KIND | 110 #undef DEFINE_OBJECT_KIND |
| 111 // The following entry does not describe a real object, but instead it | 111 // The following entry does not describe a real object, but instead it |
| 112 // identifies free list elements in the heap. | 112 // identifies free list elements in the heap. |
| 113 kFreeListElement, | 113 kFreeListElement, |
| 114 // The following entries do not describe a real object, but instead are used | 114 // The following entries do not describe a real object, but instead are used |
| 115 // to allocate class indexes for pre-allocated instance classes such as the | 115 // to allocate class indexes for pre-allocated instance classes such as the |
| 116 // Null, Void, Dynamic and other similar classes. | 116 // Null, Void, Dynamic and other similar classes. |
| 117 kNullClassIndex, | 117 kNullClassId, |
| 118 kDynamicClassIndex, | 118 kDynamicClassId, |
| 119 kVoidClassIndex, | 119 kVoidClassId, |
| 120 kNumPredefinedKinds = 100 | 120 kNumPredefinedKinds = 100 |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 enum ObjectAlignment { | 123 enum ObjectAlignment { |
| 124 // Alignment offsets are used to determine object age. | 124 // Alignment offsets are used to determine object age. |
| 125 kNewObjectAlignmentOffset = kWordSize, | 125 kNewObjectAlignmentOffset = kWordSize, |
| 126 kOldObjectAlignmentOffset = 0, | 126 kOldObjectAlignmentOffset = 0, |
| 127 // Object sizes are aligned to kObjectAlignment. | 127 // Object sizes are aligned to kObjectAlignment. |
| 128 kObjectAlignment = 2 * kWordSize, | 128 kObjectAlignment = 2 * kWordSize, |
| 129 kObjectAlignmentLog2 = kWordSizeLog2 + 1, | 129 kObjectAlignmentLog2 = kWordSizeLog2 + 1, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 kFreeBit = 0, | 178 kFreeBit = 0, |
| 179 kMarkBit = 1, | 179 kMarkBit = 1, |
| 180 kCanonicalBit = 2, | 180 kCanonicalBit = 2, |
| 181 kFromSnapshotBit = 3, | 181 kFromSnapshotBit = 3, |
| 182 kReservedBit10K = 4, | 182 kReservedBit10K = 4, |
| 183 kReservedBit100K = 5, | 183 kReservedBit100K = 5, |
| 184 kReservedBit1M = 6, | 184 kReservedBit1M = 6, |
| 185 kReservedBit10M = 7, | 185 kReservedBit10M = 7, |
| 186 kSizeTagBit = 8, | 186 kSizeTagBit = 8, |
| 187 kSizeTagSize = 8, | 187 kSizeTagSize = 8, |
| 188 kClassTagBit = kSizeTagBit + kSizeTagSize, | 188 kClassIdTagBit = kSizeTagBit + kSizeTagSize, |
| 189 kClassTagSize = 16 | 189 kClassIdTagSize = 16 |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 // Encodes the object size in the tag in units of object alignment. | 192 // Encodes the object size in the tag in units of object alignment. |
| 193 class SizeTag { | 193 class SizeTag { |
| 194 public: | 194 public: |
| 195 static const intptr_t kMaxSizeTag = | 195 static const intptr_t kMaxSizeTag = |
| 196 ((1 << RawObject::kSizeTagSize) - 1) << kObjectAlignmentLog2; | 196 ((1 << RawObject::kSizeTagSize) - 1) << kObjectAlignmentLog2; |
| 197 | 197 |
| 198 static uword encode(intptr_t size) { | 198 static uword encode(intptr_t size) { |
| 199 return SizeBits::encode(SizeToTagValue(size)); | 199 return SizeBits::encode(SizeToTagValue(size)); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 213 | 213 |
| 214 static intptr_t SizeToTagValue(intptr_t size) { | 214 static intptr_t SizeToTagValue(intptr_t size) { |
| 215 ASSERT(Utils::IsAligned(size, kObjectAlignment)); | 215 ASSERT(Utils::IsAligned(size, kObjectAlignment)); |
| 216 return (size > kMaxSizeTag) ? 0 : (size >> kObjectAlignmentLog2); | 216 return (size > kMaxSizeTag) ? 0 : (size >> kObjectAlignmentLog2); |
| 217 } | 217 } |
| 218 static intptr_t TagValueToSize(intptr_t value) { | 218 static intptr_t TagValueToSize(intptr_t value) { |
| 219 return value << kObjectAlignmentLog2; | 219 return value << kObjectAlignmentLog2; |
| 220 } | 220 } |
| 221 }; | 221 }; |
| 222 | 222 |
| 223 class ClassTag : public BitField<intptr_t, kClassTagBit, kClassTagSize> {}; | 223 class ClassIdTag : public BitField<intptr_t, |
| 224 kClassIdTagBit, |
| 225 kClassIdTagSize> {}; // NOLINT |
| 224 | 226 |
| 225 bool IsHeapObject() const { | 227 bool IsHeapObject() const { |
| 226 uword value = reinterpret_cast<uword>(this); | 228 uword value = reinterpret_cast<uword>(this); |
| 227 return (value & kSmiTagMask) == kHeapObjectTag; | 229 return (value & kSmiTagMask) == kHeapObjectTag; |
| 228 } | 230 } |
| 229 | 231 |
| 230 bool IsNewObject() const { | 232 bool IsNewObject() const { |
| 231 uword addr = reinterpret_cast<uword>(this); | 233 uword addr = reinterpret_cast<uword>(this); |
| 232 return (addr & kNewObjectAlignmentOffset) == kNewObjectAlignmentOffset; | 234 return (addr & kNewObjectAlignmentOffset) == kNewObjectAlignmentOffset; |
| 233 } | 235 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 | 297 |
| 296 static bool IsCreatedFromSnapshot(intptr_t value) { | 298 static bool IsCreatedFromSnapshot(intptr_t value) { |
| 297 return CreatedFromSnapshotTag::decode(value); | 299 return CreatedFromSnapshotTag::decode(value); |
| 298 } | 300 } |
| 299 | 301 |
| 300 static bool IsCanonical(intptr_t value) { | 302 static bool IsCanonical(intptr_t value) { |
| 301 return CanonicalObjectTag::decode(value); | 303 return CanonicalObjectTag::decode(value); |
| 302 } | 304 } |
| 303 | 305 |
| 304 // ObjectKind predicates. | 306 // ObjectKind predicates. |
| 305 static bool IsErrorClassIndex(intptr_t index); | 307 static bool IsErrorClassId(intptr_t index); |
| 306 static bool IsNumberClassIndex(intptr_t index); | 308 static bool IsNumberClassId(intptr_t index); |
| 307 static bool IsIntegerClassIndex(intptr_t index); | 309 static bool IsIntegerClassId(intptr_t index); |
| 308 static bool IsStringClassIndex(intptr_t index); | 310 static bool IsStringClassId(intptr_t index); |
| 309 static bool IsOneByteStringClassIndex(intptr_t index); | 311 static bool IsOneByteStringClassId(intptr_t index); |
| 310 static bool IsTwoByteStringClassIndex(intptr_t index); | 312 static bool IsTwoByteStringClassId(intptr_t index); |
| 311 static bool IsExternalStringClassIndex(intptr_t index); | 313 static bool IsExternalStringClassId(intptr_t index); |
| 312 static bool IsBuiltinListClassIndex(intptr_t index); | 314 static bool IsBuiltinListClassId(intptr_t index); |
| 313 static bool IsByteArrayClassIndex(intptr_t index); | 315 static bool IsByteArrayClassId(intptr_t index); |
| 314 | 316 |
| 315 protected: | 317 protected: |
| 316 RawClass* class_; | 318 RawClass* class_; |
| 317 uword tags_; // Various object tags (bits). | 319 uword tags_; // Various object tags (bits). |
| 318 | 320 |
| 319 private: | 321 private: |
| 320 class FreeBit : public BitField<bool, kFreeBit, 1> {}; | 322 class FreeBit : public BitField<bool, kFreeBit, 1> {}; |
| 321 | 323 |
| 322 class MarkBit : public BitField<bool, kMarkBit, 1> {}; | 324 class MarkBit : public BitField<bool, kMarkBit, 1> {}; |
| 323 | 325 |
| 324 class CanonicalObjectTag : public BitField<bool, kCanonicalBit, 1> {}; | 326 class CanonicalObjectTag : public BitField<bool, kCanonicalBit, 1> {}; |
| 325 | 327 |
| 326 class CreatedFromSnapshotTag : public BitField<bool, kFromSnapshotBit, 1> {}; | 328 class CreatedFromSnapshotTag : public BitField<bool, kFromSnapshotBit, 1> {}; |
| 327 | 329 |
| 328 RawObject* ptr() const { | 330 RawObject* ptr() const { |
| 329 ASSERT(IsHeapObject()); | 331 ASSERT(IsHeapObject()); |
| 330 return reinterpret_cast<RawObject*>( | 332 return reinterpret_cast<RawObject*>( |
| 331 reinterpret_cast<uword>(this) - kHeapObjectTag); | 333 reinterpret_cast<uword>(this) - kHeapObjectTag); |
| 332 } | 334 } |
| 333 | 335 |
| 334 intptr_t SizeFromClass() const; | 336 intptr_t SizeFromClass() const; |
| 335 | 337 |
| 336 intptr_t GetClassIndex() const { | 338 intptr_t GetClassId() const { |
| 337 uword tags = ptr()->tags_; | 339 uword tags = ptr()->tags_; |
| 338 return ClassTag::decode(tags); | 340 return ClassIdTag::decode(tags); |
| 339 } | 341 } |
| 340 | 342 |
| 341 friend class Api; | 343 friend class Api; |
| 342 friend class Array; | 344 friend class Array; |
| 343 friend class Heap; | 345 friend class Heap; |
| 344 friend class MarkingVisitor; | 346 friend class MarkingVisitor; |
| 345 friend class Object; | 347 friend class Object; |
| 346 friend class RawInstructions; | 348 friend class RawInstructions; |
| 347 friend class SnapshotReader; | 349 friend class SnapshotReader; |
| 348 friend class SnapshotWriter; | 350 friend class SnapshotWriter; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 RawArray* constants_; // Canonicalized values of this class. | 382 RawArray* constants_; // Canonicalized values of this class. |
| 381 RawArray* canonical_types_; // Canonicalized types of this class. | 383 RawArray* canonical_types_; // Canonicalized types of this class. |
| 382 RawCode* allocation_stub_; // Stub code for allocation of instances. | 384 RawCode* allocation_stub_; // Stub code for allocation of instances. |
| 383 RawObject** to() { | 385 RawObject** to() { |
| 384 return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_); | 386 return reinterpret_cast<RawObject**>(&ptr()->allocation_stub_); |
| 385 } | 387 } |
| 386 | 388 |
| 387 cpp_vtable handle_vtable_; | 389 cpp_vtable handle_vtable_; |
| 388 intptr_t instance_size_; | 390 intptr_t instance_size_; |
| 389 ObjectKind instance_kind_; | 391 ObjectKind instance_kind_; |
| 390 intptr_t index_; // Index in the class table. | 392 intptr_t id_; // Class Id, also index in the class table. |
| 391 intptr_t type_arguments_instance_field_offset_; // May be kNoTypeArguments. | 393 intptr_t type_arguments_instance_field_offset_; // May be kNoTypeArguments. |
| 392 intptr_t next_field_offset_; // Offset of then next instance field. | 394 intptr_t next_field_offset_; // Offset of then next instance field. |
| 393 intptr_t num_native_fields_; // Number of native fields in class. | 395 intptr_t num_native_fields_; // Number of native fields in class. |
| 394 intptr_t token_index_; | 396 intptr_t token_index_; |
| 395 int8_t class_state_; // Of type ClassState. | 397 int8_t class_state_; // Of type ClassState. |
| 396 bool is_const_; | 398 bool is_const_; |
| 397 bool is_interface_; | 399 bool is_interface_; |
| 398 | 400 |
| 399 friend class Object; | 401 friend class Object; |
| 400 friend class RawInstance; | 402 friend class RawInstance; |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1374 | 1376 |
| 1375 intptr_t type_; // Uninitialized, simple or complex. | 1377 intptr_t type_; // Uninitialized, simple or complex. |
| 1376 intptr_t flags_; // Represents global/local, case insensitive, multiline. | 1378 intptr_t flags_; // Represents global/local, case insensitive, multiline. |
| 1377 | 1379 |
| 1378 // Variable length data follows here. | 1380 // Variable length data follows here. |
| 1379 uint8_t data_[0]; | 1381 uint8_t data_[0]; |
| 1380 }; | 1382 }; |
| 1381 | 1383 |
| 1382 // ObjectKind predicates. | 1384 // ObjectKind predicates. |
| 1383 | 1385 |
| 1384 inline bool RawObject::IsErrorClassIndex(intptr_t index) { | 1386 inline bool RawObject::IsErrorClassId(intptr_t index) { |
| 1385 // Make sure this function is updated when new Error types are added. | 1387 // Make sure this function is updated when new Error types are added. |
| 1386 ASSERT(kApiError == kError + 1 && | 1388 ASSERT(kApiError == kError + 1 && |
| 1387 kLanguageError == kError + 2 && | 1389 kLanguageError == kError + 2 && |
| 1388 kUnhandledException == kError + 3 && | 1390 kUnhandledException == kError + 3 && |
| 1389 kUnwindError == kError + 4 && | 1391 kUnwindError == kError + 4 && |
| 1390 kInstance == kError + 5); | 1392 kInstance == kError + 5); |
| 1391 return (index >= kError && index < kInstance); | 1393 return (index >= kError && index < kInstance); |
| 1392 } | 1394 } |
| 1393 | 1395 |
| 1394 inline bool RawObject::IsNumberClassIndex(intptr_t index) { | 1396 inline bool RawObject::IsNumberClassId(intptr_t index) { |
| 1395 // Make sure this function is updated when new Number types are added. | 1397 // Make sure this function is updated when new Number types are added. |
| 1396 ASSERT(kInteger == kNumber + 1 && | 1398 ASSERT(kInteger == kNumber + 1 && |
| 1397 kSmi == kNumber + 2 && | 1399 kSmi == kNumber + 2 && |
| 1398 kMint == kNumber + 3 && | 1400 kMint == kNumber + 3 && |
| 1399 kBigint == kNumber + 4 && | 1401 kBigint == kNumber + 4 && |
| 1400 kDouble == kNumber + 5 && | 1402 kDouble == kNumber + 5 && |
| 1401 kString == kNumber + 6); | 1403 kString == kNumber + 6); |
| 1402 return (index >= kNumber && index < kString); | 1404 return (index >= kNumber && index < kString); |
| 1403 } | 1405 } |
| 1404 | 1406 |
| 1405 inline bool RawObject::IsIntegerClassIndex(intptr_t index) { | 1407 inline bool RawObject::IsIntegerClassId(intptr_t index) { |
| 1406 // Make sure this function is updated when new Integer types are added. | 1408 // Make sure this function is updated when new Integer types are added. |
| 1407 ASSERT(kSmi == kInteger + 1 && | 1409 ASSERT(kSmi == kInteger + 1 && |
| 1408 kMint == kInteger + 2 && | 1410 kMint == kInteger + 2 && |
| 1409 kBigint == kInteger + 3 && | 1411 kBigint == kInteger + 3 && |
| 1410 kDouble == kInteger + 4); | 1412 kDouble == kInteger + 4); |
| 1411 return (index >= kInteger && index < kDouble); | 1413 return (index >= kInteger && index < kDouble); |
| 1412 } | 1414 } |
| 1413 | 1415 |
| 1414 inline bool RawObject::IsStringClassIndex(intptr_t index) { | 1416 inline bool RawObject::IsStringClassId(intptr_t index) { |
| 1415 // Make sure this function is updated when new String types are added. | 1417 // Make sure this function is updated when new String types are added. |
| 1416 ASSERT(kOneByteString == kString + 1 && | 1418 ASSERT(kOneByteString == kString + 1 && |
| 1417 kTwoByteString == kString + 2 && | 1419 kTwoByteString == kString + 2 && |
| 1418 kFourByteString == kString + 3 && | 1420 kFourByteString == kString + 3 && |
| 1419 kExternalOneByteString == kString + 4 && | 1421 kExternalOneByteString == kString + 4 && |
| 1420 kExternalTwoByteString == kString + 5 && | 1422 kExternalTwoByteString == kString + 5 && |
| 1421 kExternalFourByteString == kString + 6 && | 1423 kExternalFourByteString == kString + 6 && |
| 1422 kBool == kString + 7); | 1424 kBool == kString + 7); |
| 1423 return (index >= kString && index < kBool); | 1425 return (index >= kString && index < kBool); |
| 1424 } | 1426 } |
| 1425 | 1427 |
| 1426 inline bool RawObject::IsOneByteStringClassIndex(intptr_t index) { | 1428 inline bool RawObject::IsOneByteStringClassId(intptr_t index) { |
| 1427 // Make sure this function is updated when new String types are added. | 1429 // Make sure this function is updated when new String types are added. |
| 1428 ASSERT(kOneByteString == kString + 1 && | 1430 ASSERT(kOneByteString == kString + 1 && |
| 1429 kTwoByteString == kString + 2 && | 1431 kTwoByteString == kString + 2 && |
| 1430 kFourByteString == kString + 3 && | 1432 kFourByteString == kString + 3 && |
| 1431 kExternalOneByteString == kString + 4 && | 1433 kExternalOneByteString == kString + 4 && |
| 1432 kExternalTwoByteString == kString + 5 && | 1434 kExternalTwoByteString == kString + 5 && |
| 1433 kExternalFourByteString == kString + 6 && | 1435 kExternalFourByteString == kString + 6 && |
| 1434 kBool == kString + 7); | 1436 kBool == kString + 7); |
| 1435 return (index == kOneByteString || | 1437 return (index == kOneByteString || |
| 1436 index == kExternalOneByteString); | 1438 index == kExternalOneByteString); |
| 1437 } | 1439 } |
| 1438 | 1440 |
| 1439 inline bool RawObject::IsTwoByteStringClassIndex(intptr_t index) { | 1441 inline bool RawObject::IsTwoByteStringClassId(intptr_t index) { |
| 1440 // Make sure this function is updated when new String types are added. | 1442 // Make sure this function is updated when new String types are added. |
| 1441 ASSERT(kOneByteString == kString + 1 && | 1443 ASSERT(kOneByteString == kString + 1 && |
| 1442 kTwoByteString == kString + 2 && | 1444 kTwoByteString == kString + 2 && |
| 1443 kFourByteString == kString + 3 && | 1445 kFourByteString == kString + 3 && |
| 1444 kExternalOneByteString == kString + 4 && | 1446 kExternalOneByteString == kString + 4 && |
| 1445 kExternalTwoByteString == kString + 5 && | 1447 kExternalTwoByteString == kString + 5 && |
| 1446 kExternalFourByteString == kString + 6 && | 1448 kExternalFourByteString == kString + 6 && |
| 1447 kBool == kString + 7); | 1449 kBool == kString + 7); |
| 1448 return (index == kOneByteString || | 1450 return (index == kOneByteString || |
| 1449 index == kTwoByteString || | 1451 index == kTwoByteString || |
| 1450 index == kExternalOneByteString || | 1452 index == kExternalOneByteString || |
| 1451 index == kExternalTwoByteString); | 1453 index == kExternalTwoByteString); |
| 1452 } | 1454 } |
| 1453 | 1455 |
| 1454 inline bool RawObject::IsExternalStringClassIndex(intptr_t index) { | 1456 inline bool RawObject::IsExternalStringClassId(intptr_t index) { |
| 1455 // Make sure this function is updated when new String types are added. | 1457 // Make sure this function is updated when new String types are added. |
| 1456 ASSERT(kOneByteString == kString + 1 && | 1458 ASSERT(kOneByteString == kString + 1 && |
| 1457 kTwoByteString == kString + 2 && | 1459 kTwoByteString == kString + 2 && |
| 1458 kFourByteString == kString + 3 && | 1460 kFourByteString == kString + 3 && |
| 1459 kExternalOneByteString == kString + 4 && | 1461 kExternalOneByteString == kString + 4 && |
| 1460 kExternalTwoByteString == kString + 5 && | 1462 kExternalTwoByteString == kString + 5 && |
| 1461 kExternalFourByteString == kString + 6 && | 1463 kExternalFourByteString == kString + 6 && |
| 1462 kBool == kString + 7); | 1464 kBool == kString + 7); |
| 1463 return (index == kExternalOneByteString || | 1465 return (index == kExternalOneByteString || |
| 1464 index == kExternalTwoByteString || | 1466 index == kExternalTwoByteString || |
| 1465 index == kExternalFourByteString); | 1467 index == kExternalFourByteString); |
| 1466 } | 1468 } |
| 1467 | 1469 |
| 1468 inline bool RawObject::IsBuiltinListClassIndex(intptr_t index) { | 1470 inline bool RawObject::IsBuiltinListClassId(intptr_t index) { |
| 1469 // Make sure this function is updated when new builtin List types are added. | 1471 // Make sure this function is updated when new builtin List types are added. |
| 1470 ASSERT(kImmutableArray == kArray + 1 && | 1472 ASSERT(kImmutableArray == kArray + 1 && |
| 1471 kGrowableObjectArray == kArray + 2 && | 1473 kGrowableObjectArray == kArray + 2 && |
| 1472 kByteArray == kArray + 3); | 1474 kByteArray == kArray + 3); |
| 1473 return (index >= kArray && index < kByteArray); | 1475 return (index >= kArray && index < kByteArray); |
| 1474 } | 1476 } |
| 1475 | 1477 |
| 1476 inline bool RawObject::IsByteArrayClassIndex(intptr_t index) { | 1478 inline bool RawObject::IsByteArrayClassId(intptr_t index) { |
| 1477 // Make sure this function is updated when new ByteArray types are added. | 1479 // Make sure this function is updated when new ByteArray types are added. |
| 1478 ASSERT(kInt8Array == kByteArray + 1 && | 1480 ASSERT(kInt8Array == kByteArray + 1 && |
| 1479 kUint8Array == kByteArray + 2 && | 1481 kUint8Array == kByteArray + 2 && |
| 1480 kInt16Array == kByteArray + 3 && | 1482 kInt16Array == kByteArray + 3 && |
| 1481 kUint16Array == kByteArray + 4 && | 1483 kUint16Array == kByteArray + 4 && |
| 1482 kInt32Array == kByteArray + 5 && | 1484 kInt32Array == kByteArray + 5 && |
| 1483 kUint32Array == kByteArray + 6 && | 1485 kUint32Array == kByteArray + 6 && |
| 1484 kInt64Array == kByteArray + 7 && | 1486 kInt64Array == kByteArray + 7 && |
| 1485 kUint64Array == kByteArray + 8 && | 1487 kUint64Array == kByteArray + 8 && |
| 1486 kFloat32Array == kByteArray + 9 && | 1488 kFloat32Array == kByteArray + 9 && |
| 1487 kFloat64Array == kByteArray + 10 && | 1489 kFloat64Array == kByteArray + 10 && |
| 1488 kExternalInt8Array == kByteArray + 11 && | 1490 kExternalInt8Array == kByteArray + 11 && |
| 1489 kExternalUint8Array == kByteArray + 12 && | 1491 kExternalUint8Array == kByteArray + 12 && |
| 1490 kExternalInt16Array == kByteArray + 13 && | 1492 kExternalInt16Array == kByteArray + 13 && |
| 1491 kExternalUint16Array == kByteArray + 14 && | 1493 kExternalUint16Array == kByteArray + 14 && |
| 1492 kExternalInt32Array == kByteArray + 15 && | 1494 kExternalInt32Array == kByteArray + 15 && |
| 1493 kExternalUint32Array == kByteArray + 16 && | 1495 kExternalUint32Array == kByteArray + 16 && |
| 1494 kExternalInt64Array == kByteArray + 17 && | 1496 kExternalInt64Array == kByteArray + 17 && |
| 1495 kExternalUint64Array == kByteArray + 18 && | 1497 kExternalUint64Array == kByteArray + 18 && |
| 1496 kExternalFloat32Array == kByteArray + 19 && | 1498 kExternalFloat32Array == kByteArray + 19 && |
| 1497 kExternalFloat64Array == kByteArray + 20 && | 1499 kExternalFloat64Array == kByteArray + 20 && |
| 1498 kClosure == kByteArray + 21); | 1500 kClosure == kByteArray + 21); |
| 1499 return (index >= kByteArray && index <= kClosure); | 1501 return (index >= kByteArray && index <= kClosure); |
| 1500 } | 1502 } |
| 1501 | 1503 |
| 1502 } // namespace dart | 1504 } // namespace dart |
| 1503 | 1505 |
| 1504 #endif // VM_RAW_OBJECT_H_ | 1506 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |