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

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

Issue 2419013004: Add local variable declaration token position to service protocol (Closed)
Patch Set: ... Created 4 years, 2 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 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 5133 matching lines...) Expand 10 before | Expand all | Expand 10 after
5144 // nesting level are not preserved, since they are only used until the context 5144 // nesting level are not preserved, since they are only used until the context
5145 // level is assigned. In addition the ContextScope has a field 'is_implicit' 5145 // level is assigned. In addition the ContextScope has a field 'is_implicit'
5146 // which is true if the ContextScope was created for an implicit closure. 5146 // which is true if the ContextScope was created for an implicit closure.
5147 class ContextScope : public Object { 5147 class ContextScope : public Object {
5148 public: 5148 public:
5149 intptr_t num_variables() const { return raw_ptr()->num_variables_; } 5149 intptr_t num_variables() const { return raw_ptr()->num_variables_; }
5150 5150
5151 TokenPosition TokenIndexAt(intptr_t scope_index) const; 5151 TokenPosition TokenIndexAt(intptr_t scope_index) const;
5152 void SetTokenIndexAt(intptr_t scope_index, TokenPosition token_pos) const; 5152 void SetTokenIndexAt(intptr_t scope_index, TokenPosition token_pos) const;
5153 5153
5154 TokenPosition DeclarationTokenIndexAt(intptr_t scope_index) const;
5155 void SetDeclarationTokenIndexAt(intptr_t scope_index,
5156 TokenPosition declaration_token_pos) const;
5157
5154 RawString* NameAt(intptr_t scope_index) const; 5158 RawString* NameAt(intptr_t scope_index) const;
5155 void SetNameAt(intptr_t scope_index, const String& name) const; 5159 void SetNameAt(intptr_t scope_index, const String& name) const;
5156 5160
5157 bool IsFinalAt(intptr_t scope_index) const; 5161 bool IsFinalAt(intptr_t scope_index) const;
5158 void SetIsFinalAt(intptr_t scope_index, bool is_final) const; 5162 void SetIsFinalAt(intptr_t scope_index, bool is_final) const;
5159 5163
5160 bool IsConstAt(intptr_t scope_index) const; 5164 bool IsConstAt(intptr_t scope_index) const;
5161 void SetIsConstAt(intptr_t scope_index, bool is_const) const; 5165 void SetIsConstAt(intptr_t scope_index, bool is_const) const;
5162 5166
5163 RawAbstractType* TypeAt(intptr_t scope_index) const; 5167 RawAbstractType* TypeAt(intptr_t scope_index) const;
(...skipping 3843 matching lines...) Expand 10 before | Expand all | Expand 10 after
9007 9011
9008 inline void TypeArguments::SetHash(intptr_t value) const { 9012 inline void TypeArguments::SetHash(intptr_t value) const {
9009 // This is only safe because we create a new Smi, which does not cause 9013 // This is only safe because we create a new Smi, which does not cause
9010 // heap allocation. 9014 // heap allocation.
9011 StoreSmi(&raw_ptr()->hash_, Smi::New(value)); 9015 StoreSmi(&raw_ptr()->hash_, Smi::New(value));
9012 } 9016 }
9013 9017
9014 } // namespace dart 9018 } // namespace dart
9015 9019
9016 #endif // VM_OBJECT_H_ 9020 #endif // 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