| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |