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

Unified Diff: runtime/vm/scopes.cc

Issue 12776006: Make allocation of Dart parameters and local variables architecture independent. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
Index: runtime/vm/scopes.cc
===================================================================
--- runtime/vm/scopes.cc (revision 20045)
+++ runtime/vm/scopes.cc (working copy)
@@ -557,17 +557,16 @@
int LocalVariable::BitIndexIn(intptr_t fixed_parameter_count) const {
ASSERT(!is_captured());
- // Parameters have positive indexes with the lowest index being 2. Locals
- // and copied parameters have negative indexes with the lowest (closest to
- // zero) index being ParsedFunction::kFirstLocalSlotIndex.
+ // Parameters have positive indexes with the lowest index being
+ // kLastParamSlotIndex. Locals and copied parameters have negative indexes
+ // with the lowest (closest to zero) index being kFirstLocalSlotIndex.
if (index() > 0) {
// Shift non-negative indexes so that the lowest one is 0.
- return (fixed_parameter_count - 1) - (index() - 2);
+ return (fixed_parameter_count - 1) - (index() - kLastParamSlotIndex);
} else {
// Shift negative indexes so that the lowest one is 0 (they are still
// non-positive).
- return fixed_parameter_count -
- (index() - ParsedFunction::kFirstLocalSlotIndex);
+ return fixed_parameter_count - (index() - kFirstLocalSlotIndex);
}
}

Powered by Google App Engine
This is Rietveld 408576698