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

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

Issue 2759393005: Cleanup change. (Closed)
Patch Set: Created 3 years, 9 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/jit_optimizer.cc ('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 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after
2192 RawType* SignatureType() const; 2192 RawType* SignatureType() const;
2193 2193
2194 // Update the signature type (with a canonical version). 2194 // Update the signature type (with a canonical version).
2195 void SetSignatureType(const Type& value) const; 2195 void SetSignatureType(const Type& value) const;
2196 2196
2197 // Build a string of the form 'C<T, R>(T, {B b, C c}) => R' representing the 2197 // Build a string of the form 'C<T, R>(T, {B b, C c}) => R' representing the
2198 // internal signature of the given function. In this example, T and R are 2198 // internal signature of the given function. In this example, T and R are
2199 // type parameters of class C, the owner of the function. 2199 // type parameters of class C, the owner of the function.
2200 RawString* Signature() const { 2200 RawString* Signature() const {
2201 const bool instantiate = false; 2201 const bool instantiate = false;
2202 return BuildSignature(instantiate, kInternalName, TypeArguments::Handle()); 2202 return BuildSignature(instantiate, kInternalName,
2203 Object::null_type_arguments());
2203 } 2204 }
2204 2205
2205 // Build a string of the form '(T, {B b, C c}) => R' representing the 2206 // Build a string of the form '(T, {B b, C c}) => R' representing the
2206 // user visible signature of the given function. In this example, T and R are 2207 // user visible signature of the given function. In this example, T and R are
2207 // type parameters of class C, the owner of the function, also called the 2208 // type parameters of class C, the owner of the function, also called the
2208 // scope class of the function type. 2209 // scope class of the function type.
2209 // Implicit parameters are hidden, as well as the prefix denoting the 2210 // Implicit parameters are hidden, as well as the prefix denoting the
2210 // scope class and its type parameters. 2211 // scope class and its type parameters.
2211 RawString* UserVisibleSignature() const { 2212 RawString* UserVisibleSignature() const {
2212 const bool instantiate = false; 2213 const bool instantiate = false;
2213 return BuildSignature(instantiate, kUserVisibleName, 2214 return BuildSignature(instantiate, kUserVisibleName,
2214 TypeArguments::Handle()); 2215 Object::null_type_arguments());
2215 } 2216 }
2216 2217
2217 // Build a string of the form '(A, {B b, C c}) => D' representing the 2218 // Build a string of the form '(A, {B b, C c}) => D' representing the
2218 // signature of the given function, where all generic types (e.g. '<T, R>' in 2219 // signature of the given function, where all generic types (e.g. '<T, R>' in
2219 // 'C<T, R>(T, {B b, C c}) => R') are instantiated using the given 2220 // 'C<T, R>(T, {B b, C c}) => R') are instantiated using the given
2220 // instantiator type argument vector of a C instance (e.g. '<A, D>'). 2221 // instantiator type argument vector of a C instance (e.g. '<A, D>').
2221 RawString* InstantiatedSignatureFrom(const TypeArguments& instantiator, 2222 RawString* InstantiatedSignatureFrom(const TypeArguments& instantiator,
2222 NameVisibility name_visibility) const { 2223 NameVisibility name_visibility) const {
2223 const bool instantiate = true; 2224 const bool instantiate = true;
2224 return BuildSignature(instantiate, name_visibility, instantiator); 2225 return BuildSignature(instantiate, name_visibility, instantiator);
(...skipping 6724 matching lines...) Expand 10 before | Expand all | Expand 10 after
8949 8950
8950 inline void TypeArguments::SetHash(intptr_t value) const { 8951 inline void TypeArguments::SetHash(intptr_t value) const {
8951 // This is only safe because we create a new Smi, which does not cause 8952 // This is only safe because we create a new Smi, which does not cause
8952 // heap allocation. 8953 // heap allocation.
8953 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 8954 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
8954 } 8955 }
8955 8956
8956 } // namespace dart 8957 } // namespace dart
8957 8958
8958 #endif // RUNTIME_VM_OBJECT_H_ 8959 #endif // RUNTIME_VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/jit_optimizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698