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

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

Issue 2632253002: VM: [Kernel] Partial support for metadata annotations (Closed)
Patch Set: Address comments Created 3 years, 11 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/kernel_to_il.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 13 matching lines...) Expand all
24 #include "vm/scanner.h" 24 #include "vm/scanner.h"
25 #include "vm/tags.h" 25 #include "vm/tags.h"
26 #include "vm/thread.h" 26 #include "vm/thread.h"
27 #include "vm/token_position.h" 27 #include "vm/token_position.h"
28 28
29 namespace dart { 29 namespace dart {
30 30
31 // Forward declarations. 31 // Forward declarations.
32 namespace kernel { 32 namespace kernel {
33 class Program; 33 class Program;
34 class TreeNode;
34 } 35 }
35 36
36 #define DEFINE_FORWARD_DECLARATION(clazz) class clazz; 37 #define DEFINE_FORWARD_DECLARATION(clazz) class clazz;
37 CLASS_LIST(DEFINE_FORWARD_DECLARATION) 38 CLASS_LIST(DEFINE_FORWARD_DECLARATION)
38 #undef DEFINE_FORWARD_DECLARATION 39 #undef DEFINE_FORWARD_DECLARATION
39 class Api; 40 class Api;
40 class ArgumentsDescriptor; 41 class ArgumentsDescriptor;
41 class Assembler; 42 class Assembler;
42 class Closure; 43 class Closure;
43 class Code; 44 class Code;
(...skipping 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after
3755 // look in the scopes of all libraries that are imported 3756 // look in the scopes of all libraries that are imported
3756 // without a library prefix. 3757 // without a library prefix.
3757 RawObject* ResolveName(const String& name) const; 3758 RawObject* ResolveName(const String& name) const;
3758 3759
3759 void AddAnonymousClass(const Class& cls) const; 3760 void AddAnonymousClass(const Class& cls) const;
3760 3761
3761 void AddExport(const Namespace& ns) const; 3762 void AddExport(const Namespace& ns) const;
3762 3763
3763 void AddClassMetadata(const Class& cls, 3764 void AddClassMetadata(const Class& cls,
3764 const Object& tl_owner, 3765 const Object& tl_owner,
3765 TokenPosition token_pos) const; 3766 TokenPosition token_pos,
3766 void AddFieldMetadata(const Field& field, TokenPosition token_pos) const; 3767 kernel::TreeNode* kernel_node = NULL) const;
3767 void AddFunctionMetadata(const Function& func, TokenPosition token_pos) const; 3768 void AddFieldMetadata(const Field& field,
3769 TokenPosition token_pos,
3770 kernel::TreeNode* kernel_node = NULL) const;
3771 void AddFunctionMetadata(const Function& func,
3772 TokenPosition token_pos,
3773 kernel::TreeNode* kernel_node = NULL) const;
3768 void AddLibraryMetadata(const Object& tl_owner, 3774 void AddLibraryMetadata(const Object& tl_owner,
3769 TokenPosition token_pos) const; 3775 TokenPosition token_pos) const;
3770 void AddTypeParameterMetadata(const TypeParameter& param, 3776 void AddTypeParameterMetadata(const TypeParameter& param,
3771 TokenPosition token_pos) const; 3777 TokenPosition token_pos) const;
3772 RawObject* GetMetadata(const Object& obj) const; 3778 RawObject* GetMetadata(const Object& obj) const;
3773 3779
3774 RawClass* toplevel_class() const { return raw_ptr()->toplevel_class_; } 3780 RawClass* toplevel_class() const { return raw_ptr()->toplevel_class_; }
3775 void set_toplevel_class(const Class& value) const; 3781 void set_toplevel_class(const Class& value) const;
3776 3782
3777 RawGrowableObjectArray* patch_classes() const { 3783 RawGrowableObjectArray* patch_classes() const {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
3924 void GrowDictionary(const Array& dict, intptr_t dict_size) const; 3930 void GrowDictionary(const Array& dict, intptr_t dict_size) const;
3925 static RawLibrary* NewLibraryHelper(const String& url, bool import_core_lib); 3931 static RawLibrary* NewLibraryHelper(const String& url, bool import_core_lib);
3926 RawObject* LookupEntry(const String& name, intptr_t* index) const; 3932 RawObject* LookupEntry(const String& name, intptr_t* index) const;
3927 3933
3928 void AllocatePrivateKey() const; 3934 void AllocatePrivateKey() const;
3929 3935
3930 RawString* MakeMetadataName(const Object& obj) const; 3936 RawString* MakeMetadataName(const Object& obj) const;
3931 RawField* GetMetadataField(const String& metaname) const; 3937 RawField* GetMetadataField(const String& metaname) const;
3932 void AddMetadata(const Object& owner, 3938 void AddMetadata(const Object& owner,
3933 const String& name, 3939 const String& name,
3934 TokenPosition token_pos) const; 3940 TokenPosition token_pos,
3941 kernel::TreeNode* kernel_node = NULL) const;
3935 3942
3936 FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object); 3943 FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object);
3937 3944
3938 friend class Bootstrap; 3945 friend class Bootstrap;
3939 friend class Class; 3946 friend class Class;
3940 friend class Debugger; 3947 friend class Debugger;
3941 friend class Isolate; 3948 friend class Isolate;
3942 friend class DictionaryIterator; 3949 friend class DictionaryIterator;
3943 friend class Namespace; 3950 friend class Namespace;
3944 friend class Object; 3951 friend class Object;
(...skipping 4993 matching lines...) Expand 10 before | Expand all | Expand 10 after
8938 8945
8939 inline void TypeArguments::SetHash(intptr_t value) const { 8946 inline void TypeArguments::SetHash(intptr_t value) const {
8940 // This is only safe because we create a new Smi, which does not cause 8947 // This is only safe because we create a new Smi, which does not cause
8941 // heap allocation. 8948 // heap allocation.
8942 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 8949 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
8943 } 8950 }
8944 8951
8945 } // namespace dart 8952 } // namespace dart
8946 8953
8947 #endif // RUNTIME_VM_OBJECT_H_ 8954 #endif // RUNTIME_VM_OBJECT_H_
OLDNEW
« no previous file with comments | « runtime/vm/kernel_to_il.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698