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

Side by Side Diff: src/hydrogen.cc

Issue 1292753007: [es6] Parameter scopes for sloppy eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
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/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 4672 matching lines...) Expand 10 before | Expand all | Expand 10 after
4683 DCHECK(!HasStackOverflow()); 4683 DCHECK(!HasStackOverflow());
4684 DCHECK(current_block() != NULL); 4684 DCHECK(current_block() != NULL);
4685 DCHECK(current_block()->HasPredecessor()); 4685 DCHECK(current_block()->HasPredecessor());
4686 4686
4687 Scope* outer_scope = scope(); 4687 Scope* outer_scope = scope();
4688 Scope* scope = stmt->scope(); 4688 Scope* scope = stmt->scope();
4689 BreakAndContinueInfo break_info(stmt, outer_scope); 4689 BreakAndContinueInfo break_info(stmt, outer_scope);
4690 4690
4691 { BreakAndContinueScope push(&break_info, this); 4691 { BreakAndContinueScope push(&break_info, this);
4692 if (scope != NULL) { 4692 if (scope != NULL) {
4693 if (scope->ContextLocalCount() > 0) { 4693 if (scope->NeedsContext()) {
4694 // Load the function object. 4694 // Load the function object.
4695 Scope* declaration_scope = scope->DeclarationScope(); 4695 Scope* declaration_scope = scope->DeclarationScope();
4696 HInstruction* function; 4696 HInstruction* function;
4697 HValue* outer_context = environment()->context(); 4697 HValue* outer_context = environment()->context();
4698 if (declaration_scope->is_script_scope() || 4698 if (declaration_scope->is_script_scope() ||
4699 declaration_scope->is_eval_scope()) { 4699 declaration_scope->is_eval_scope()) {
4700 function = new (zone()) 4700 function = new (zone())
4701 HLoadContextSlot(outer_context, Context::CLOSURE_INDEX, 4701 HLoadContextSlot(outer_context, Context::CLOSURE_INDEX,
4702 HLoadContextSlot::kNoCheck); 4702 HLoadContextSlot::kNoCheck);
4703 } else { 4703 } else {
(...skipping 8733 matching lines...) Expand 10 before | Expand all | Expand 10 after
13437 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13437 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13438 } 13438 }
13439 13439
13440 #ifdef DEBUG 13440 #ifdef DEBUG
13441 graph_->Verify(false); // No full verify. 13441 graph_->Verify(false); // No full verify.
13442 #endif 13442 #endif
13443 } 13443 }
13444 13444
13445 } // namespace internal 13445 } // namespace internal
13446 } // namespace v8 13446 } // namespace v8
OLDNEW
« src/contexts.cc ('K') | « src/full-codegen/full-codegen.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698