OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 class _Closure implements Function { | 5 class _Closure implements Function { |
6 bool operator ==(other) native "Closure_equals"; | 6 bool operator ==(other) native "Closure_equals"; |
7 | 7 |
8 int get hashCode native "Closure_hashCode"; | 8 int get hashCode native "Closure_hashCode"; |
9 | 9 |
10 _Closure get call => this; | 10 _Closure get call => this; |
11 | 11 |
12 _Closure _clone() native "Closure_clone"; | 12 _Closure _clone() native "Closure_clone"; |
13 | 13 |
14 // No instance fields should be declared before the following 3 fields whose | 14 // No instance fields should be declared before the following 4 fields whose |
15 // offsets must be identical in Dart and C++. | 15 // offsets must be identical in Dart and C++. |
16 | 16 |
17 // The following 3 fields are declared both in raw_object.h (for direct access | 17 // The following 4 fields are declared both in raw_object.h (for direct access |
18 // from C++ code) and also here so that the offset-to-field map used by | 18 // from C++ code) and also here so that the offset-to-field map used by |
19 // deferred objects is properly initialized. | 19 // deferred objects is properly initialized. |
20 // Caution: These fields are not Dart instances, but VM objects. | 20 // Caution: These fields are not Dart instances, but VM objects. Their Dart |
21 // The fields had to be renamed here so that they would be private fields | 21 // names do not need to match the C++ names, but they must be private. |
22 // in dart | 22 var _instantiator_type_arguments; |
23 // instantiator_ ===> _instantiator | 23 var _function_type_arguments; |
24 // function_ ===> _function | |
25 // context_ ===> _context | |
26 var _instantiator; | |
27 var _function; | 24 var _function; |
28 var _context; | 25 var _context; |
29 } | 26 } |
OLD | NEW |