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

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 1292753007: [es6] Parameter scopes for sloppy eval (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments 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
« no previous file with comments | « src/factory.cc ('k') | src/hydrogen.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/ast.h" 5 #include "src/ast.h"
6 #include "src/ast-numbering.h" 6 #include "src/ast-numbering.h"
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 FullCodeGenerator::EnterBlockScopeIfNeeded::EnterBlockScopeIfNeeded( 1541 FullCodeGenerator::EnterBlockScopeIfNeeded::EnterBlockScopeIfNeeded(
1542 FullCodeGenerator* codegen, Scope* scope, BailoutId entry_id, 1542 FullCodeGenerator* codegen, Scope* scope, BailoutId entry_id,
1543 BailoutId declarations_id, BailoutId exit_id) 1543 BailoutId declarations_id, BailoutId exit_id)
1544 : codegen_(codegen), exit_id_(exit_id) { 1544 : codegen_(codegen), exit_id_(exit_id) {
1545 saved_scope_ = codegen_->scope(); 1545 saved_scope_ = codegen_->scope();
1546 1546
1547 if (scope == NULL) { 1547 if (scope == NULL) {
1548 codegen_->PrepareForBailoutForId(entry_id, NO_REGISTERS); 1548 codegen_->PrepareForBailoutForId(entry_id, NO_REGISTERS);
1549 needs_block_context_ = false; 1549 needs_block_context_ = false;
1550 } else { 1550 } else {
1551 needs_block_context_ = scope->ContextLocalCount() > 0; 1551 needs_block_context_ = scope->NeedsContext();
1552 codegen_->scope_ = scope; 1552 codegen_->scope_ = scope;
1553 { 1553 {
1554 if (needs_block_context_) { 1554 if (needs_block_context_) {
1555 Comment cmnt(masm(), "[ Extend block context"); 1555 Comment cmnt(masm(), "[ Extend block context");
1556 __ Push(scope->GetScopeInfo(codegen->isolate())); 1556 __ Push(scope->GetScopeInfo(codegen->isolate()));
1557 codegen_->PushFunctionArgumentForContextAllocation(); 1557 codegen_->PushFunctionArgumentForContextAllocation();
1558 __ CallRuntime(Runtime::kPushBlockContext, 2); 1558 __ CallRuntime(Runtime::kPushBlockContext, 2);
1559 1559
1560 // Replace the context stored in the frame. 1560 // Replace the context stored in the frame.
1561 codegen_->StoreToFrameField(StandardFrameConstants::kContextOffset, 1561 codegen_->StoreToFrameField(StandardFrameConstants::kContextOffset,
(...skipping 22 matching lines...) Expand all
1584 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); 1584 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS);
1585 codegen_->scope_ = saved_scope_; 1585 codegen_->scope_ = saved_scope_;
1586 } 1586 }
1587 1587
1588 1588
1589 #undef __ 1589 #undef __
1590 1590
1591 1591
1592 } // namespace internal 1592 } // namespace internal
1593 } // namespace v8 1593 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698