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 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1790 void SwitchToUnoptimizedCode() const; | 1790 void SwitchToUnoptimizedCode() const; |
1791 | 1791 |
1792 // Return the most recently compiled and installed code for this function. | 1792 // Return the most recently compiled and installed code for this function. |
1793 // It is not the only Code object that points to this function. | 1793 // It is not the only Code object that points to this function. |
1794 RawCode* CurrentCode() const { | 1794 RawCode* CurrentCode() const { |
1795 return raw_ptr()->instructions_->ptr()->code_; | 1795 return raw_ptr()->instructions_->ptr()->code_; |
1796 } | 1796 } |
1797 | 1797 |
1798 RawCode* unoptimized_code() const { return raw_ptr()->unoptimized_code_; } | 1798 RawCode* unoptimized_code() const { return raw_ptr()->unoptimized_code_; } |
1799 void set_unoptimized_code(const Code& value) const; | 1799 void set_unoptimized_code(const Code& value) const; |
1800 static intptr_t unoptimized_code_offset() { | |
1801 return OFFSET_OF(RawFunction, unoptimized_code_); | |
1802 } | |
1803 bool HasCode() const; | 1800 bool HasCode() const; |
1804 | 1801 |
1805 static intptr_t instructions_offset() { | 1802 static intptr_t instructions_offset() { |
1806 return OFFSET_OF(RawFunction, instructions_); | 1803 return OFFSET_OF(RawFunction, instructions_); |
1807 } | 1804 } |
1808 | 1805 |
1809 // Returns true if there is at least one debugger breakpoint | 1806 // Returns true if there is at least one debugger breakpoint |
1810 // set in this function. | 1807 // set in this function. |
1811 bool HasBreakpoint() const; | 1808 bool HasBreakpoint() const; |
1812 | 1809 |
(...skipping 6027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7840 | 7837 |
7841 | 7838 |
7842 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7839 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
7843 intptr_t index) { | 7840 intptr_t index) { |
7844 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7841 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
7845 } | 7842 } |
7846 | 7843 |
7847 } // namespace dart | 7844 } // namespace dart |
7848 | 7845 |
7849 #endif // VM_OBJECT_H_ | 7846 #endif // VM_OBJECT_H_ |
OLD | NEW |