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

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

Issue 18801007: Support type parameters and classes as expression in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/intermediate_language_x64.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 VM_OBJECT_H_ 5 #ifndef VM_OBJECT_H_
6 #define VM_OBJECT_H_ 6 #define 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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 return raw_ptr()->type_parameters_; 681 return raw_ptr()->type_parameters_;
682 } 682 }
683 void set_type_parameters(const TypeArguments& value) const; 683 void set_type_parameters(const TypeArguments& value) const;
684 intptr_t NumTypeParameters() const; 684 intptr_t NumTypeParameters() const;
685 static intptr_t type_parameters_offset() { 685 static intptr_t type_parameters_offset() {
686 return OFFSET_OF(RawClass, type_parameters_); 686 return OFFSET_OF(RawClass, type_parameters_);
687 } 687 }
688 688
689 // Return a TypeParameter if the type_name is a type parameter of this class. 689 // Return a TypeParameter if the type_name is a type parameter of this class.
690 // Return null otherwise. 690 // Return null otherwise.
691 RawTypeParameter* LookupTypeParameter(const String& type_name, 691 RawTypeParameter* LookupTypeParameter(const String& type_name) const;
692 intptr_t token_pos) const;
693 692
694 // The type argument vector is flattened and includes the type arguments of 693 // The type argument vector is flattened and includes the type arguments of
695 // the super class. 694 // the super class.
696 bool HasTypeArguments() const; 695 bool HasTypeArguments() const;
697 intptr_t NumTypeArguments() const; 696 intptr_t NumTypeArguments() const;
698 697
699 // If this class is parameterized, each instance has a type_arguments field. 698 // If this class is parameterized, each instance has a type_arguments field.
700 static const intptr_t kNoTypeArguments = -1; 699 static const intptr_t kNoTypeArguments = -1;
701 intptr_t type_arguments_field_offset() const { 700 intptr_t type_arguments_field_offset() const {
702 ASSERT(is_type_finalized() || is_prefinalized()); 701 ASSERT(is_type_finalized() || is_prefinalized());
(...skipping 5268 matching lines...) Expand 10 before | Expand all | Expand 10 after
5971 5970
5972 5971
5973 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, 5972 RawObject* MegamorphicCache::GetTargetFunction(const Array& array,
5974 intptr_t index) { 5973 intptr_t index) {
5975 return array.At((index * kEntryLength) + kTargetFunctionIndex); 5974 return array.At((index * kEntryLength) + kTargetFunctionIndex);
5976 } 5975 }
5977 5976
5978 } // namespace dart 5977 } // namespace dart
5979 5978
5980 #endif // VM_OBJECT_H_ 5979 #endif // VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698