OLD | NEW |
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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1866 | 1866 |
1867 if (scope == NULL) { | 1867 if (scope == NULL) { |
1868 codegen_->PrepareForBailoutForId(entry_id, BailoutState::NO_REGISTERS); | 1868 codegen_->PrepareForBailoutForId(entry_id, BailoutState::NO_REGISTERS); |
1869 needs_block_context_ = false; | 1869 needs_block_context_ = false; |
1870 } else { | 1870 } else { |
1871 needs_block_context_ = scope->NeedsContext(); | 1871 needs_block_context_ = scope->NeedsContext(); |
1872 codegen_->scope_ = scope; | 1872 codegen_->scope_ = scope; |
1873 { | 1873 { |
1874 if (needs_block_context_) { | 1874 if (needs_block_context_) { |
1875 Comment cmnt(masm(), "[ Extend block context"); | 1875 Comment cmnt(masm(), "[ Extend block context"); |
1876 codegen_->PushOperand(scope->GetScopeInfo(codegen->isolate())); | 1876 codegen_->PushOperand(scope->scope_info()); |
1877 codegen_->PushFunctionArgumentForContextAllocation(); | 1877 codegen_->PushFunctionArgumentForContextAllocation(); |
1878 codegen_->CallRuntimeWithOperands(Runtime::kPushBlockContext); | 1878 codegen_->CallRuntimeWithOperands(Runtime::kPushBlockContext); |
1879 | 1879 |
1880 // Replace the context stored in the frame. | 1880 // Replace the context stored in the frame. |
1881 codegen_->StoreToFrameField(StandardFrameConstants::kContextOffset, | 1881 codegen_->StoreToFrameField(StandardFrameConstants::kContextOffset, |
1882 codegen_->context_register()); | 1882 codegen_->context_register()); |
1883 } | 1883 } |
1884 CHECK_EQ(0, scope->num_stack_slots()); | 1884 CHECK_EQ(0, scope->num_stack_slots()); |
1885 codegen_->PrepareForBailoutForId(entry_id, BailoutState::NO_REGISTERS); | 1885 codegen_->PrepareForBailoutForId(entry_id, BailoutState::NO_REGISTERS); |
1886 } | 1886 } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 return var->scope()->is_nonlinear() || | 1964 return var->scope()->is_nonlinear() || |
1965 var->initializer_position() >= proxy->position(); | 1965 var->initializer_position() >= proxy->position(); |
1966 } | 1966 } |
1967 | 1967 |
1968 | 1968 |
1969 #undef __ | 1969 #undef __ |
1970 | 1970 |
1971 | 1971 |
1972 } // namespace internal | 1972 } // namespace internal |
1973 } // namespace v8 | 1973 } // namespace v8 |
OLD | NEW |