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

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

Issue 14925005: Remove stack_frame_<arch>.cc files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/stack_frame.h » ('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/scopes.h" 5 #include "vm/scopes.h"
6 6
7 #include "vm/ast.h" 7 #include "vm/ast.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/parser.h" 10 #include "vm/parser.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 } 562 }
563 } 563 }
564 } 564 }
565 return false; 565 return false;
566 } 566 }
567 567
568 568
569 int LocalVariable::BitIndexIn(intptr_t fixed_parameter_count) const { 569 int LocalVariable::BitIndexIn(intptr_t fixed_parameter_count) const {
570 ASSERT(!is_captured()); 570 ASSERT(!is_captured());
571 // Parameters have positive indexes with the lowest index being 571 // Parameters have positive indexes with the lowest index being
572 // kLastParamSlotIndex. Locals and copied parameters have negative indexes 572 // kParamEndSlotFromFp + 1. Locals and copied parameters have negative
573 // with the lowest (closest to zero) index being kFirstLocalSlotIndex. 573 // indexes with the lowest (closest to 0) index being kFirstLocalSlotFromFp.
574 if (index() > 0) { 574 if (index() > 0) {
575 // Shift non-negative indexes so that the lowest one is 0. 575 // Shift non-negative indexes so that the lowest one is 0.
576 return (fixed_parameter_count - 1) - (index() - kLastParamSlotIndex); 576 return fixed_parameter_count - (index() - kParamEndSlotFromFp);
577 } else { 577 } else {
578 // Shift negative indexes so that the lowest one is 0 (they are still 578 // Shift negative indexes so that the lowest one is 0 (they are still
579 // non-positive). 579 // non-positive).
580 return fixed_parameter_count - (index() - kFirstLocalSlotIndex); 580 return fixed_parameter_count - (index() - kFirstLocalSlotFromFp);
581 } 581 }
582 } 582 }
583 583
584 584
585 } // namespace dart 585 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/stack_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698