| 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 index) const; | 40 bool MatchesNameAt(intptr_t i, const String& other) const; |
| 41 | 41 |
| 42 // Generated code support. | 42 // Generated code support. |
| 43 static intptr_t count_offset(); | 43 static intptr_t count_offset(); |
| 44 static intptr_t positional_count_offset(); | 44 static intptr_t positional_count_offset(); |
| 45 static intptr_t first_named_entry_offset(); | 45 static intptr_t first_named_entry_offset(); |
| 46 static intptr_t name_offset() { return kNameOffset * kWordSize; } | 46 static intptr_t name_offset() { return kNameOffset * kWordSize; } |
| 47 static intptr_t position_offset() { return kPositionOffset * kWordSize; } | 47 static intptr_t position_offset() { return kPositionOffset * kWordSize; } |
| 48 static intptr_t named_entry_size() { return kNamedEntrySize * kWordSize; } | 48 static intptr_t named_entry_size() { return kNamedEntrySize * kWordSize; } |
| 49 | 49 |
| 50 // Allocate and return an arguments descriptor. The first | 50 // Allocate and return an arguments descriptor. The first |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 146 |
| 147 // Gets the _id field of a SendPort/ReceivePort. | 147 // Gets the _id field of a SendPort/ReceivePort. |
| 148 // | 148 // |
| 149 // Returns the value of _id on success, a RawError on failure. | 149 // Returns the value of _id on success, a RawError on failure. |
| 150 static RawObject* PortGetId(const Instance& port); | 150 static RawObject* PortGetId(const Instance& port); |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace dart | 153 } // namespace dart |
| 154 | 154 |
| 155 #endif // VM_DART_ENTRY_H_ | 155 #endif // VM_DART_ENTRY_H_ |
| OLD | NEW |