OLD | NEW |
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 2926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2937 // Add the given code object to the list of dependent ones. | 2937 // Add the given code object to the list of dependent ones. |
2938 void RegisterDependentCode(const Code& code) const; | 2938 void RegisterDependentCode(const Code& code) const; |
2939 | 2939 |
2940 // Deoptimize all dependent code objects. | 2940 // Deoptimize all dependent code objects. |
2941 void DeoptimizeDependentCode() const; | 2941 void DeoptimizeDependentCode() const; |
2942 | 2942 |
2943 bool IsUninitialized() const; | 2943 bool IsUninitialized() const; |
2944 | 2944 |
2945 void EvaluateInitializer() const; | 2945 void EvaluateInitializer() const; |
2946 | 2946 |
| 2947 // For static fields only. Constructs a closure that gets/sets the |
| 2948 // field value. |
| 2949 RawInstance* GetterClosure() const; |
| 2950 RawInstance* SetterClosure() const; |
| 2951 RawInstance* AccessorClosure(bool make_setter) const; |
| 2952 |
2947 // Constructs getter and setter names for fields and vice versa. | 2953 // Constructs getter and setter names for fields and vice versa. |
2948 static RawString* GetterName(const String& field_name); | 2954 static RawString* GetterName(const String& field_name); |
2949 static RawString* GetterSymbol(const String& field_name); | 2955 static RawString* GetterSymbol(const String& field_name); |
2950 static RawString* SetterName(const String& field_name); | 2956 static RawString* SetterName(const String& field_name); |
2951 static RawString* SetterSymbol(const String& field_name); | 2957 static RawString* SetterSymbol(const String& field_name); |
2952 static RawString* NameFromGetter(const String& getter_name); | 2958 static RawString* NameFromGetter(const String& getter_name); |
2953 static RawString* NameFromSetter(const String& setter_name); | 2959 static RawString* NameFromSetter(const String& setter_name); |
2954 static bool IsGetterName(const String& function_name); | 2960 static bool IsGetterName(const String& function_name); |
2955 static bool IsSetterName(const String& function_name); | 2961 static bool IsSetterName(const String& function_name); |
2956 | 2962 |
(...skipping 5049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8006 | 8012 |
8007 | 8013 |
8008 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8014 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8009 intptr_t index) { | 8015 intptr_t index) { |
8010 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8016 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8011 } | 8017 } |
8012 | 8018 |
8013 } // namespace dart | 8019 } // namespace dart |
8014 | 8020 |
8015 #endif // VM_OBJECT_H_ | 8021 #endif // VM_OBJECT_H_ |
OLD | NEW |