| 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 // simplify iterating in generated code. | 30 // simplify iterating in generated code. |
| 31 class ArgumentsDescriptor : public ValueObject { | 31 class ArgumentsDescriptor : public ValueObject { |
| 32 public: | 32 public: |
| 33 explicit ArgumentsDescriptor(const Array& array); | 33 explicit ArgumentsDescriptor(const Array& array); |
| 34 | 34 |
| 35 // Accessors. | 35 // Accessors. |
| 36 intptr_t Count() const; | 36 intptr_t Count() const; |
| 37 intptr_t PositionalCount() const; | 37 intptr_t PositionalCount() const; |
| 38 intptr_t NamedCount() const { return Count() - PositionalCount(); } | 38 intptr_t NamedCount() const { return Count() - PositionalCount(); } |
| 39 RawString* NameAt(intptr_t i) const; | 39 RawString* NameAt(intptr_t i) const; |
| 40 intptr_t PositionAt(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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // | 189 // |
| 189 // Returns null on success, a RawError on failure. | 190 // Returns null on success, a RawError on failure. |
| 190 static RawObject* MapSetAt(const Instance& map, | 191 static RawObject* MapSetAt(const Instance& map, |
| 191 const Instance& key, | 192 const Instance& key, |
| 192 const Instance& value); | 193 const Instance& value); |
| 193 }; | 194 }; |
| 194 | 195 |
| 195 } // namespace dart | 196 } // namespace dart |
| 196 | 197 |
| 197 #endif // VM_DART_ENTRY_H_ | 198 #endif // VM_DART_ENTRY_H_ |
| OLD | NEW |