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 #include "vm/object.h" | 5 #include "vm/object.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 15513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15524 case kExternalTwoByteStringCid: | 15524 case kExternalTwoByteStringCid: |
15525 return ExternalTwoByteString::kBytesPerElement; | 15525 return ExternalTwoByteString::kBytesPerElement; |
15526 default: | 15526 default: |
15527 UNIMPLEMENTED(); | 15527 UNIMPLEMENTED(); |
15528 return 0; | 15528 return 0; |
15529 } | 15529 } |
15530 } | 15530 } |
15531 | 15531 |
15532 | 15532 |
15533 intptr_t Instance::DataOffsetFor(intptr_t cid) { | 15533 intptr_t Instance::DataOffsetFor(intptr_t cid) { |
15534 if (RawObject::IsExternalTypedDataClassId(cid)) { | 15534 if (RawObject::IsExternalTypedDataClassId(cid) || |
| 15535 RawObject::IsExternalStringClassId(cid)) { |
15535 // Elements start at offset 0 of the external data. | 15536 // Elements start at offset 0 of the external data. |
15536 return 0; | 15537 return 0; |
15537 } | 15538 } |
15538 if (RawObject::IsTypedDataClassId(cid)) { | 15539 if (RawObject::IsTypedDataClassId(cid)) { |
15539 return TypedData::data_offset(); | 15540 return TypedData::data_offset(); |
15540 } | 15541 } |
15541 switch (cid) { | 15542 switch (cid) { |
15542 case kArrayCid: | 15543 case kArrayCid: |
15543 case kImmutableArrayCid: | 15544 case kImmutableArrayCid: |
15544 return Array::data_offset(); | 15545 return Array::data_offset(); |
(...skipping 6907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
22452 return UserTag::null(); | 22453 return UserTag::null(); |
22453 } | 22454 } |
22454 | 22455 |
22455 | 22456 |
22456 const char* UserTag::ToCString() const { | 22457 const char* UserTag::ToCString() const { |
22457 const String& tag_label = String::Handle(label()); | 22458 const String& tag_label = String::Handle(label()); |
22458 return tag_label.ToCString(); | 22459 return tag_label.ToCString(); |
22459 } | 22460 } |
22460 | 22461 |
22461 } // namespace dart | 22462 } // namespace dart |
OLD | NEW |