| 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 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1804 return raw_ptr()->instructions_->ptr()->code_; | 1804 return raw_ptr()->instructions_->ptr()->code_; |
| 1805 } | 1805 } |
| 1806 | 1806 |
| 1807 RawCode* unoptimized_code() const { return raw_ptr()->unoptimized_code_; } | 1807 RawCode* unoptimized_code() const { return raw_ptr()->unoptimized_code_; } |
| 1808 void set_unoptimized_code(const Code& value) const; | 1808 void set_unoptimized_code(const Code& value) const; |
| 1809 static intptr_t unoptimized_code_offset() { | 1809 static intptr_t unoptimized_code_offset() { |
| 1810 return OFFSET_OF(RawFunction, unoptimized_code_); | 1810 return OFFSET_OF(RawFunction, unoptimized_code_); |
| 1811 } | 1811 } |
| 1812 bool HasCode() const; | 1812 bool HasCode() const; |
| 1813 | 1813 |
| 1814 RawGrowableObjectArray* CollectICsWithSourcePositions() const; | |
| 1815 | |
| 1816 static intptr_t instructions_offset() { | 1814 static intptr_t instructions_offset() { |
| 1817 return OFFSET_OF(RawFunction, instructions_); | 1815 return OFFSET_OF(RawFunction, instructions_); |
| 1818 } | 1816 } |
| 1819 | 1817 |
| 1820 // Returns true if there is at least one debugger breakpoint | 1818 // Returns true if there is at least one debugger breakpoint |
| 1821 // set in this function. | 1819 // set in this function. |
| 1822 bool HasBreakpoint() const; | 1820 bool HasBreakpoint() const; |
| 1823 | 1821 |
| 1824 RawContextScope* context_scope() const; | 1822 RawContextScope* context_scope() const; |
| 1825 void set_context_scope(const ContextScope& value) const; | 1823 void set_context_scope(const ContextScope& value) const; |
| (...skipping 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3889 UNREACHABLE(); | 3887 UNREACHABLE(); |
| 3890 return "?"; | 3888 return "?"; |
| 3891 } | 3889 } |
| 3892 } | 3890 } |
| 3893 | 3891 |
| 3894 // It is only meaningful to interptret range feedback stored in the ICData | 3892 // It is only meaningful to interptret range feedback stored in the ICData |
| 3895 // when all checks are Mint or Smi. | 3893 // when all checks are Mint or Smi. |
| 3896 bool HasRangeFeedback() const; | 3894 bool HasRangeFeedback() const; |
| 3897 RangeFeedback DecodeRangeFeedbackAt(intptr_t idx) const; | 3895 RangeFeedback DecodeRangeFeedbackAt(intptr_t idx) const; |
| 3898 | 3896 |
| 3899 void PrintToJSONArray(JSONArray* jsarray, intptr_t token_pos) const; | 3897 void PrintToJSONArray(const JSONArray& jsarray, |
| 3898 intptr_t token_pos, |
| 3899 bool is_static_call) const; |
| 3900 | 3900 |
| 3901 private: | 3901 private: |
| 3902 RawArray* ic_data() const { | 3902 RawArray* ic_data() const { |
| 3903 return raw_ptr()->ic_data_; | 3903 return raw_ptr()->ic_data_; |
| 3904 } | 3904 } |
| 3905 | 3905 |
| 3906 void set_owner(const Function& value) const; | 3906 void set_owner(const Function& value) const; |
| 3907 void set_target_name(const String& value) const; | 3907 void set_target_name(const String& value) const; |
| 3908 void set_arguments_descriptor(const Array& value) const; | 3908 void set_arguments_descriptor(const Array& value) const; |
| 3909 void set_deopt_id(intptr_t value) const; | 3909 void set_deopt_id(intptr_t value) const; |
| (...skipping 3935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7845 | 7845 |
| 7846 | 7846 |
| 7847 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7847 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7848 intptr_t index) { | 7848 intptr_t index) { |
| 7849 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7849 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7850 } | 7850 } |
| 7851 | 7851 |
| 7852 } // namespace dart | 7852 } // namespace dart |
| 7853 | 7853 |
| 7854 #endif // VM_OBJECT_H_ | 7854 #endif // VM_OBJECT_H_ |
| OLD | NEW |