| 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 2538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2549 } | 2549 } |
| 2550 | 2550 |
| 2551 static intptr_t ic_data_offset() { | 2551 static intptr_t ic_data_offset() { |
| 2552 return OFFSET_OF(RawICData, ic_data_); | 2552 return OFFSET_OF(RawICData, ic_data_); |
| 2553 } | 2553 } |
| 2554 | 2554 |
| 2555 static intptr_t function_offset() { | 2555 static intptr_t function_offset() { |
| 2556 return OFFSET_OF(RawICData, function_); | 2556 return OFFSET_OF(RawICData, function_); |
| 2557 } | 2557 } |
| 2558 | 2558 |
| 2559 void AddCheck(const GrowableArray<const Class*>& classes, | 2559 // Adds one more class test to ICData. Length of 'classes' must be equal to |
| 2560 // the number of arguments tested. |
| 2561 void AddCheck(const GrowableArray<intptr_t>& class_ids, |
| 2560 const Function& target) const; | 2562 const Function& target) const; |
| 2561 void GetCheckAt(intptr_t index, | 2563 void GetCheckAt(intptr_t index, |
| 2562 GrowableArray<const Class*>* classes, | 2564 GrowableArray<intptr_t>* class_ids, |
| 2563 Function* target) const; | 2565 Function* target) const; |
| 2564 void GetOneClassCheckAt(int index, Class* cls, Function* target) const; | 2566 void GetOneClassCheckAt( |
| 2567 int index, intptr_t* class_id, Function* target) const; |
| 2565 | 2568 |
| 2566 static RawICData* New(const Function& caller_function, | 2569 static RawICData* New(const Function& caller_function, |
| 2567 const String& target_name, | 2570 const String& target_name, |
| 2568 intptr_t id, | 2571 intptr_t id, |
| 2569 intptr_t num_args_tested); | 2572 intptr_t num_args_tested); |
| 2570 | 2573 |
| 2571 private: | 2574 private: |
| 2572 RawArray* ic_data() const { | 2575 RawArray* ic_data() const { |
| 2573 return raw_ptr()->ic_data_; | 2576 return raw_ptr()->ic_data_; |
| 2574 } | 2577 } |
| (...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5036 } | 5039 } |
| 5037 | 5040 |
| 5038 | 5041 |
| 5039 intptr_t Stackmap::SizeInBits() const { | 5042 intptr_t Stackmap::SizeInBits() const { |
| 5040 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); | 5043 return (Smi::Value(raw_ptr()->bitmap_size_in_bytes_) * kBitsPerByte); |
| 5041 } | 5044 } |
| 5042 | 5045 |
| 5043 } // namespace dart | 5046 } // namespace dart |
| 5044 | 5047 |
| 5045 #endif // VM_OBJECT_H_ | 5048 #endif // VM_OBJECT_H_ |
| OLD | NEW |