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/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast-numbering.h" | 10 #include "src/ast-numbering.h" |
(...skipping 4670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4681 DCHECK(!HasStackOverflow()); | 4681 DCHECK(!HasStackOverflow()); |
4682 DCHECK(current_block() != NULL); | 4682 DCHECK(current_block() != NULL); |
4683 DCHECK(current_block()->HasPredecessor()); | 4683 DCHECK(current_block()->HasPredecessor()); |
4684 | 4684 |
4685 Scope* outer_scope = scope(); | 4685 Scope* outer_scope = scope(); |
4686 Scope* scope = stmt->scope(); | 4686 Scope* scope = stmt->scope(); |
4687 BreakAndContinueInfo break_info(stmt, outer_scope); | 4687 BreakAndContinueInfo break_info(stmt, outer_scope); |
4688 | 4688 |
4689 { BreakAndContinueScope push(&break_info, this); | 4689 { BreakAndContinueScope push(&break_info, this); |
4690 if (scope != NULL) { | 4690 if (scope != NULL) { |
4691 if (scope->ContextLocalCount() > 0) { | 4691 if (scope->NeedsContext()) { |
4692 // Load the function object. | 4692 // Load the function object. |
4693 Scope* declaration_scope = scope->DeclarationScope(); | 4693 Scope* declaration_scope = scope->DeclarationScope(); |
4694 HInstruction* function; | 4694 HInstruction* function; |
4695 HValue* outer_context = environment()->context(); | 4695 HValue* outer_context = environment()->context(); |
4696 if (declaration_scope->is_script_scope() || | 4696 if (declaration_scope->is_script_scope() || |
4697 declaration_scope->is_eval_scope()) { | 4697 declaration_scope->is_eval_scope()) { |
4698 function = new (zone()) | 4698 function = new (zone()) |
4699 HLoadContextSlot(outer_context, Context::CLOSURE_INDEX, | 4699 HLoadContextSlot(outer_context, Context::CLOSURE_INDEX, |
4700 HLoadContextSlot::kNoCheck); | 4700 HLoadContextSlot::kNoCheck); |
4701 } else { | 4701 } else { |
(...skipping 8733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13435 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13435 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13436 } | 13436 } |
13437 | 13437 |
13438 #ifdef DEBUG | 13438 #ifdef DEBUG |
13439 graph_->Verify(false); // No full verify. | 13439 graph_->Verify(false); // No full verify. |
13440 #endif | 13440 #endif |
13441 } | 13441 } |
13442 | 13442 |
13443 } // namespace internal | 13443 } // namespace internal |
13444 } // namespace v8 | 13444 } // namespace v8 |
OLD | NEW |