OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_DART_ENTRY_H_ | 5 #ifndef VM_DART_ENTRY_H_ |
6 #define VM_DART_ENTRY_H_ | 6 #define VM_DART_ENTRY_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/growable_array.h" | 9 #include "vm/growable_array.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 // by name, for each named optional argument; and a terminating null to | 30 // by name, for each named optional argument; and a terminating null to |
31 // simplify iterating in generated code. | 31 // simplify iterating in generated code. |
32 class ArgumentsDescriptor : public ValueObject { | 32 class ArgumentsDescriptor : public ValueObject { |
33 public: | 33 public: |
34 explicit ArgumentsDescriptor(const Array& array); | 34 explicit ArgumentsDescriptor(const Array& array); |
35 | 35 |
36 // Accessors. | 36 // Accessors. |
37 intptr_t Count() const; | 37 intptr_t Count() const; |
38 intptr_t PositionalCount() const; | 38 intptr_t PositionalCount() const; |
39 intptr_t NamedCount() const { return Count() - PositionalCount(); } | 39 intptr_t NamedCount() const { return Count() - PositionalCount(); } |
| 40 RawString* NameAt(intptr_t i) const; |
40 bool MatchesNameAt(intptr_t i, const String& other) const; | 41 bool MatchesNameAt(intptr_t i, const String& other) const; |
41 | 42 |
42 // Generated code support. | 43 // Generated code support. |
43 static intptr_t count_offset(); | 44 static intptr_t count_offset(); |
44 static intptr_t positional_count_offset(); | 45 static intptr_t positional_count_offset(); |
45 static intptr_t first_named_entry_offset(); | 46 static intptr_t first_named_entry_offset(); |
46 static intptr_t name_offset() { return kNameOffset * kWordSize; } | 47 static intptr_t name_offset() { return kNameOffset * kWordSize; } |
47 static intptr_t position_offset() { return kPositionOffset * kWordSize; } | 48 static intptr_t position_offset() { return kPositionOffset * kWordSize; } |
48 static intptr_t named_entry_size() { return kNamedEntrySize * kWordSize; } | 49 static intptr_t named_entry_size() { return kNamedEntrySize * kWordSize; } |
49 | 50 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 182 |
182 // Gets the _id field of a SendPort/ReceivePort. | 183 // Gets the _id field of a SendPort/ReceivePort. |
183 // | 184 // |
184 // Returns the value of _id on success, a RawError on failure. | 185 // Returns the value of _id on success, a RawError on failure. |
185 static RawObject* PortGetId(const Instance& port); | 186 static RawObject* PortGetId(const Instance& port); |
186 }; | 187 }; |
187 | 188 |
188 } // namespace dart | 189 } // namespace dart |
189 | 190 |
190 #endif // VM_DART_ENTRY_H_ | 191 #endif // VM_DART_ENTRY_H_ |
OLD | NEW |