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

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

Issue 17977002: - Remove arguments definition test from the VM. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // own context before calling a closure function. 275 // own context before calling a closure function.
276 VarDesc desc; 276 VarDesc desc;
277 desc.name = &var->name(); 277 desc.name = &var->name();
278 desc.info.kind = RawLocalVarDescriptors::kSavedCurrentContext; 278 desc.info.kind = RawLocalVarDescriptors::kSavedCurrentContext;
279 desc.info.scope_id = 0; 279 desc.info.scope_id = 0;
280 desc.info.begin_pos = 0; 280 desc.info.begin_pos = 0;
281 desc.info.end_pos = 0; 281 desc.info.end_pos = 0;
282 desc.info.index = var->index(); 282 desc.info.index = var->index();
283 vars->Add(desc); 283 vars->Add(desc);
284 } 284 }
285 // The saved arguments descriptor variable is not currently collected.
286 } 285 }
287 } 286 }
288 LocalScope* child = this->child(); 287 LocalScope* child = this->child();
289 while (child != NULL) { 288 while (child != NULL) {
290 child->CollectLocalVariables(vars, scope_id); 289 child->CollectLocalVariables(vars, scope_id);
291 child = child->sibling(); 290 child = child->sibling();
292 } 291 }
293 } 292 }
294 293
295 294
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 return fixed_parameter_count - (index() - kParamEndSlotFromFp); 575 return fixed_parameter_count - (index() - kParamEndSlotFromFp);
577 } else { 576 } else {
578 // Shift negative indexes so that the lowest one is 0 (they are still 577 // Shift negative indexes so that the lowest one is 0 (they are still
579 // non-positive). 578 // non-positive).
580 return fixed_parameter_count - (index() - kFirstLocalSlotFromFp); 579 return fixed_parameter_count - (index() - kFirstLocalSlotFromFp);
581 } 580 }
582 } 581 }
583 582
584 583
585 } // namespace dart 584 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698