| 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 23 matching lines...) Expand all Loading... |
| 34 class RawString; | 34 class RawString; |
| 35 | 35 |
| 36 class ICData : public ValueObject { | 36 class ICData : public ValueObject { |
| 37 public: | 37 public: |
| 38 // Wrap IC data around 'array'. | 38 // Wrap IC data around 'array'. |
| 39 explicit ICData(const Array& array); | 39 explicit ICData(const Array& array); |
| 40 | 40 |
| 41 // Create a new array with zero checks. | 41 // Create a new array with zero checks. |
| 42 ICData(const String& function_name, intptr_t num_args_checked); | 42 ICData(const String& function_name, intptr_t num_args_checked); |
| 43 | 43 |
| 44 void set_data(const Array& data); |
| 44 RawArray* data() const; | 45 RawArray* data() const; |
| 45 | 46 |
| 46 RawString* FunctionName() const; | 47 RawString* FunctionName() const; |
| 47 | 48 |
| 48 intptr_t NumberOfArgumentsChecked() const; | 49 intptr_t NumberOfArgumentsChecked() const; |
| 49 intptr_t NumberOfChecks() const; | 50 intptr_t NumberOfChecks() const; |
| 50 | 51 |
| 51 // Also updates the instance call at 'return_address_'. | 52 // Also updates the instance call at 'return_address_'. |
| 52 void AddCheck(const GrowableArray<const Class*>& classes, | 53 void AddCheck(const GrowableArray<const Class*>& classes, |
| 53 const Function& target); | 54 const Function& target); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 69 | 70 |
| 70 const Array* data_; | 71 const Array* data_; |
| 71 | 72 |
| 72 | 73 |
| 73 DISALLOW_COPY_AND_ASSIGN(ICData); | 74 DISALLOW_COPY_AND_ASSIGN(ICData); |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } // namespace dart | 77 } // namespace dart |
| 77 | 78 |
| 78 #endif // VM_IC_DATA_H_ | 79 #endif // VM_IC_DATA_H_ |
| OLD | NEW |