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

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

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/object.h ('k') | runtime/vm/object_service.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 #include "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/become.h" 10 #include "vm/become.h"
(...skipping 14793 matching lines...) Expand 10 before | Expand all | Expand 10 after
14804 } 14804 }
14805 14805
14806 14806
14807 void ContextScope::SetTokenIndexAt(intptr_t scope_index, 14807 void ContextScope::SetTokenIndexAt(intptr_t scope_index,
14808 TokenPosition token_pos) const { 14808 TokenPosition token_pos) const {
14809 StoreSmi(&VariableDescAddr(scope_index)->token_pos, 14809 StoreSmi(&VariableDescAddr(scope_index)->token_pos,
14810 Smi::New(token_pos.value())); 14810 Smi::New(token_pos.value()));
14811 } 14811 }
14812 14812
14813 14813
14814 TokenPosition ContextScope::DeclarationTokenIndexAt(
14815 intptr_t scope_index) const {
14816 return TokenPosition(
14817 Smi::Value(VariableDescAddr(scope_index)->declaration_token_pos));
14818 }
14819
14820
14821 void ContextScope::SetDeclarationTokenIndexAt(
14822 intptr_t scope_index,
14823 TokenPosition declaration_token_pos) const {
14824 StoreSmi(&VariableDescAddr(scope_index)->declaration_token_pos,
14825 Smi::New(declaration_token_pos.value()));
14826 }
14827
14828
14814 RawString* ContextScope::NameAt(intptr_t scope_index) const { 14829 RawString* ContextScope::NameAt(intptr_t scope_index) const {
14815 return VariableDescAddr(scope_index)->name; 14830 return VariableDescAddr(scope_index)->name;
14816 } 14831 }
14817 14832
14818 14833
14819 void ContextScope::SetNameAt(intptr_t scope_index, const String& name) const { 14834 void ContextScope::SetNameAt(intptr_t scope_index, const String& name) const {
14820 StorePointer(&(VariableDescAddr(scope_index)->name), name.raw()); 14835 StorePointer(&(VariableDescAddr(scope_index)->name), name.raw());
14821 } 14836 }
14822 14837
14823 14838
(...skipping 8191 matching lines...) Expand 10 before | Expand all | Expand 10 after
23015 return UserTag::null(); 23030 return UserTag::null();
23016 } 23031 }
23017 23032
23018 23033
23019 const char* UserTag::ToCString() const { 23034 const char* UserTag::ToCString() const {
23020 const String& tag_label = String::Handle(label()); 23035 const String& tag_label = String::Handle(label());
23021 return tag_label.ToCString(); 23036 return tag_label.ToCString();
23022 } 23037 }
23023 23038
23024 } // namespace dart 23039 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698