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

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

Issue 2821233005: Allow signature functions to be allocated in new space. (Closed)
Patch Set: 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 | « 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 2804 matching lines...) Expand 10 before | Expand all | Expand 10 after
2815 bool is_static); 2815 bool is_static);
2816 2816
2817 static RawFunction* New(const String& name, 2817 static RawFunction* New(const String& name,
2818 RawFunction::Kind kind, 2818 RawFunction::Kind kind,
2819 bool is_static, 2819 bool is_static,
2820 bool is_const, 2820 bool is_const,
2821 bool is_abstract, 2821 bool is_abstract,
2822 bool is_external, 2822 bool is_external,
2823 bool is_native, 2823 bool is_native,
2824 const Object& owner, 2824 const Object& owner,
2825 TokenPosition token_pos); 2825 TokenPosition token_pos,
2826 Heap::Space space = Heap::kOld);
2826 2827
2827 // Allocates a new Function object representing a closure function. 2828 // Allocates a new Function object representing a closure function.
2828 static RawFunction* NewClosureFunction(const String& name, 2829 static RawFunction* NewClosureFunction(const String& name,
2829 const Function& parent, 2830 const Function& parent,
2830 TokenPosition token_pos); 2831 TokenPosition token_pos);
2831 2832
2832 // Allocates a new Function object representing a signature function. 2833 // Allocates a new Function object representing a signature function.
2833 // The owner is the scope class of the function type. 2834 // The owner is the scope class of the function type.
2834 static RawFunction* NewSignatureFunction(const Object& owner, 2835 static RawFunction* NewSignatureFunction(const Object& owner,
2835 TokenPosition token_pos); 2836 TokenPosition token_pos,
2837 Heap::Space space = Heap::kOld);
2836 2838
2837 static RawFunction* NewEvalFunction(const Class& owner, 2839 static RawFunction* NewEvalFunction(const Class& owner,
2838 const Script& script, 2840 const Script& script,
2839 bool is_static); 2841 bool is_static);
2840 2842
2841 RawFunction* CreateMethodExtractor(const String& getter_name) const; 2843 RawFunction* CreateMethodExtractor(const String& getter_name) const;
2842 RawFunction* GetMethodExtractor(const String& getter_name) const; 2844 RawFunction* GetMethodExtractor(const String& getter_name) const;
2843 2845
2844 // Allocate new function object, clone values from this function. The 2846 // Allocate new function object, clone values from this function. The
2845 // owner of the clone is new_owner. 2847 // owner of the clone is new_owner.
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2990 RawFunction* implicit_closure_function() const; 2992 RawFunction* implicit_closure_function() const;
2991 void set_implicit_closure_function(const Function& value) const; 2993 void set_implicit_closure_function(const Function& value) const;
2992 RawInstance* implicit_static_closure() const; 2994 RawInstance* implicit_static_closure() const;
2993 void set_implicit_static_closure(const Instance& closure) const; 2995 void set_implicit_static_closure(const Instance& closure) const;
2994 RawScript* eval_script() const; 2996 RawScript* eval_script() const;
2995 void set_eval_script(const Script& value) const; 2997 void set_eval_script(const Script& value) const;
2996 void set_num_optional_parameters(intptr_t value) const; // Encoded value. 2998 void set_num_optional_parameters(intptr_t value) const; // Encoded value.
2997 void set_kind_tag(uint32_t value) const; 2999 void set_kind_tag(uint32_t value) const;
2998 void set_data(const Object& value) const; 3000 void set_data(const Object& value) const;
2999 3001
3000 static RawFunction* New(); 3002 static RawFunction* New(Heap::Space space = Heap::kOld);
3001 3003
3002 RawString* QualifiedName(NameVisibility name_visibility) const; 3004 RawString* QualifiedName(NameVisibility name_visibility) const;
3003 3005
3004 void BuildSignatureParameters( 3006 void BuildSignatureParameters(
3005 Thread* thread, 3007 Thread* thread,
3006 Zone* zone, 3008 Zone* zone,
3007 NameVisibility name_visibility, 3009 NameVisibility name_visibility,
3008 GrowableHandlePtrArray<const String>* pieces) const; 3010 GrowableHandlePtrArray<const String>* pieces) const;
3009 RawString* BuildSignature(NameVisibility name_visibility) const; 3011 RawString* BuildSignature(NameVisibility name_visibility) const;
3010 3012
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
3070 3072
3071 private: 3073 private:
3072 // Enclosing function of this signature function. 3074 // Enclosing function of this signature function.
3073 RawFunction* parent_function() const { return raw_ptr()->parent_function_; } 3075 RawFunction* parent_function() const { return raw_ptr()->parent_function_; }
3074 void set_parent_function(const Function& value) const; 3076 void set_parent_function(const Function& value) const;
3075 3077
3076 // Signature type of this signature function. 3078 // Signature type of this signature function.
3077 RawType* signature_type() const { return raw_ptr()->signature_type_; } 3079 RawType* signature_type() const { return raw_ptr()->signature_type_; }
3078 void set_signature_type(const Type& value) const; 3080 void set_signature_type(const Type& value) const;
3079 3081
3080 static RawSignatureData* New(); 3082 static RawSignatureData* New(Heap::Space space = Heap::kOld);
3081 3083
3082 FINAL_HEAP_OBJECT_IMPLEMENTATION(SignatureData, Object); 3084 FINAL_HEAP_OBJECT_IMPLEMENTATION(SignatureData, Object);
3083 friend class Class; 3085 friend class Class;
3084 friend class Function; 3086 friend class Function;
3085 friend class HeapProfiler; 3087 friend class HeapProfiler;
3086 }; 3088 };
3087 3089
3088 3090
3089 class RedirectionData : public Object { 3091 class RedirectionData : public Object {
3090 public: 3092 public:
(...skipping 5901 matching lines...) Expand 10 before | Expand all | Expand 10 after
8992 8994
8993 inline void TypeArguments::SetHash(intptr_t value) const { 8995 inline void TypeArguments::SetHash(intptr_t value) const {
8994 // This is only safe because we create a new Smi, which does not cause 8996 // This is only safe because we create a new Smi, which does not cause
8995 // heap allocation. 8997 // heap allocation.
8996 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 8998 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
8997 } 8999 }
8998 9000
8999 } // namespace dart 9001 } // namespace dart
9000 9002
9001 #endif // RUNTIME_VM_OBJECT_H_ 9003 #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