Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: runtime/vm/dart_entry.h

Issue 1156593002: Cache current thread in a reserved register and use it in LoadIsolate (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Added more comments. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
95 }; 95 };
96 96
97 97
98 // DartEntry abstracts functionality needed to resolve dart functions 98 // DartEntry abstracts functionality needed to resolve dart functions
99 // and invoke them from C++. 99 // and invoke them from C++.
100 class DartEntry : public AllStatic { 100 class DartEntry : public AllStatic {
101 public: 101 public:
102 // On success, returns a RawInstance. On failure, a RawError. 102 // On success, returns a RawInstance. On failure, a RawError.
103 typedef RawObject* (*invokestub)(uword entry_point, 103 typedef RawObject* (*invokestub)(uword entry_point,
104 const Array& arguments_descriptor, 104 const Array& arguments_descriptor,
105 const Array& arguments); 105 const Array& arguments,
106 Thread* thread);
106 107
107 // Invokes the specified instance function or static function. 108 // Invokes the specified instance function or static function.
108 // The first argument of an instance function is the receiver. 109 // The first argument of an instance function is the receiver.
109 // On success, returns a RawInstance. On failure, a RawError. 110 // On success, returns a RawInstance. On failure, a RawError.
110 // This is used when there are no named arguments in the call. 111 // This is used when there are no named arguments in the call.
111 static RawObject* InvokeFunction(const Function& function, 112 static RawObject* InvokeFunction(const Function& function,
112 const Array& arguments); 113 const Array& arguments);
113 114
114 // Invokes the specified instance, static, or closure function. 115 // Invokes the specified instance, static, or closure function.
115 // On success, returns a RawInstance. On failure, a RawError. 116 // On success, returns a RawInstance. On failure, a RawError.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // 167 //
167 // Returns null on success, a RawError on failure. 168 // Returns null on success, a RawError on failure.
168 static RawObject* MapSetAt(const Instance& map, 169 static RawObject* MapSetAt(const Instance& map,
169 const Instance& key, 170 const Instance& key,
170 const Instance& value); 171 const Instance& value);
171 }; 172 };
172 173
173 } // namespace dart 174 } // namespace dart
174 175
175 #endif // VM_DART_ENTRY_H_ 176 #endif // VM_DART_ENTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698