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

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

Issue 2835513002: Process generic function type arguments in more places (function type tests, (Closed)
Patch Set: address comments Created 3 years, 8 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/flag_list.h ('k') | runtime/vm/object.cc » ('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 RUNTIME_VM_OBJECT_H_ 5 #ifndef RUNTIME_VM_OBJECT_H_
6 #define RUNTIME_VM_OBJECT_H_ 6 #define RUNTIME_VM_OBJECT_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 2265 matching lines...) Expand 10 before | Expand all | Expand 10 after
2276 // TypeParameter. 2276 // TypeParameter.
2277 RawTypeArguments* type_parameters() const { 2277 RawTypeArguments* type_parameters() const {
2278 return raw_ptr()->type_parameters_; 2278 return raw_ptr()->type_parameters_;
2279 } 2279 }
2280 void set_type_parameters(const TypeArguments& value) const; 2280 void set_type_parameters(const TypeArguments& value) const;
2281 intptr_t NumTypeParameters(Thread* thread) const; 2281 intptr_t NumTypeParameters(Thread* thread) const;
2282 intptr_t NumTypeParameters() const { 2282 intptr_t NumTypeParameters() const {
2283 return NumTypeParameters(Thread::Current()); 2283 return NumTypeParameters(Thread::Current());
2284 } 2284 }
2285 2285
2286 // Returns true if this function has the same number of type parameters with
2287 // equal bounds as the other function. Type parameter names are ignored.
2288 bool HasSameTypeParametersAndBounds(const Function& other) const;
2289
2286 // Return the number of type parameters declared in parent generic functions. 2290 // Return the number of type parameters declared in parent generic functions.
2287 intptr_t NumParentTypeParameters() const; 2291 intptr_t NumParentTypeParameters() const;
2288 2292
2289 // Return a TypeParameter if the type_name is a type parameter of this 2293 // Return a TypeParameter if the type_name is a type parameter of this
2290 // function or of one of its parent functions. 2294 // function or of one of its parent functions.
2291 // Unless NULL, adjust function_level accordingly (in and out parameter). 2295 // Unless NULL, adjust function_level accordingly (in and out parameter).
2292 // Return null otherwise. 2296 // Return null otherwise.
2293 RawTypeParameter* LookupTypeParameter(const String& type_name, 2297 RawTypeParameter* LookupTypeParameter(const String& type_name,
2294 intptr_t* function_level) const; 2298 intptr_t* function_level) const;
2295 2299
(...skipping 6699 matching lines...) Expand 10 before | Expand all | Expand 10 after
8995 8999
8996 inline void TypeArguments::SetHash(intptr_t value) const { 9000 inline void TypeArguments::SetHash(intptr_t value) const {
8997 // This is only safe because we create a new Smi, which does not cause 9001 // This is only safe because we create a new Smi, which does not cause
8998 // heap allocation. 9002 // heap allocation.
8999 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 9003 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
9000 } 9004 }
9001 9005
9002 } // namespace dart 9006 } // namespace dart
9003 9007
9004 #endif // RUNTIME_VM_OBJECT_H_ 9008 #endif // RUNTIME_VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/flag_list.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698