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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index d958643d71ed9bcc691ed0638198d73468dd8f20..58213ac3ffd1d9bfed29f8dbe00ca0ce44645d12 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -14811,6 +14811,21 @@ void ContextScope::SetTokenIndexAt(intptr_t scope_index,
}
+TokenPosition ContextScope::DeclarationTokenIndexAt(
+ intptr_t scope_index) const {
+ return TokenPosition(
+ Smi::Value(VariableDescAddr(scope_index)->declaration_token_pos));
+}
+
+
+void ContextScope::SetDeclarationTokenIndexAt(
+ intptr_t scope_index,
+ TokenPosition declaration_token_pos) const {
+ StoreSmi(&VariableDescAddr(scope_index)->declaration_token_pos,
+ Smi::New(declaration_token_pos.value()));
+}
+
+
RawString* ContextScope::NameAt(intptr_t scope_index) const {
return VariableDescAddr(scope_index)->name;
}
« 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