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

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

Issue 2567163002: Use kFunctionCid instead of kIllegalCid to indicate that a generic function (Closed)
Patch Set: Created 4 years 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 | « no previous file | 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 6039 matching lines...) Expand 10 before | Expand all | Expand 10 after
6050 virtual bool IsMalbounded() const { return false; } 6050 virtual bool IsMalbounded() const { return false; }
6051 virtual bool IsMalformedOrMalbounded() const { return false; } 6051 virtual bool IsMalformedOrMalbounded() const { return false; }
6052 virtual bool IsResolved() const { return true; } 6052 virtual bool IsResolved() const { return true; }
6053 virtual bool HasResolvedTypeClass() const { return false; } 6053 virtual bool HasResolvedTypeClass() const { return false; }
6054 classid_t parameterized_class_id() const; 6054 classid_t parameterized_class_id() const;
6055 RawClass* parameterized_class() const; 6055 RawClass* parameterized_class() const;
6056 RawFunction* parameterized_function() const { 6056 RawFunction* parameterized_function() const {
6057 return raw_ptr()->parameterized_function_; 6057 return raw_ptr()->parameterized_function_;
6058 } 6058 }
6059 bool IsClassTypeParameter() const { 6059 bool IsClassTypeParameter() const {
6060 return parameterized_class_id() != kIllegalCid; 6060 return parameterized_class_id() != kFunctionCid;
6061 } 6061 }
6062 bool IsFunctionTypeParameter() const { 6062 bool IsFunctionTypeParameter() const {
6063 return parameterized_function() != Function::null(); 6063 return parameterized_function() != Function::null();
6064 } 6064 }
6065 RawString* name() const { return raw_ptr()->name_; } 6065 RawString* name() const { return raw_ptr()->name_; }
6066 intptr_t index() const { return raw_ptr()->index_; } 6066 intptr_t index() const { return raw_ptr()->index_; }
6067 void set_index(intptr_t value) const; 6067 void set_index(intptr_t value) const;
6068 intptr_t parent_level() const { return raw_ptr()->parent_level_; } 6068 intptr_t parent_level() const { return raw_ptr()->parent_level_; }
6069 RawAbstractType* bound() const { return raw_ptr()->bound_; } 6069 RawAbstractType* bound() const { return raw_ptr()->bound_; }
6070 void set_bound(const AbstractType& value) const; 6070 void set_bound(const AbstractType& value) const;
(...skipping 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after
8886 8886
8887 inline void TypeArguments::SetHash(intptr_t value) const { 8887 inline void TypeArguments::SetHash(intptr_t value) const {
8888 // This is only safe because we create a new Smi, which does not cause 8888 // This is only safe because we create a new Smi, which does not cause
8889 // heap allocation. 8889 // heap allocation.
8890 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 8890 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
8891 } 8891 }
8892 8892
8893 } // namespace dart 8893 } // namespace dart
8894 8894
8895 #endif // RUNTIME_VM_OBJECT_H_ 8895 #endif // RUNTIME_VM_OBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698