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 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1881 static intptr_t InstanceSize() { | 1881 static intptr_t InstanceSize() { |
1882 return RoundedAllocationSize(sizeof(RawFunction)); | 1882 return RoundedAllocationSize(sizeof(RawFunction)); |
1883 } | 1883 } |
1884 | 1884 |
1885 static RawFunction* New(const String& name, | 1885 static RawFunction* New(const String& name, |
1886 RawFunction::Kind kind, | 1886 RawFunction::Kind kind, |
1887 bool is_static, | 1887 bool is_static, |
1888 bool is_const, | 1888 bool is_const, |
1889 bool is_abstract, | 1889 bool is_abstract, |
1890 bool is_external, | 1890 bool is_external, |
| 1891 bool is_native, |
1891 const Object& owner, | 1892 const Object& owner, |
1892 intptr_t token_pos); | 1893 intptr_t token_pos); |
1893 | 1894 |
1894 // Allocates a new Function object representing a closure function, as well as | 1895 // Allocates a new Function object representing a closure function, as well as |
1895 // a new associated Class object representing the signature class of the | 1896 // a new associated Class object representing the signature class of the |
1896 // function. | 1897 // function. |
1897 // The function and the class share the same given name. | 1898 // The function and the class share the same given name. |
1898 static RawFunction* NewClosureFunction(const String& name, | 1899 static RawFunction* NewClosureFunction(const String& name, |
1899 const Function& parent, | 1900 const Function& parent, |
1900 intptr_t token_pos); | 1901 intptr_t token_pos); |
(...skipping 4535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6436 | 6437 |
6437 | 6438 |
6438 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6439 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
6439 intptr_t index) { | 6440 intptr_t index) { |
6440 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6441 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
6441 } | 6442 } |
6442 | 6443 |
6443 } // namespace dart | 6444 } // namespace dart |
6444 | 6445 |
6445 #endif // VM_OBJECT_H_ | 6446 #endif // VM_OBJECT_H_ |
OLD | NEW |