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 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1306 | 1306 |
1307 void DisableAllocationStub() const; | 1307 void DisableAllocationStub() const; |
1308 | 1308 |
1309 RawArray* constants() const; | 1309 RawArray* constants() const; |
1310 | 1310 |
1311 intptr_t FindInvocationDispatcherFunctionIndex(const Function& needle) const; | 1311 intptr_t FindInvocationDispatcherFunctionIndex(const Function& needle) const; |
1312 RawFunction* InvocationDispatcherFunctionFromIndex(intptr_t idx) const; | 1312 RawFunction* InvocationDispatcherFunctionFromIndex(intptr_t idx) const; |
1313 | 1313 |
1314 RawFunction* GetInvocationDispatcher(const String& target_name, | 1314 RawFunction* GetInvocationDispatcher(const String& target_name, |
1315 const Array& args_desc, | 1315 const Array& args_desc, |
1316 RawFunction::Kind kind) const; | 1316 RawFunction::Kind kind, |
| 1317 bool create_if_absent) const; |
1317 | 1318 |
1318 void Finalize() const; | 1319 void Finalize() const; |
1319 | 1320 |
1320 // Apply given patch class to this class. | 1321 // Apply given patch class to this class. |
1321 // Return true on success, or false and error otherwise. | 1322 // Return true on success, or false and error otherwise. |
1322 bool ApplyPatch(const Class& patch, Error* error) const; | 1323 bool ApplyPatch(const Class& patch, Error* error) const; |
1323 | 1324 |
1324 // Evaluate the given expression as if it appeared in a static | 1325 // Evaluate the given expression as if it appeared in a static |
1325 // method of this class and return the resulting value, or an | 1326 // method of this class and return the resulting value, or an |
1326 // error object if evaluating the expression fails. The method has | 1327 // error object if evaluating the expression fails. The method has |
(...skipping 6786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8113 | 8114 |
8114 | 8115 |
8115 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8116 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8116 intptr_t index) { | 8117 intptr_t index) { |
8117 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8118 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8118 } | 8119 } |
8119 | 8120 |
8120 } // namespace dart | 8121 } // namespace dart |
8121 | 8122 |
8122 #endif // VM_OBJECT_H_ | 8123 #endif // VM_OBJECT_H_ |
OLD | NEW |