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

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

Issue 1663613002: Dart_SetReturnValue now accepts and propagates error handles. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_NATIVE_ARGUMENTS_H_ 5 #ifndef VM_NATIVE_ARGUMENTS_H_
6 #define VM_NATIVE_ARGUMENTS_H_ 6 #define VM_NATIVE_ARGUMENTS_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/memory_sanitizer.h" 9 #include "platform/memory_sanitizer.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 int function_bits = FunctionBits::decode(argc_tag_); 125 int function_bits = FunctionBits::decode(argc_tag_);
126 const int actual_index = index + NumHiddenArgs(function_bits); 126 const int actual_index = index + NumHiddenArgs(function_bits);
127 return ArgAt(actual_index); 127 return ArgAt(actual_index);
128 } 128 }
129 129
130 void SetReturn(const Object& value) const { 130 void SetReturn(const Object& value) const {
131 *retval_ = value.raw(); 131 *retval_ = value.raw();
132 } 132 }
133 133
134 RawObject* ReturnValue() const {
135 return *retval_;
136 }
137
134 static intptr_t thread_offset() { 138 static intptr_t thread_offset() {
135 return OFFSET_OF(NativeArguments, thread_); 139 return OFFSET_OF(NativeArguments, thread_);
136 } 140 }
137 static intptr_t argc_tag_offset() { 141 static intptr_t argc_tag_offset() {
138 return OFFSET_OF(NativeArguments, argc_tag_); 142 return OFFSET_OF(NativeArguments, argc_tag_);
139 } 143 }
140 static intptr_t argv_offset() { return OFFSET_OF(NativeArguments, argv_); } 144 static intptr_t argv_offset() { return OFFSET_OF(NativeArguments, argv_); }
141 static intptr_t retval_offset() { 145 static intptr_t retval_offset() {
142 return OFFSET_OF(NativeArguments, retval_); 146 return OFFSET_OF(NativeArguments, retval_);
143 } 147 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 231
228 Thread* thread_; // Current thread pointer. 232 Thread* thread_; // Current thread pointer.
229 int argc_tag_; // Encodes argument count and invoked native call type. 233 int argc_tag_; // Encodes argument count and invoked native call type.
230 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call. 234 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call.
231 RawObject** retval_; // Pointer to the return value area. 235 RawObject** retval_; // Pointer to the return value area.
232 }; 236 };
233 237
234 } // namespace dart 238 } // namespace dart
235 239
236 #endif // VM_NATIVE_ARGUMENTS_H_ 240 #endif // VM_NATIVE_ARGUMENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698