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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 // Invoke the specified static function. | 44 // Invoke the specified static function. |
45 // On success, returns a RawInstance. On failure, a RawError. | 45 // On success, returns a RawInstance. On failure, a RawError. |
46 static RawObject* InvokeStatic( | 46 static RawObject* InvokeStatic( |
47 const Function& function, | 47 const Function& function, |
48 const GrowableArray<const Object*>& arguments, | 48 const GrowableArray<const Object*>& arguments, |
49 const Array& optional_arguments_names); | 49 const Array& optional_arguments_names); |
50 | 50 |
51 // Invoke the specified closure object. | 51 // Invoke the specified closure object. |
52 // On success, returns a RawInstance. On failure, a RawError. | 52 // On success, returns a RawInstance. On failure, a RawError. |
53 static RawObject* InvokeClosure( | 53 static RawObject* InvokeClosure( |
54 const Closure& closure, | 54 const Instance& closure, |
55 const GrowableArray<const Object*>& arguments, | 55 const GrowableArray<const Object*>& arguments, |
56 const Array& optional_arguments_names); | 56 const Array& optional_arguments_names); |
57 | 57 |
58 // Allocate and return an arguments descriptor. | 58 // Allocate and return an arguments descriptor. |
59 // Let 'num_names' be the length of 'optional_arguments_names'. | 59 // Let 'num_names' be the length of 'optional_arguments_names'. |
60 // Treat the first 'num_arguments - num_names' arguments as positional and | 60 // Treat the first 'num_arguments - num_names' arguments as positional and |
61 // treat the following 'num_names' arguments as named optional arguments. | 61 // treat the following 'num_names' arguments as named optional arguments. |
62 static const Array& ArgumentsDescriptor( | 62 static const Array& ArgumentsDescriptor( |
63 int num_arguments, | 63 int num_arguments, |
64 const Array& optional_arguments_names); | 64 const Array& optional_arguments_names); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 // Gets the _id field of a SendPort/ReceivePort. | 99 // Gets the _id field of a SendPort/ReceivePort. |
100 // | 100 // |
101 // Returns the value of _id on success, a RawError on failure. | 101 // Returns the value of _id on success, a RawError on failure. |
102 static RawObject* PortGetId(const Instance& port); | 102 static RawObject* PortGetId(const Instance& port); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace dart | 105 } // namespace dart |
106 | 106 |
107 #endif // VM_DART_ENTRY_H_ | 107 #endif // VM_DART_ENTRY_H_ |
OLD | NEW |