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

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

Issue 2281073002: Create ScopeInfos while analyzing the Scope chain (Closed)
Patch Set: updates Created 4 years, 3 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 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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast/ast-numbering.h" 7 #include "src/ast/ast-numbering.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 1863
1864 if (scope == NULL) { 1864 if (scope == NULL) {
1865 codegen_->PrepareForBailoutForId(entry_id, BailoutState::NO_REGISTERS); 1865 codegen_->PrepareForBailoutForId(entry_id, BailoutState::NO_REGISTERS);
1866 needs_block_context_ = false; 1866 needs_block_context_ = false;
1867 } else { 1867 } else {
1868 needs_block_context_ = scope->NeedsContext(); 1868 needs_block_context_ = scope->NeedsContext();
1869 codegen_->scope_ = scope; 1869 codegen_->scope_ = scope;
1870 { 1870 {
1871 if (needs_block_context_) { 1871 if (needs_block_context_) {
1872 Comment cmnt(masm(), "[ Extend block context"); 1872 Comment cmnt(masm(), "[ Extend block context");
1873 codegen_->PushOperand(scope->GetScopeInfo(codegen->isolate())); 1873 codegen_->PushOperand(scope->scope_info());
1874 codegen_->PushFunctionArgumentForContextAllocation(); 1874 codegen_->PushFunctionArgumentForContextAllocation();
1875 codegen_->CallRuntimeWithOperands(Runtime::kPushBlockContext); 1875 codegen_->CallRuntimeWithOperands(Runtime::kPushBlockContext);
1876 1876
1877 // Replace the context stored in the frame. 1877 // Replace the context stored in the frame.
1878 codegen_->StoreToFrameField(StandardFrameConstants::kContextOffset, 1878 codegen_->StoreToFrameField(StandardFrameConstants::kContextOffset,
1879 codegen_->context_register()); 1879 codegen_->context_register());
1880 } 1880 }
1881 CHECK_EQ(0, scope->num_stack_slots()); 1881 CHECK_EQ(0, scope->num_stack_slots());
1882 codegen_->PrepareForBailoutForId(entry_id, BailoutState::NO_REGISTERS); 1882 codegen_->PrepareForBailoutForId(entry_id, BailoutState::NO_REGISTERS);
1883 } 1883 }
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 return var->scope()->is_nonlinear() || 1961 return var->scope()->is_nonlinear() ||
1962 var->initializer_position() >= proxy->position(); 1962 var->initializer_position() >= proxy->position();
1963 } 1963 }
1964 1964
1965 1965
1966 #undef __ 1966 #undef __
1967 1967
1968 1968
1969 } // namespace internal 1969 } // namespace internal
1970 } // namespace v8 1970 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698