Index: vm/dart_entry.h |
=================================================================== |
--- vm/dart_entry.h (revision 16238) |
+++ vm/dart_entry.h (working copy) |
@@ -53,6 +53,10 @@ |
static RawArray* New(intptr_t count, |
const Array& optional_arguments_names); |
+ // Allocate and return an arguments descriptor that has no optional |
+ // arguments. All arguments are positional. |
+ static RawArray* New(intptr_t count); |
+ |
private: |
// Absolute indexes into the array. |
enum { |
@@ -86,30 +90,47 @@ |
// On success, returns a RawInstance. On failure, a RawError. |
typedef RawObject* (*invokestub)(uword entry_point, |
const Array& arguments_descriptor, |
- const Object** arguments, |
+ const Array& arguments, |
const Context& context); |
// Invokes the specified instance function on the receiver. |
// On success, returns a RawInstance. On failure, a RawError. |
- static RawObject* InvokeDynamic( |
- const Instance& receiver, |
+ // This is used when there are no named arguments in the call. |
+ static RawObject* InvokeDynamic(const Function& function, |
+ const Array& arguments); |
+ |
+ // Invokes the specified instance function on the receiver. |
+ // On success, returns a RawInstance. On failure, a RawError. |
+ static RawObject* InvokeDynamicWithNamedArgs( |
regis
2012/12/18 16:21:28
It's great not to have to pass the arguments descr
siva
2012/12/18 21:18:13
Agree, I have changed the name to just InvokeDynam
|
const Function& function, |
- const GrowableArray<const Object*>& arguments, |
- const Array& optional_arguments_names); |
+ const Array& arguments_descriptor, |
+ const Array& arguments); |
// Invoke the specified static function. |
// On success, returns a RawInstance. On failure, a RawError. |
- static RawObject* InvokeStatic( |
+ // This is used when there are no named arguments in the call. |
+ static RawObject* InvokeStatic(const Function& function, |
+ const Array& arguments); |
+ |
+ // Invoke the specified static function. |
+ // On success, returns a RawInstance. On failure, a RawError. |
+ static RawObject* InvokeStaticWithNamedArgs( |
regis
2012/12/18 16:21:28
Overload "InvokeStatic" and swap arguments?
siva
2012/12/18 21:18:13
Done.
|
const Function& function, |
- const GrowableArray<const Object*>& arguments, |
- const Array& optional_arguments_names); |
+ const Array& arguments_descriptor, |
+ const Array& arguments); |
// Invoke the specified closure object. |
// On success, returns a RawInstance. On failure, a RawError. |
- static RawObject* InvokeClosure( |
+ // This is used when there are no named arguments in the call. |
+ static RawObject* InvokeClosure(const Instance& closure, |
regis
2012/12/18 16:21:28
The closure is the first argument and does not nee
siva
2012/12/18 21:18:13
I thought about that too, but somehow felt it is m
regis
2012/12/18 21:34:46
Sure. It is definitely more readable to repeat the
|
+ const Array& arguments); |
+ |
+ // Invoke the specified closure object. |
+ // On success, returns a RawInstance. On failure, a RawError. |
+ static RawObject* InvokeClosureWithNamedArgs( |
regis
2012/12/18 16:21:28
Overload "InvokeClosure" and swap arguments?
siva
2012/12/18 21:18:13
Swapped the arguments but retained the closure par
|
const Instance& closure, |
- const GrowableArray<const Object*>& arguments, |
- const Array& optional_arguments_names); |
+ const Array& arguments_descriptor, |
+ const Array& arguments); |
}; |