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

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

Issue 1584223006: Remove signature classes from the VM. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 11 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/mirrors_api_impl.cc ('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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 int function_bits = FunctionBits::decode(argc_tag_); 100 int function_bits = FunctionBits::decode(argc_tag_);
101 return ArgCount() - NumHiddenArgs(function_bits); 101 return ArgCount() - NumHiddenArgs(function_bits);
102 } 102 }
103 103
104 RawObject* NativeArg0() const { 104 RawObject* NativeArg0() const {
105 int function_bits = FunctionBits::decode(argc_tag_); 105 int function_bits = FunctionBits::decode(argc_tag_);
106 if (function_bits == (kClosureFunctionBit | kInstanceFunctionBit)) { 106 if (function_bits == (kClosureFunctionBit | kInstanceFunctionBit)) {
107 // Retrieve the receiver from the context. 107 // Retrieve the receiver from the context.
108 const Object& closure = Object::Handle(ArgAt(0)); 108 const Object& closure = Object::Handle(ArgAt(0));
109 const Context& context = 109 const Context& context =
110 Context::Handle(Closure::context(Instance::Cast(closure))); 110 Context::Handle(Closure::Cast(closure).context());
111 return context.At(0); 111 return context.At(0);
112 } 112 }
113 return ArgAt(NumHiddenArgs(function_bits)); 113 return ArgAt(NumHiddenArgs(function_bits));
114 } 114 }
115 115
116 RawObject* NativeArgAt(int index) const { 116 RawObject* NativeArgAt(int index) const {
117 ASSERT((index >= 0) && (index < NativeArgCount())); 117 ASSERT((index >= 0) && (index < NativeArgCount()));
118 if (index == 0) { 118 if (index == 0) {
119 return NativeArg0(); 119 return NativeArg0();
120 } 120 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 Thread* thread_; // Current thread pointer. 224 Thread* thread_; // Current thread pointer.
225 int argc_tag_; // Encodes argument count and invoked native call type. 225 int argc_tag_; // Encodes argument count and invoked native call type.
226 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call. 226 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call.
227 RawObject** retval_; // Pointer to the return value area. 227 RawObject** retval_; // Pointer to the return value area.
228 }; 228 };
229 229
230 } // namespace dart 230 } // namespace dart
231 231
232 #endif // VM_NATIVE_ARGUMENTS_H_ 232 #endif // VM_NATIVE_ARGUMENTS_H_
OLDNEW
« no previous file with comments | « runtime/vm/mirrors_api_impl.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698