| 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 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1879 } | 1879 } |
| 1880 | 1880 |
| 1881 // Returns true if this function represents an static initializer function. | 1881 // Returns true if this function represents an static initializer function. |
| 1882 bool IsStaticInitializerFunction() const { | 1882 bool IsStaticInitializerFunction() const { |
| 1883 return kind() == RawFunction::kStaticInitializer; | 1883 return kind() == RawFunction::kStaticInitializer; |
| 1884 } | 1884 } |
| 1885 | 1885 |
| 1886 // Returns true if this function represents a (possibly implicit) closure | 1886 // Returns true if this function represents a (possibly implicit) closure |
| 1887 // function. | 1887 // function. |
| 1888 bool IsClosureFunction() const { | 1888 bool IsClosureFunction() const { |
| 1889 return kind() == RawFunction::kClosureFunction; | 1889 return (kind() == RawFunction::kClosureFunction) || |
| 1890 (kind() == RawFunction::kGetFieldClosure) || |
| 1891 (kind() == RawFunction::kSetFieldClosure); |
| 1890 } | 1892 } |
| 1891 | 1893 |
| 1892 // Returns true if this function represents an implicit closure function. | 1894 // Returns true if this function represents an implicit closure function. |
| 1893 bool IsImplicitClosureFunction() const; | 1895 bool IsImplicitClosureFunction() const; |
| 1894 | 1896 |
| 1895 // Returns true if this function represents a non implicit closure function. | 1897 // Returns true if this function represents a non implicit closure function. |
| 1896 bool IsNonImplicitClosureFunction() const { | 1898 bool IsNonImplicitClosureFunction() const { |
| 1897 return IsClosureFunction() && !IsImplicitClosureFunction(); | 1899 return IsClosureFunction() && !IsImplicitClosureFunction(); |
| 1898 } | 1900 } |
| 1899 | 1901 |
| (...skipping 4757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6657 | 6659 |
| 6658 | 6660 |
| 6659 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6661 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6660 intptr_t index) { | 6662 intptr_t index) { |
| 6661 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6663 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6662 } | 6664 } |
| 6663 | 6665 |
| 6664 } // namespace dart | 6666 } // namespace dart |
| 6665 | 6667 |
| 6666 #endif // VM_OBJECT_H_ | 6668 #endif // VM_OBJECT_H_ |
| OLD | NEW |