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

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

Issue 12775009: Optimize TypedData operators [] and []= in the same way as ScalarList. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: ARM/MIPS build, comments, rebased Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | 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 4945 matching lines...) Expand 10 before | Expand all | Expand 10 after
4956 TYPED_GETTER_SETTER(Uint32, uint32_t) 4956 TYPED_GETTER_SETTER(Uint32, uint32_t)
4957 TYPED_GETTER_SETTER(Int64, int64_t) 4957 TYPED_GETTER_SETTER(Int64, int64_t)
4958 TYPED_GETTER_SETTER(Uint64, uint64_t) 4958 TYPED_GETTER_SETTER(Uint64, uint64_t)
4959 TYPED_GETTER_SETTER(Float32, float) 4959 TYPED_GETTER_SETTER(Float32, float)
4960 TYPED_GETTER_SETTER(Float64, double) 4960 TYPED_GETTER_SETTER(Float64, double)
4961 4961
4962 static intptr_t length_offset() { 4962 static intptr_t length_offset() {
4963 return OFFSET_OF(RawTypedData, length_); 4963 return OFFSET_OF(RawTypedData, length_);
4964 } 4964 }
4965 4965
4966 static intptr_t data_offset() {
4967 return OFFSET_OF(RawTypedData, data_);
4968 }
4969
4966 static intptr_t InstanceSize() { 4970 static intptr_t InstanceSize() {
4967 ASSERT(sizeof(RawTypedData) == OFFSET_OF(RawTypedData, data_)); 4971 ASSERT(sizeof(RawTypedData) == OFFSET_OF(RawTypedData, data_));
4968 return 0; 4972 return 0;
4969 } 4973 }
4970 4974
4971 static intptr_t InstanceSize(intptr_t lengthInBytes) { 4975 static intptr_t InstanceSize(intptr_t lengthInBytes) {
4972 ASSERT(0 <= lengthInBytes && lengthInBytes <= kSmiMax); 4976 ASSERT(0 <= lengthInBytes && lengthInBytes <= kSmiMax);
4973 return RoundedAllocationSize(sizeof(RawTypedData) + lengthInBytes); 4977 return RoundedAllocationSize(sizeof(RawTypedData) + lengthInBytes);
4974 } 4978 }
4975 4979
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after
6829 6833
6830 6834
6831 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6835 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6832 intptr_t index) { 6836 intptr_t index) {
6833 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6837 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6834 } 6838 }
6835 6839
6836 } // namespace dart 6840 } // namespace dart
6837 6841
6838 #endif // VM_OBJECT_H_ 6842 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698