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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 // On success, returns a RawInstance. On failure, a RawError. | 135 // On success, returns a RawInstance. On failure, a RawError. |
136 static RawObject* InvokeClosure(const Array& arguments, | 136 static RawObject* InvokeClosure(const Array& arguments, |
137 const Array& arguments_descriptor); | 137 const Array& arguments_descriptor); |
138 | 138 |
139 // Invokes the noSuchMethod instance function on the receiver. | 139 // Invokes the noSuchMethod instance function on the receiver. |
140 // On success, returns a RawInstance. On failure, a RawError. | 140 // On success, returns a RawInstance. On failure, a RawError. |
141 static RawObject* InvokeNoSuchMethod(const Instance& receiver, | 141 static RawObject* InvokeNoSuchMethod(const Instance& receiver, |
142 const String& target_name, | 142 const String& target_name, |
143 const Array& arguments, | 143 const Array& arguments, |
144 const Array& arguments_descriptor); | 144 const Array& arguments_descriptor); |
| 145 |
| 146 // Invokes a generative constructor, redirecting constructor, factory or |
| 147 // redirecting factory. On success, returns a RawInstance. On failure, |
| 148 // a RawError. |
| 149 static RawObject* InvokeConstructor(const Class& klass, |
| 150 const Function &constructor, |
| 151 const Array& arguments); |
145 }; | 152 }; |
146 | 153 |
147 | 154 |
148 // Utility functions to call from VM into Dart bootstrap libraries. | 155 // Utility functions to call from VM into Dart bootstrap libraries. |
149 // Each may return an exception object. | 156 // Each may return an exception object. |
150 class DartLibraryCalls : public AllStatic { | 157 class DartLibraryCalls : public AllStatic { |
151 public: | 158 public: |
152 // On success, returns a RawInstance. On failure, a RawError. | 159 // On success, returns a RawInstance. On failure, a RawError. |
153 static RawObject* ExceptionCreate(const Library& library, | 160 static RawObject* ExceptionCreate(const Library& library, |
154 const String& exception_name, | 161 const String& exception_name, |
(...skipping 27 matching lines...) Expand all Loading... |
182 | 189 |
183 // Gets the _id field of a SendPort/ReceivePort. | 190 // Gets the _id field of a SendPort/ReceivePort. |
184 // | 191 // |
185 // Returns the value of _id on success, a RawError on failure. | 192 // Returns the value of _id on success, a RawError on failure. |
186 static RawObject* PortGetId(const Instance& port); | 193 static RawObject* PortGetId(const Instance& port); |
187 }; | 194 }; |
188 | 195 |
189 } // namespace dart | 196 } // namespace dart |
190 | 197 |
191 #endif // VM_DART_ENTRY_H_ | 198 #endif // VM_DART_ENTRY_H_ |
OLD | NEW |