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

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

Issue 910313002: Rename IsConstructor to IsGenerativeConstructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 static intptr_t argv_offset() { return OFFSET_OF(NativeArguments, argv_); } 136 static intptr_t argv_offset() { return OFFSET_OF(NativeArguments, argv_); }
137 static intptr_t retval_offset() { 137 static intptr_t retval_offset() {
138 return OFFSET_OF(NativeArguments, retval_); 138 return OFFSET_OF(NativeArguments, retval_);
139 } 139 }
140 static intptr_t AutoSetupScopeMask() { 140 static intptr_t AutoSetupScopeMask() {
141 return AutoSetupScopeBits::mask_in_place(); 141 return AutoSetupScopeBits::mask_in_place();
142 } 142 }
143 143
144 static intptr_t ParameterCountForResolution(const Function& function) { 144 static intptr_t ParameterCountForResolution(const Function& function) {
145 ASSERT(function.is_native()); 145 ASSERT(function.is_native());
146 ASSERT(!function.IsConstructor()); // Not supported. 146 ASSERT(!function.IsGenerativeConstructor()); // Not supported.
147 intptr_t count = function.NumParameters(); 147 intptr_t count = function.NumParameters();
148 if (function.is_static() && function.IsClosureFunction()) { 148 if (function.is_static() && function.IsClosureFunction()) {
149 // The closure object is hidden and not accessible from native code. 149 // The closure object is hidden and not accessible from native code.
150 // However, if the function is an instance closure function, the captured 150 // However, if the function is an instance closure function, the captured
151 // receiver located in the context is made accessible in native code at 151 // receiver located in the context is made accessible in native code at
152 // index 0, thereby hidding the closure object at index 0. 152 // index 0, thereby hidding the closure object at index 0.
153 count--; 153 count--;
154 } 154 }
155 return count; 155 return count;
156 } 156 }
157 157
158 static int ComputeArgcTag(const Function& function) { 158 static int ComputeArgcTag(const Function& function) {
159 ASSERT(function.is_native()); 159 ASSERT(function.is_native());
160 ASSERT(!function.IsConstructor()); // Not supported. 160 ASSERT(!function.IsGenerativeConstructor()); // Not supported.
161 int tag = ArgcBits::encode(function.NumParameters()); 161 int tag = ArgcBits::encode(function.NumParameters());
162 int function_bits = 0; 162 int function_bits = 0;
163 if (!function.is_static()) { 163 if (!function.is_static()) {
164 function_bits |= kInstanceFunctionBit; 164 function_bits |= kInstanceFunctionBit;
165 } 165 }
166 if (function.IsClosureFunction()) { 166 if (function.IsClosureFunction()) {
167 function_bits |= kClosureFunctionBit; 167 function_bits |= kClosureFunctionBit;
168 } 168 }
169 tag = FunctionBits::update(function_bits, tag); 169 tag = FunctionBits::update(function_bits, tag);
170 if (function.IsNativeAutoSetupScope()) { 170 if (function.IsNativeAutoSetupScope()) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 Isolate* isolate_; // Current isolate pointer. 224 Isolate* isolate_; // Current isolate 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/flow_graph_type_propagator.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698