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 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1888 | 1888 |
1889 // Returns true if this function represents a signature function without code. | 1889 // Returns true if this function represents a signature function without code. |
1890 bool IsSignatureFunction() const { | 1890 bool IsSignatureFunction() const { |
1891 return kind() == RawFunction::kSignatureFunction; | 1891 return kind() == RawFunction::kSignatureFunction; |
1892 } | 1892 } |
1893 | 1893 |
1894 static intptr_t InstanceSize() { | 1894 static intptr_t InstanceSize() { |
1895 return RoundedAllocationSize(sizeof(RawFunction)); | 1895 return RoundedAllocationSize(sizeof(RawFunction)); |
1896 } | 1896 } |
1897 | 1897 |
1898 TraceBuffer* log() const { | |
1899 ASSERT(raw_ptr()->log_ != NULL); | |
1900 return raw_ptr()->log_; | |
1901 } | |
turnidge
2014/04/14 16:41:17
I've been pondering how we can attach json objects
| |
1902 | |
1903 void set_log(TraceBuffer* trace_buffer) const { | |
1904 ASSERT(trace_buffer != NULL); | |
1905 raw_ptr()->log_ = trace_buffer; | |
1906 } | |
1907 | |
1898 static RawFunction* New(const String& name, | 1908 static RawFunction* New(const String& name, |
1899 RawFunction::Kind kind, | 1909 RawFunction::Kind kind, |
1900 bool is_static, | 1910 bool is_static, |
1901 bool is_const, | 1911 bool is_const, |
1902 bool is_abstract, | 1912 bool is_abstract, |
1903 bool is_external, | 1913 bool is_external, |
1904 bool is_native, | 1914 bool is_native, |
1905 const Object& owner, | 1915 const Object& owner, |
1906 intptr_t token_pos); | 1916 intptr_t token_pos); |
1907 | 1917 |
(...skipping 4915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6823 | 6833 |
6824 | 6834 |
6825 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6835 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6826 intptr_t index) { | 6836 intptr_t index) { |
6827 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6837 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6828 } | 6838 } |
6829 | 6839 |
6830 } // namespace dart | 6840 } // namespace dart |
6831 | 6841 |
6832 #endif // VM_OBJECT_H_ | 6842 #endif // VM_OBJECT_H_ |
OLD | NEW |