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

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

Issue 1222863003: Make frequent type checks (instanceof) faster by adding dedicated instanceof methods; improves dart… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: flag Created 5 years, 5 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/flow_graph_optimizer.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 5021 matching lines...) Expand 10 before | Expand all | Expand 10 after
5032 5032
5033 // Check if this type represents the 'Float64x2' type. 5033 // Check if this type represents the 'Float64x2' type.
5034 bool IsFloat64x2Type() const; 5034 bool IsFloat64x2Type() const;
5035 5035
5036 // Check if this type represents the 'Int32x4' type. 5036 // Check if this type represents the 'Int32x4' type.
5037 bool IsInt32x4Type() const; 5037 bool IsInt32x4Type() const;
5038 5038
5039 // Check if this type represents the 'num' type. 5039 // Check if this type represents the 'num' type.
5040 bool IsNumberType() const; 5040 bool IsNumberType() const;
5041 5041
5042 // Check if this type represents the '_Smi' type.
5043 bool IsSmiType() const;
5044
5042 // Check if this type represents the 'String' type. 5045 // Check if this type represents the 'String' type.
5043 bool IsStringType() const; 5046 bool IsStringType() const;
5044 5047
5045 // Check if this type represents the 'Function' type. 5048 // Check if this type represents the 'Function' type.
5046 bool IsFunctionType() const; 5049 bool IsFunctionType() const;
5047 5050
5048 // Check the subtype relationship. 5051 // Check the subtype relationship.
5049 bool IsSubtypeOf(const AbstractType& other, Error* bound_error) const { 5052 bool IsSubtypeOf(const AbstractType& other, Error* bound_error) const {
5050 return TypeTest(kIsSubtypeOf, other, bound_error); 5053 return TypeTest(kIsSubtypeOf, other, bound_error);
5051 } 5054 }
(...skipping 2940 matching lines...) Expand 10 before | Expand all | Expand 10 after
7992 7995
7993 7996
7994 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 7997 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
7995 intptr_t index) { 7998 intptr_t index) {
7996 return array.At((index * kEntryLength) + kTargetFunctionIndex); 7999 return array.At((index * kEntryLength) + kTargetFunctionIndex);
7997 } 8000 }
7998 8001
7999 } // namespace dart 8002 } // namespace dart
8000 8003
8001 #endif // VM_OBJECT_H_ 8004 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698