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 5104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5115 // nesting level are not preserved, since they are only used until the context | 5115 // nesting level are not preserved, since they are only used until the context |
5116 // level is assigned. In addition the ContextScope has a field 'is_implicit' | 5116 // level is assigned. In addition the ContextScope has a field 'is_implicit' |
5117 // which is true if the ContextScope was created for an implicit closure. | 5117 // which is true if the ContextScope was created for an implicit closure. |
5118 class ContextScope : public Object { | 5118 class ContextScope : public Object { |
5119 public: | 5119 public: |
5120 intptr_t num_variables() const { return raw_ptr()->num_variables_; } | 5120 intptr_t num_variables() const { return raw_ptr()->num_variables_; } |
5121 | 5121 |
5122 TokenPosition TokenIndexAt(intptr_t scope_index) const; | 5122 TokenPosition TokenIndexAt(intptr_t scope_index) const; |
5123 void SetTokenIndexAt(intptr_t scope_index, TokenPosition token_pos) const; | 5123 void SetTokenIndexAt(intptr_t scope_index, TokenPosition token_pos) const; |
5124 | 5124 |
| 5125 TokenPosition DeclarationTokenIndexAt(intptr_t scope_index) const; |
| 5126 void SetDeclarationTokenIndexAt(intptr_t scope_index, |
| 5127 TokenPosition declaration_token_pos) const; |
| 5128 |
5125 RawString* NameAt(intptr_t scope_index) const; | 5129 RawString* NameAt(intptr_t scope_index) const; |
5126 void SetNameAt(intptr_t scope_index, const String& name) const; | 5130 void SetNameAt(intptr_t scope_index, const String& name) const; |
5127 | 5131 |
5128 bool IsFinalAt(intptr_t scope_index) const; | 5132 bool IsFinalAt(intptr_t scope_index) const; |
5129 void SetIsFinalAt(intptr_t scope_index, bool is_final) const; | 5133 void SetIsFinalAt(intptr_t scope_index, bool is_final) const; |
5130 | 5134 |
5131 bool IsConstAt(intptr_t scope_index) const; | 5135 bool IsConstAt(intptr_t scope_index) const; |
5132 void SetIsConstAt(intptr_t scope_index, bool is_const) const; | 5136 void SetIsConstAt(intptr_t scope_index, bool is_const) const; |
5133 | 5137 |
5134 RawAbstractType* TypeAt(intptr_t scope_index) const; | 5138 RawAbstractType* TypeAt(intptr_t scope_index) const; |
(...skipping 3843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8978 | 8982 |
8979 inline void TypeArguments::SetHash(intptr_t value) const { | 8983 inline void TypeArguments::SetHash(intptr_t value) const { |
8980 // This is only safe because we create a new Smi, which does not cause | 8984 // This is only safe because we create a new Smi, which does not cause |
8981 // heap allocation. | 8985 // heap allocation. |
8982 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); | 8986 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); |
8983 } | 8987 } |
8984 | 8988 |
8985 } // namespace dart | 8989 } // namespace dart |
8986 | 8990 |
8987 #endif // VM_OBJECT_H_ | 8991 #endif // VM_OBJECT_H_ |
OLD | NEW |