| 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 13619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13630 return TypedData::ElementSizeInBytes(cid); | 13630 return TypedData::ElementSizeInBytes(cid); |
| 13631 } | 13631 } |
| 13632 switch (cid) { | 13632 switch (cid) { |
| 13633 case kArrayCid: | 13633 case kArrayCid: |
| 13634 case kImmutableArrayCid: | 13634 case kImmutableArrayCid: |
| 13635 return Array::kBytesPerElement; | 13635 return Array::kBytesPerElement; |
| 13636 case kOneByteStringCid: | 13636 case kOneByteStringCid: |
| 13637 return OneByteString::kBytesPerElement; | 13637 return OneByteString::kBytesPerElement; |
| 13638 case kTwoByteStringCid: | 13638 case kTwoByteStringCid: |
| 13639 return TwoByteString::kBytesPerElement; | 13639 return TwoByteString::kBytesPerElement; |
| 13640 case kExternalOneByteStringCid: |
| 13641 return ExternalOneByteString::kBytesPerElement; |
| 13642 case kExternalTwoByteStringCid: |
| 13643 return ExternalTwoByteString::kBytesPerElement; |
| 13640 default: | 13644 default: |
| 13641 UNIMPLEMENTED(); | 13645 UNIMPLEMENTED(); |
| 13642 return 0; | 13646 return 0; |
| 13643 } | 13647 } |
| 13644 } | 13648 } |
| 13645 | 13649 |
| 13646 | 13650 |
| 13647 intptr_t Instance::DataOffsetFor(intptr_t cid) { | 13651 intptr_t Instance::DataOffsetFor(intptr_t cid) { |
| 13648 if (RawObject::IsExternalTypedDataClassId(cid)) { | 13652 if (RawObject::IsExternalTypedDataClassId(cid)) { |
| 13649 // Elements start at offset 0 of the external data. | 13653 // Elements start at offset 0 of the external data. |
| (...skipping 6806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20456 return tag_label.ToCString(); | 20460 return tag_label.ToCString(); |
| 20457 } | 20461 } |
| 20458 | 20462 |
| 20459 | 20463 |
| 20460 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { | 20464 void UserTag::PrintJSONImpl(JSONStream* stream, bool ref) const { |
| 20461 Instance::PrintJSONImpl(stream, ref); | 20465 Instance::PrintJSONImpl(stream, ref); |
| 20462 } | 20466 } |
| 20463 | 20467 |
| 20464 | 20468 |
| 20465 } // namespace dart | 20469 } // namespace dart |
| OLD | NEW |