| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Class for handling inline cache stubs | 4 // Class for handling inline cache stubs |
| 5 | 5 |
| 6 // The caller of an instance function passes the IC-data array in a specific | 6 // The caller of an instance function passes the IC-data array in a specific |
| 7 // register (ECX on ia32). | 7 // register (ECX on ia32). |
| 8 // That array contains information relevant for the call site: function name and | 8 // That array contains information relevant for the call site: function name and |
| 9 // inline cache data. Class ICData is a wrapper around that array. | 9 // inline cache data. Class ICData is a wrapper around that array. |
| 10 // The array format is: | 10 // The array format is: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 intptr_t NumberOfChecks() const; | 50 intptr_t NumberOfChecks() const; |
| 51 | 51 |
| 52 // Also updates the instance call at 'return_address_'. | 52 // Also updates the instance call at 'return_address_'. |
| 53 void AddCheck(const GrowableArray<const Class*>& classes, | 53 void AddCheck(const GrowableArray<const Class*>& classes, |
| 54 const Function& target); | 54 const Function& target); |
| 55 | 55 |
| 56 void SetCheckAt(intptr_t index, | 56 void SetCheckAt(intptr_t index, |
| 57 const GrowableArray<const Class*>& classes, | 57 const GrowableArray<const Class*>& classes, |
| 58 const Function& target); | 58 const Function& target); |
| 59 | 59 |
| 60 void GetOneClassCheckAt(intptr_t index, Class* cls, Function* target) const; |
| 61 |
| 60 void GetCheckAt(intptr_t index, | 62 void GetCheckAt(intptr_t index, |
| 61 GrowableArray<const Class*>* classes, | 63 GrowableArray<const Class*>* classes, |
| 62 Function* target) const; | 64 Function* target) const; |
| 63 | 65 |
| 64 static const int kNameIndex = 0; | 66 static const int kNameIndex = 0; |
| 65 static const int kNumArgsCheckedIndex = 1; | 67 static const int kNumArgsCheckedIndex = 1; |
| 66 static const int kChecksStartIndex = 2; | 68 static const int kChecksStartIndex = 2; |
| 67 | 69 |
| 68 private: | 70 private: |
| 69 intptr_t ArrayElementsPerCheck() const; | 71 intptr_t ArrayElementsPerCheck() const; |
| 70 | 72 |
| 71 const Array* data_; | 73 const Array* data_; |
| 72 | 74 |
| 73 | 75 |
| 74 DISALLOW_COPY_AND_ASSIGN(ICData); | 76 DISALLOW_COPY_AND_ASSIGN(ICData); |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 } // namespace dart | 79 } // namespace dart |
| 78 | 80 |
| 79 #endif // VM_IC_DATA_H_ | 81 #endif // VM_IC_DATA_H_ |
| OLD | NEW |