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

Unified Diff: runtime/vm/native_arguments.h

Issue 8528010: Changes to pass the current isolate to all runtime and native calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_arguments.h
===================================================================
--- runtime/vm/native_arguments.h (revision 1496)
+++ runtime/vm/native_arguments.h (working copy)
@@ -10,6 +10,7 @@
namespace dart {
// Forward declarations.
+class Isolate;
class Object;
class RawObject;
@@ -31,6 +32,7 @@
// subclass of ValueObject.
class NativeArguments {
public:
+ Isolate* isolate() const { return isolate_; }
int Count() const { return argc_; }
RawObject* At(int index) const {
@@ -40,6 +42,9 @@
void SetReturn(const Object& value) const;
+ static intptr_t isolate_offset() {
+ return OFFSET_OF(NativeArguments, isolate_);
+ }
static intptr_t argc_offset() { return OFFSET_OF(NativeArguments, argc_); }
static intptr_t argv_offset() { return OFFSET_OF(NativeArguments, argv_); }
static intptr_t retval_offset() {
@@ -47,6 +52,7 @@
}
private:
+ Isolate* isolate_; // Current isolate pointer.
int argc_; // Number of arguments passed to the runtime call.
RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call.
RawObject** retval_; // Pointer to the return value area.
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698