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

Side by Side Diff: runtime/vm/object.h

Issue 1157003003: Add TypedData instance kinds. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | « runtime/vm/json_stream.cc ('k') | runtime/vm/object.cc » ('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 (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_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 6785 matching lines...) Expand 10 before | Expand all | Expand 10 after
6796 intptr_t Length() const { 6796 intptr_t Length() const {
6797 ASSERT(!IsNull()); 6797 ASSERT(!IsNull());
6798 return Smi::Value(raw_ptr()->length_); 6798 return Smi::Value(raw_ptr()->length_);
6799 } 6799 }
6800 6800
6801 intptr_t ElementSizeInBytes() const { 6801 intptr_t ElementSizeInBytes() const {
6802 intptr_t cid = raw()->GetClassId(); 6802 intptr_t cid = raw()->GetClassId();
6803 return ElementSizeInBytes(cid); 6803 return ElementSizeInBytes(cid);
6804 } 6804 }
6805 6805
6806
6807 TypedDataElementType ElementType() const { 6806 TypedDataElementType ElementType() const {
6808 intptr_t cid = raw()->GetClassId(); 6807 intptr_t cid = raw()->GetClassId();
6809 return ElementType(cid); 6808 return ElementType(cid);
6810 } 6809 }
6811 6810
6812 intptr_t LengthInBytes() const { 6811 intptr_t LengthInBytes() const {
6813 intptr_t cid = raw()->GetClassId(); 6812 intptr_t cid = raw()->GetClassId();
6814 return (ElementSizeInBytes(cid) * Length()); 6813 return (ElementSizeInBytes(cid) * Length());
6815 } 6814 }
6816 6815
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
7854 7853
7855 7854
7856 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7855 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7857 intptr_t index) { 7856 intptr_t index) {
7858 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7857 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7859 } 7858 }
7860 7859
7861 } // namespace dart 7860 } // namespace dart
7862 7861
7863 #endif // VM_OBJECT_H_ 7862 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/json_stream.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698