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

Unified Diff: runtime/vm/locations.cc

Issue 19464002: Replaces Location::ToStackSlotAddress() with Location::ToStackSlotOffset() (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/locations.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/locations.cc
===================================================================
--- runtime/vm/locations.cc (revision 25107)
+++ runtime/vm/locations.cc (working copy)
@@ -87,8 +87,6 @@
}
-// TODO(regis): Remove all occurences of Address in the architecture independent
-// portion of the vm.
Address Location::ToStackSlotAddress() const {
Florian Schneider 2013/07/18 10:39:25 return Address(FPREG, ToStackSlotOffset());
const intptr_t index = stack_index();
if (index < 0) {
@@ -101,6 +99,18 @@
}
+intptr_t Location::ToStackSlotOffset() const {
+ const intptr_t index = stack_index();
+ if (index < 0) {
+ const intptr_t offset = (kParamEndSlotFromFp - index) * kWordSize;
+ return offset;
+ } else {
+ const intptr_t offset = (kFirstLocalSlotFromFp - index) * kWordSize;
+ return offset;
+ }
+}
+
+
const char* Location::Name() const {
switch (kind()) {
case kInvalid: return "?";
« no previous file with comments | « runtime/vm/locations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698