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

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: fixed x64 build and MethodRecognizer 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
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 4944 matching lines...) Expand 10 before | Expand all | Expand 10 after
4955 TYPED_GETTER_SETTER(Uint32, uint32_t) 4955 TYPED_GETTER_SETTER(Uint32, uint32_t)
4956 TYPED_GETTER_SETTER(Int64, int64_t) 4956 TYPED_GETTER_SETTER(Int64, int64_t)
4957 TYPED_GETTER_SETTER(Uint64, uint64_t) 4957 TYPED_GETTER_SETTER(Uint64, uint64_t)
4958 TYPED_GETTER_SETTER(Float32, float) 4958 TYPED_GETTER_SETTER(Float32, float)
4959 TYPED_GETTER_SETTER(Float64, double) 4959 TYPED_GETTER_SETTER(Float64, double)
4960 4960
4961 static intptr_t length_offset() { 4961 static intptr_t length_offset() {
4962 return OFFSET_OF(RawTypedData, length_); 4962 return OFFSET_OF(RawTypedData, length_);
4963 } 4963 }
4964 4964
4965 static intptr_t data_offset() {
4966 return OFFSET_OF(RawTypedData, data_);
4967 }
4968
4965 static intptr_t InstanceSize() { 4969 static intptr_t InstanceSize() {
4966 ASSERT(sizeof(RawTypedData) == OFFSET_OF(RawTypedData, data_)); 4970 ASSERT(sizeof(RawTypedData) == OFFSET_OF(RawTypedData, data_));
4967 return 0; 4971 return 0;
4968 } 4972 }
4969 4973
4970 static intptr_t InstanceSize(intptr_t lengthInBytes) { 4974 static intptr_t InstanceSize(intptr_t lengthInBytes) {
4971 ASSERT(0 <= lengthInBytes && lengthInBytes <= kSmiMax); 4975 ASSERT(0 <= lengthInBytes && lengthInBytes <= kSmiMax);
4972 return RoundedAllocationSize(sizeof(RawTypedData) + lengthInBytes); 4976 return RoundedAllocationSize(sizeof(RawTypedData) + lengthInBytes);
4973 } 4977 }
4974 4978
(...skipping 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after
6828 6832
6829 6833
6830 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6834 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6831 intptr_t index) { 6835 intptr_t index) {
6832 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6836 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6833 } 6837 }
6834 6838
6835 } // namespace dart 6839 } // namespace dart
6836 6840
6837 #endif // VM_OBJECT_H_ 6841 #endif // VM_OBJECT_H_
OLDNEW
« runtime/vm/intermediate_language_ia32.cc ('K') | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698