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

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

Issue 150923002: Mark optimized code that used CHA for optimization so that lazy class 'finalization' does not inval… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 intptr_t token_pos); 1067 intptr_t token_pos);
1068 1068
1069 // Patch the signature function of a signature class allocated without it. 1069 // Patch the signature function of a signature class allocated without it.
1070 void PatchSignatureFunction(const Function& signature_function) const; 1070 void PatchSignatureFunction(const Function& signature_function) const;
1071 1071
1072 // Return a class object corresponding to the specified kind. If 1072 // Return a class object corresponding to the specified kind. If
1073 // a canonicalized version of it exists then that object is returned 1073 // a canonicalized version of it exists then that object is returned
1074 // otherwise a new object is allocated and returned. 1074 // otherwise a new object is allocated and returned.
1075 static RawClass* GetClass(intptr_t class_id, bool is_signature_class); 1075 static RawClass* GetClass(intptr_t class_id, bool is_signature_class);
1076 1076
1077 // Register code that has used CHA for optimization.
1078 // TODO(srdjan): Also register kind of CHA optimization (e.g.: leaf class,
1079 // leaf method, ...).
1080 void RegisterCHACode(const Code& code);
1081
1082 void DisableCHAOptimizedCode();
1083
1084 RawArray* cha_codes() const { return raw_ptr()->cha_codes_; }
1085 void set_cha_codes(const Array& value) const;
1086
1077 private: 1087 private:
1078 enum { 1088 enum {
1079 kAny = 0, 1089 kAny = 0,
1080 kStatic, 1090 kStatic,
1081 kInstance, 1091 kInstance,
1082 kConstructor, 1092 kConstructor,
1083 kFactory, 1093 kFactory,
1084 }; 1094 };
1085 enum { 1095 enum {
1086 kConstBit = 0, 1096 kConstBit = 0,
(...skipping 5578 matching lines...) Expand 10 before | Expand all | Expand 10 after
6665 6675
6666 6676
6667 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 6677 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
6668 intptr_t index) { 6678 intptr_t index) {
6669 return array.At((index * kEntryLength) + kTargetFunctionIndex); 6679 return array.At((index * kEntryLength) + kTargetFunctionIndex);
6670 } 6680 }
6671 6681
6672 } // namespace dart 6682 } // namespace dart
6673 6683
6674 #endif // VM_OBJECT_H_ 6684 #endif // VM_OBJECT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698