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 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1892 | 1892 |
1893 // Returns true if this function represents a signature function without code. | 1893 // Returns true if this function represents a signature function without code. |
1894 bool IsSignatureFunction() const { | 1894 bool IsSignatureFunction() const { |
1895 return kind() == RawFunction::kSignatureFunction; | 1895 return kind() == RawFunction::kSignatureFunction; |
1896 } | 1896 } |
1897 | 1897 |
1898 static intptr_t InstanceSize() { | 1898 static intptr_t InstanceSize() { |
1899 return RoundedAllocationSize(sizeof(RawFunction)); | 1899 return RoundedAllocationSize(sizeof(RawFunction)); |
1900 } | 1900 } |
1901 | 1901 |
1902 TraceBuffer* log() const { | |
1903 ASSERT(raw_ptr()->log_ != NULL); | |
1904 return raw_ptr()->log_; | |
1905 } | |
1906 | |
1907 void set_log(TraceBuffer* trace_buffer) const { | |
1908 ASSERT(trace_buffer != NULL); | |
1909 raw_ptr()->log_ = trace_buffer; | |
1910 } | |
1911 | |
1912 static RawFunction* New(const String& name, | 1902 static RawFunction* New(const String& name, |
1913 RawFunction::Kind kind, | 1903 RawFunction::Kind kind, |
1914 bool is_static, | 1904 bool is_static, |
1915 bool is_const, | 1905 bool is_const, |
1916 bool is_abstract, | 1906 bool is_abstract, |
1917 bool is_external, | 1907 bool is_external, |
1918 bool is_native, | 1908 bool is_native, |
1919 const Object& owner, | 1909 const Object& owner, |
1920 intptr_t token_pos); | 1910 intptr_t token_pos); |
1921 | 1911 |
(...skipping 4923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6845 | 6835 |
6846 | 6836 |
6847 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6837 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6848 intptr_t index) { | 6838 intptr_t index) { |
6849 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6839 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6850 } | 6840 } |
6851 | 6841 |
6852 } // namespace dart | 6842 } // namespace dart |
6853 | 6843 |
6854 #endif // VM_OBJECT_H_ | 6844 #endif // VM_OBJECT_H_ |
OLD | NEW |