OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/crankshaft/typing.h" | 5 #include "src/crankshaft/typing.h" |
6 | 6 |
7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/ast/variables.h" | 9 #include "src/ast/variables.h" |
10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 #ifdef OBJECT_PRINT | 78 #ifdef OBJECT_PRINT |
79 if (FLAG_trace_osr && FLAG_print_scopes) { | 79 if (FLAG_trace_osr && FLAG_print_scopes) { |
80 PrintObserved(scope_->receiver(), frame->receiver(), | 80 PrintObserved(scope_->receiver(), frame->receiver(), |
81 store_.LookupBounds(parameter_index(-1)).lower); | 81 store_.LookupBounds(parameter_index(-1)).lower); |
82 | 82 |
83 for (int i = 0; i < params; i++) { | 83 for (int i = 0; i < params; i++) { |
84 PrintObserved(scope_->parameter(i), frame->GetParameter(i), | 84 PrintObserved(scope_->parameter(i), frame->GetParameter(i), |
85 store_.LookupBounds(parameter_index(i)).lower); | 85 store_.LookupBounds(parameter_index(i)).lower); |
86 } | 86 } |
87 | 87 |
88 ZoneList<Variable*>* local_vars = scope_->locals(); | |
89 int local_index = 0; | 88 int local_index = 0; |
90 for (int i = 0; i < local_vars->length(); i++) { | 89 for (Variable* var : *scope_->locals()) { |
91 Variable* var = local_vars->at(i); | |
92 if (var->IsStackLocal()) { | 90 if (var->IsStackLocal()) { |
93 PrintObserved( | 91 PrintObserved( |
94 var, frame->GetExpression(local_index), | 92 var, frame->GetExpression(local_index), |
95 store_.LookupBounds(stack_local_index(local_index)).lower); | 93 store_.LookupBounds(stack_local_index(local_index)).lower); |
96 local_index++; | 94 local_index++; |
97 } | 95 } |
98 } | 96 } |
99 } | 97 } |
100 #endif // OBJECT_PRINT | 98 #endif // OBJECT_PRINT |
101 } | 99 } |
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 } | 790 } |
793 | 791 |
794 | 792 |
795 void AstTyper::VisitFunctionDeclaration(FunctionDeclaration* declaration) { | 793 void AstTyper::VisitFunctionDeclaration(FunctionDeclaration* declaration) { |
796 RECURSE(Visit(declaration->fun())); | 794 RECURSE(Visit(declaration->fun())); |
797 } | 795 } |
798 | 796 |
799 | 797 |
800 } // namespace internal | 798 } // namespace internal |
801 } // namespace v8 | 799 } // namespace v8 |
OLD | NEW |