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

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

Issue 58923002: - Avoid deep recursions when executing type tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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 | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')
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 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 // Allocate an instance class which has a VM implementation. 1124 // Allocate an instance class which has a VM implementation.
1125 template <class FakeInstance> static RawClass* New(intptr_t id); 1125 template <class FakeInstance> static RawClass* New(intptr_t id);
1126 1126
1127 // Check the subtype or 'more specific' relationship. 1127 // Check the subtype or 'more specific' relationship.
1128 bool TypeTest(TypeTestKind test_kind, 1128 bool TypeTest(TypeTestKind test_kind,
1129 const AbstractTypeArguments& type_arguments, 1129 const AbstractTypeArguments& type_arguments,
1130 const Class& other, 1130 const Class& other,
1131 const AbstractTypeArguments& other_type_arguments, 1131 const AbstractTypeArguments& other_type_arguments,
1132 Error* bound_error) const; 1132 Error* bound_error) const;
1133 1133
1134 static bool TypeTestNonRecursive(
1135 const Class& cls,
1136 TypeTestKind test_kind,
1137 const AbstractTypeArguments& type_arguments,
1138 const Class& other,
1139 const AbstractTypeArguments& other_type_arguments,
1140 Error* bound_error);
1141
1134 FINAL_HEAP_OBJECT_IMPLEMENTATION(Class, Object); 1142 FINAL_HEAP_OBJECT_IMPLEMENTATION(Class, Object);
1135 friend class AbstractType; 1143 friend class AbstractType;
1136 friend class Instance; 1144 friend class Instance;
1137 friend class Object; 1145 friend class Object;
1138 friend class Type; 1146 friend class Type;
1139 }; 1147 };
1140 1148
1141 1149
1142 // Unresolved class is used for storing unresolved names which will be resolved 1150 // Unresolved class is used for storing unresolved names which will be resolved
1143 // to a class after all classes have been loaded and finalized. 1151 // to a class after all classes have been loaded and finalized.
(...skipping 5229 matching lines...) Expand 10 before | Expand all | Expand 10 after
6373 6381
6374 6382
6375 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6383 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6376 intptr_t index) { 6384 intptr_t index) {
6377 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6385 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6378 } 6386 }
6379 6387
6380 } // namespace dart 6388 } // namespace dart
6381 6389
6382 #endif // VM_OBJECT_H_ 6390 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698