| 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 RUNTIME_VM_DART_ENTRY_H_ | 5 #ifndef RUNTIME_VM_DART_ENTRY_H_ |
| 6 #define RUNTIME_VM_DART_ENTRY_H_ | 6 #define RUNTIME_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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 static RawArray* cached_args_descriptors_[kCachedDescriptorCount]; | 112 static RawArray* cached_args_descriptors_[kCachedDescriptorCount]; |
| 113 | 113 |
| 114 friend class SnapshotReader; | 114 friend class SnapshotReader; |
| 115 friend class SnapshotWriter; | 115 friend class SnapshotWriter; |
| 116 friend class Serializer; | 116 friend class Serializer; |
| 117 friend class Deserializer; | 117 friend class Deserializer; |
| 118 friend class Simulator; | 118 friend class Simulator; |
| 119 DISALLOW_COPY_AND_ASSIGN(ArgumentsDescriptor); | 119 DISALLOW_COPY_AND_ASSIGN(ArgumentsDescriptor); |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 | |
| 123 // DartEntry abstracts functionality needed to resolve dart functions | 122 // DartEntry abstracts functionality needed to resolve dart functions |
| 124 // and invoke them from C++. | 123 // and invoke them from C++. |
| 125 class DartEntry : public AllStatic { | 124 class DartEntry : public AllStatic { |
| 126 public: | 125 public: |
| 127 // On success, returns a RawInstance. On failure, a RawError. | 126 // On success, returns a RawInstance. On failure, a RawError. |
| 128 typedef RawObject* (*invokestub)(const Code& target_code, | 127 typedef RawObject* (*invokestub)(const Code& target_code, |
| 129 const Array& arguments_descriptor, | 128 const Array& arguments_descriptor, |
| 130 const Array& arguments, | 129 const Array& arguments, |
| 131 Thread* thread); | 130 Thread* thread); |
| 132 | 131 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 158 const Array& arguments_descriptor); | 157 const Array& arguments_descriptor); |
| 159 | 158 |
| 160 // Invokes the noSuchMethod instance function on the receiver. | 159 // Invokes the noSuchMethod instance function on the receiver. |
| 161 // On success, returns a RawInstance. On failure, a RawError. | 160 // On success, returns a RawInstance. On failure, a RawError. |
| 162 static RawObject* InvokeNoSuchMethod(const Instance& receiver, | 161 static RawObject* InvokeNoSuchMethod(const Instance& receiver, |
| 163 const String& target_name, | 162 const String& target_name, |
| 164 const Array& arguments, | 163 const Array& arguments, |
| 165 const Array& arguments_descriptor); | 164 const Array& arguments_descriptor); |
| 166 }; | 165 }; |
| 167 | 166 |
| 168 | |
| 169 // Utility functions to call from VM into Dart bootstrap libraries. | 167 // Utility functions to call from VM into Dart bootstrap libraries. |
| 170 // Each may return an exception object. | 168 // Each may return an exception object. |
| 171 class DartLibraryCalls : public AllStatic { | 169 class DartLibraryCalls : public AllStatic { |
| 172 public: | 170 public: |
| 173 // On success, returns a RawInstance. On failure, a RawError. | 171 // On success, returns a RawInstance. On failure, a RawError. |
| 174 static RawObject* InstanceCreate(const Library& library, | 172 static RawObject* InstanceCreate(const Library& library, |
| 175 const String& exception_name, | 173 const String& exception_name, |
| 176 const String& constructor_name, | 174 const String& constructor_name, |
| 177 const Array& arguments); | 175 const Array& arguments); |
| 178 | 176 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 199 // | 197 // |
| 200 // Returns null on success, a RawError on failure. | 198 // Returns null on success, a RawError on failure. |
| 201 static RawObject* MapSetAt(const Instance& map, | 199 static RawObject* MapSetAt(const Instance& map, |
| 202 const Instance& key, | 200 const Instance& key, |
| 203 const Instance& value); | 201 const Instance& value); |
| 204 }; | 202 }; |
| 205 | 203 |
| 206 } // namespace dart | 204 } // namespace dart |
| 207 | 205 |
| 208 #endif // RUNTIME_VM_DART_ENTRY_H_ | 206 #endif // RUNTIME_VM_DART_ENTRY_H_ |
| OLD | NEW |