| OLD | NEW |
| 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 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 // class of signature_function. | 1290 // class of signature_function. |
| 1291 // A null signature function may be passed in and patched later. See below. | 1291 // A null signature function may be passed in and patched later. See below. |
| 1292 static RawClass* NewSignatureClass(const String& name, | 1292 static RawClass* NewSignatureClass(const String& name, |
| 1293 const Function& signature_function, | 1293 const Function& signature_function, |
| 1294 const Script& script, | 1294 const Script& script, |
| 1295 intptr_t token_pos); | 1295 intptr_t token_pos); |
| 1296 | 1296 |
| 1297 // Patch the signature function of a signature class allocated without it. | 1297 // Patch the signature function of a signature class allocated without it. |
| 1298 void PatchSignatureFunction(const Function& signature_function) const; | 1298 void PatchSignatureFunction(const Function& signature_function) const; |
| 1299 | 1299 |
| 1300 // Return a class object corresponding to the specified kind. If | |
| 1301 // a canonicalized version of it exists then that object is returned | |
| 1302 // otherwise a new object is allocated and returned. | |
| 1303 static RawClass* GetClass(intptr_t class_id, bool is_signature_class); | |
| 1304 | |
| 1305 // Register code that has used CHA for optimization. | 1300 // Register code that has used CHA for optimization. |
| 1306 // TODO(srdjan): Also register kind of CHA optimization (e.g.: leaf class, | 1301 // TODO(srdjan): Also register kind of CHA optimization (e.g.: leaf class, |
| 1307 // leaf method, ...). | 1302 // leaf method, ...). |
| 1308 void RegisterCHACode(const Code& code); | 1303 void RegisterCHACode(const Code& code); |
| 1309 | 1304 |
| 1310 void DisableCHAOptimizedCode(); | 1305 void DisableCHAOptimizedCode(); |
| 1311 | 1306 |
| 1312 RawArray* cha_codes() const { return raw_ptr()->cha_codes_; } | 1307 RawArray* cha_codes() const { return raw_ptr()->cha_codes_; } |
| 1313 void set_cha_codes(const Array& value) const; | 1308 void set_cha_codes(const Array& value) const; |
| 1314 | 1309 |
| (...skipping 6224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7539 | 7534 |
| 7540 | 7535 |
| 7541 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7536 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7542 intptr_t index) { | 7537 intptr_t index) { |
| 7543 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7538 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7544 } | 7539 } |
| 7545 | 7540 |
| 7546 } // namespace dart | 7541 } // namespace dart |
| 7547 | 7542 |
| 7548 #endif // VM_OBJECT_H_ | 7543 #endif // VM_OBJECT_H_ |
| OLD | NEW |