| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 friend class SnapshotWriter; | 95 friend class SnapshotWriter; |
| 96 DISALLOW_COPY_AND_ASSIGN(ArgumentsDescriptor); | 96 DISALLOW_COPY_AND_ASSIGN(ArgumentsDescriptor); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 | 99 |
| 100 // DartEntry abstracts functionality needed to resolve dart functions | 100 // DartEntry abstracts functionality needed to resolve dart functions |
| 101 // and invoke them from C++. | 101 // and invoke them from C++. |
| 102 class DartEntry : public AllStatic { | 102 class DartEntry : public AllStatic { |
| 103 public: | 103 public: |
| 104 // On success, returns a RawInstance. On failure, a RawError. | 104 // On success, returns a RawInstance. On failure, a RawError. |
| 105 typedef RawObject* (*invokestub)(uword entry_point, | 105 typedef RawObject* (*invokestub)(const Code& target_code, |
| 106 const Array& arguments_descriptor, | 106 const Array& arguments_descriptor, |
| 107 const Array& arguments, | 107 const Array& arguments, |
| 108 Thread* thread); | 108 Thread* thread); |
| 109 | 109 |
| 110 // Invokes the specified instance function or static function. | 110 // Invokes the specified instance function or static function. |
| 111 // The first argument of an instance function is the receiver. | 111 // The first argument of an instance function is the receiver. |
| 112 // On success, returns a RawInstance. On failure, a RawError. | 112 // On success, returns a RawInstance. On failure, a RawError. |
| 113 // This is used when there are no named arguments in the call. | 113 // This is used when there are no named arguments in the call. |
| 114 static RawObject* InvokeFunction(const Function& function, | 114 static RawObject* InvokeFunction(const Function& function, |
| 115 const Array& arguments); | 115 const Array& arguments); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // | 172 // |
| 173 // Returns null on success, a RawError on failure. | 173 // Returns null on success, a RawError on failure. |
| 174 static RawObject* MapSetAt(const Instance& map, | 174 static RawObject* MapSetAt(const Instance& map, |
| 175 const Instance& key, | 175 const Instance& key, |
| 176 const Instance& value); | 176 const Instance& value); |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 } // namespace dart | 179 } // namespace dart |
| 180 | 180 |
| 181 #endif // VM_DART_ENTRY_H_ | 181 #endif // VM_DART_ENTRY_H_ |
| OLD | NEW |