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 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 void set_num_fixed_parameters(intptr_t value) const; | 1329 void set_num_fixed_parameters(intptr_t value) const; |
1330 | 1330 |
1331 static intptr_t num_optional_parameters_offset() { | 1331 static intptr_t num_optional_parameters_offset() { |
1332 return OFFSET_OF(RawFunction, num_optional_parameters_); | 1332 return OFFSET_OF(RawFunction, num_optional_parameters_); |
1333 } | 1333 } |
1334 intptr_t num_optional_parameters() const { | 1334 intptr_t num_optional_parameters() const { |
1335 return raw_ptr()->num_optional_parameters_; | 1335 return raw_ptr()->num_optional_parameters_; |
1336 } | 1336 } |
1337 void set_num_optional_parameters(intptr_t value) const; | 1337 void set_num_optional_parameters(intptr_t value) const; |
1338 | 1338 |
1339 static intptr_t invocation_counter_offset() { | 1339 static intptr_t usage_counter_offset() { |
1340 return OFFSET_OF(RawFunction, invocation_counter_); | 1340 return OFFSET_OF(RawFunction, usage_counter_); |
1341 } | 1341 } |
1342 intptr_t invocation_counter() const { | 1342 intptr_t usage_counter() const { |
1343 return raw_ptr()->invocation_counter_; | 1343 return raw_ptr()->usage_counter_; |
1344 } | 1344 } |
1345 void set_invocation_counter(intptr_t value) const { | 1345 void set_usage_counter(intptr_t value) const { |
1346 raw_ptr()->invocation_counter_ = value; | 1346 raw_ptr()->usage_counter_ = value; |
1347 } | 1347 } |
1348 | 1348 |
1349 intptr_t deoptimization_counter() const { | 1349 intptr_t deoptimization_counter() const { |
1350 return raw_ptr()->deoptimization_counter_; | 1350 return raw_ptr()->deoptimization_counter_; |
1351 } | 1351 } |
1352 void set_deoptimization_counter(intptr_t value) const { | 1352 void set_deoptimization_counter(intptr_t value) const { |
1353 raw_ptr()->deoptimization_counter_ = value; | 1353 raw_ptr()->deoptimization_counter_ = value; |
1354 } | 1354 } |
1355 | 1355 |
1356 bool is_optimizable() const { | 1356 bool is_optimizable() const { |
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3647 } | 3647 } |
3648 | 3648 |
3649 static intptr_t num_args_tested_offset() { | 3649 static intptr_t num_args_tested_offset() { |
3650 return OFFSET_OF(RawICData, num_args_tested_); | 3650 return OFFSET_OF(RawICData, num_args_tested_); |
3651 } | 3651 } |
3652 | 3652 |
3653 static intptr_t ic_data_offset() { | 3653 static intptr_t ic_data_offset() { |
3654 return OFFSET_OF(RawICData, ic_data_); | 3654 return OFFSET_OF(RawICData, ic_data_); |
3655 } | 3655 } |
3656 | 3656 |
| 3657 static intptr_t function_offset() { |
| 3658 return OFFSET_OF(RawICData, function_); |
| 3659 } |
| 3660 |
3657 void AddCheck(const GrowableArray<const Class*>& classes, | 3661 void AddCheck(const GrowableArray<const Class*>& classes, |
3658 const Function& target) const; | 3662 const Function& target) const; |
3659 void GetCheckAt(intptr_t index, | 3663 void GetCheckAt(intptr_t index, |
3660 GrowableArray<const Class*>* classes, | 3664 GrowableArray<const Class*>* classes, |
3661 Function* target) const; | 3665 Function* target) const; |
3662 void GetOneClassCheckAt(int index, Class* cls, Function* target) const; | 3666 void GetOneClassCheckAt(int index, Class* cls, Function* target) const; |
3663 | 3667 |
3664 static RawICData* New(const Function& caller_function, | 3668 static RawICData* New(const Function& caller_function, |
3665 const String& target_name, | 3669 const String& target_name, |
3666 intptr_t id, | 3670 intptr_t id, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3738 } | 3742 } |
3739 | 3743 |
3740 | 3744 |
3741 void Context::SetAt(intptr_t index, const Instance& value) const { | 3745 void Context::SetAt(intptr_t index, const Instance& value) const { |
3742 StorePointer(InstanceAddr(index), value.raw()); | 3746 StorePointer(InstanceAddr(index), value.raw()); |
3743 } | 3747 } |
3744 | 3748 |
3745 } // namespace dart | 3749 } // namespace dart |
3746 | 3750 |
3747 #endif // VM_OBJECT_H_ | 3751 #endif // VM_OBJECT_H_ |
OLD | NEW |