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

Unified Diff: runtime/vm/object.h

Issue 673253002: Add missing StorePointer/StoreSmi in ContextScope. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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 | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/raw_object.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 41399)
+++ runtime/vm/object.h (working copy)
@@ -4179,12 +4179,9 @@
StoreNonPointer(&raw_ptr()->num_variables_, num_variables);
}
- RawContextScope::VariableDesc* VariableDescAddr(intptr_t index) const {
+ const RawContextScope::VariableDesc* VariableDescAddr(intptr_t index) const {
ASSERT((index >= 0) && (index < num_variables()));
- uword raw_addr = reinterpret_cast<uword>(raw_ptr());
- raw_addr += sizeof(RawContextScope) +
- (index * sizeof(RawContextScope::VariableDesc));
- return reinterpret_cast<RawContextScope::VariableDesc*>(raw_addr);
+ return raw_ptr()->VariableDescAddr(index);
}
FINAL_HEAP_OBJECT_IMPLEMENTATION(ContextScope, Object);
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698