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

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

Issue 1644223006: Fix some more shorten-64-to-32 warnings: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. 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
« no previous file with comments | « runtime/vm/locations.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 kInstanceFunctionBit = 1, 182 kInstanceFunctionBit = 1,
183 kClosureFunctionBit = 2, 183 kClosureFunctionBit = 2,
184 }; 184 };
185 enum ArgcTagBits { 185 enum ArgcTagBits {
186 kArgcBit = 0, 186 kArgcBit = 0,
187 kArgcSize = 24, 187 kArgcSize = 24,
188 kFunctionBit = 24, 188 kFunctionBit = 24,
189 kFunctionSize = 2, 189 kFunctionSize = 2,
190 kAutoSetupScopeBit = 26, 190 kAutoSetupScopeBit = 26,
191 }; 191 };
192 class ArgcBits : public BitField<int, kArgcBit, kArgcSize> {}; 192 class ArgcBits : public BitField<intptr_t, int32_t, kArgcBit, kArgcSize> {};
193 class FunctionBits : public BitField<int, kFunctionBit, kFunctionSize> {}; 193 class FunctionBits :
194 class AutoSetupScopeBits : public BitField<int, kAutoSetupScopeBit, 1> {}; 194 public BitField<intptr_t, int, kFunctionBit, kFunctionSize> {};
195 class AutoSetupScopeBits :
196 public BitField<intptr_t, int, kAutoSetupScopeBit, 1> {};
195 friend class Api; 197 friend class Api;
196 friend class BootstrapNatives; 198 friend class BootstrapNatives;
197 friend class Simulator; 199 friend class Simulator;
198 200
199 // Since this function is passed a RawObject directly, we need to be 201 // Since this function is passed a RawObject directly, we need to be
200 // exceedingly careful when we use it. If there are any other side 202 // exceedingly careful when we use it. If there are any other side
201 // effects in the statement that may cause GC, it could lead to 203 // effects in the statement that may cause GC, it could lead to
202 // bugs. 204 // bugs.
203 void SetReturnUnsafe(RawObject* value) const { 205 void SetReturnUnsafe(RawObject* value) const {
204 *retval_ = value; 206 *retval_ = value;
(...skipping 14 matching lines...) Expand all
219 // In the instance closure function case, the receiver is accessed from 221 // In the instance closure function case, the receiver is accessed from
220 // the context and the closure at index 0 is hidden, so the apparent 222 // the context and the closure at index 0 is hidden, so the apparent
221 // argument count remains unchanged. 223 // argument count remains unchanged.
222 if (function_bits == kClosureFunctionBit) { 224 if (function_bits == kClosureFunctionBit) {
223 return 1; 225 return 1;
224 } 226 }
225 return 0; 227 return 0;
226 } 228 }
227 229
228 Thread* thread_; // Current thread pointer. 230 Thread* thread_; // Current thread pointer.
229 int argc_tag_; // Encodes argument count and invoked native call type. 231 intptr_t argc_tag_; // Encodes argument count and invoked native call type.
230 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call. 232 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call.
231 RawObject** retval_; // Pointer to the return value area. 233 RawObject** retval_; // Pointer to the return value area.
232 }; 234 };
233 235
234 } // namespace dart 236 } // namespace dart
235 237
236 #endif // VM_NATIVE_ARGUMENTS_H_ 238 #endif // VM_NATIVE_ARGUMENTS_H_
OLDNEW
« no previous file with comments | « runtime/vm/locations.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698