Chromium Code Reviews| 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_SCOPES_H_ | 5 #ifndef VM_SCOPES_H_ |
| 6 #define VM_SCOPES_H_ | 6 #define VM_SCOPES_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 : token_pos_(token_pos), | 27 : token_pos_(token_pos), |
| 28 name_(name), | 28 name_(name), |
| 29 owner_(NULL), | 29 owner_(NULL), |
| 30 type_(type), | 30 type_(type), |
| 31 const_value_(NULL), | 31 const_value_(NULL), |
| 32 is_final_(false), | 32 is_final_(false), |
| 33 is_captured_(false), | 33 is_captured_(false), |
| 34 is_invisible_(false), | 34 is_invisible_(false), |
| 35 is_captured_parameter_(false), | 35 is_captured_parameter_(false), |
| 36 index_(LocalVariable::kUninitializedIndex) { | 36 index_(LocalVariable::kUninitializedIndex) { |
| 37 ASSERT(type.IsZoneHandle()); | 37 ASSERT(type.IsZoneHandle() || type.IsReadOnlyHandle()); |
|
Florian Schneider
2015/10/27 11:49:00
Equivalent to type.IsNotTemporaryScopedHandle().
| |
| 38 ASSERT(type.IsFinalized()); | 38 ASSERT(type.IsFinalized()); |
| 39 ASSERT(name.IsSymbol()); | 39 ASSERT(name.IsSymbol()); |
| 40 } | 40 } |
| 41 | 41 |
| 42 intptr_t token_pos() const { return token_pos_; } | 42 intptr_t token_pos() const { return token_pos_; } |
| 43 const String& name() const { return name_; } | 43 const String& name() const { return name_; } |
| 44 LocalScope* owner() const { return owner_; } | 44 LocalScope* owner() const { return owner_; } |
| 45 void set_owner(LocalScope* owner) { | 45 void set_owner(LocalScope* owner) { |
| 46 ASSERT(owner_ == NULL); | 46 ASSERT(owner_ == NULL); |
| 47 owner_ = owner; | 47 owner_ = owner; |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 375 // List of names referenced in this scope and its children that | 375 // List of names referenced in this scope and its children that |
| 376 // are not resolved to local variables. | 376 // are not resolved to local variables. |
| 377 GrowableArray<NameReference*> referenced_; | 377 GrowableArray<NameReference*> referenced_; |
| 378 | 378 |
| 379 DISALLOW_COPY_AND_ASSIGN(LocalScope); | 379 DISALLOW_COPY_AND_ASSIGN(LocalScope); |
| 380 }; | 380 }; |
| 381 | 381 |
| 382 } // namespace dart | 382 } // namespace dart |
| 383 | 383 |
| 384 #endif // VM_SCOPES_H_ | 384 #endif // VM_SCOPES_H_ |
| OLD | NEW |