| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
| 8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
| 9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
| 10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
| (...skipping 3134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3145 } | 3145 } |
| 3146 | 3146 |
| 3147 | 3147 |
| 3148 Node* AstGraphBuilder::BuildLocalScriptContext(Scope* scope) { | 3148 Node* AstGraphBuilder::BuildLocalScriptContext(Scope* scope) { |
| 3149 DCHECK(scope->is_script_scope()); | 3149 DCHECK(scope->is_script_scope()); |
| 3150 | 3150 |
| 3151 // Allocate a new local context. | 3151 // Allocate a new local context. |
| 3152 Handle<ScopeInfo> scope_info = scope->GetScopeInfo(isolate()); | 3152 Handle<ScopeInfo> scope_info = scope->GetScopeInfo(isolate()); |
| 3153 const Operator* op = javascript()->CreateScriptContext(scope_info); | 3153 const Operator* op = javascript()->CreateScriptContext(scope_info); |
| 3154 Node* local_context = NewNode(op, GetFunctionClosure()); | 3154 Node* local_context = NewNode(op, GetFunctionClosure()); |
| 3155 PrepareFrameState(local_context, BailoutId::Prologue()); | 3155 PrepareFrameState(local_context, BailoutId::ScriptContext(), |
| 3156 OutputFrameStateCombine::Push()); |
| 3156 | 3157 |
| 3157 return local_context; | 3158 return local_context; |
| 3158 } | 3159 } |
| 3159 | 3160 |
| 3160 | 3161 |
| 3161 Node* AstGraphBuilder::BuildLocalBlockContext(Scope* scope) { | 3162 Node* AstGraphBuilder::BuildLocalBlockContext(Scope* scope) { |
| 3162 DCHECK(scope->is_block_scope()); | 3163 DCHECK(scope->is_block_scope()); |
| 3163 | 3164 |
| 3164 // Allocate a new local context. | 3165 // Allocate a new local context. |
| 3165 Handle<ScopeInfo> scope_info = scope->GetScopeInfo(isolate()); | 3166 Handle<ScopeInfo> scope_info = scope->GetScopeInfo(isolate()); |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4285 // Phi does not exist yet, introduce one. | 4286 // Phi does not exist yet, introduce one. |
| 4286 value = NewPhi(inputs, value, control); | 4287 value = NewPhi(inputs, value, control); |
| 4287 value->ReplaceInput(inputs - 1, other); | 4288 value->ReplaceInput(inputs - 1, other); |
| 4288 } | 4289 } |
| 4289 return value; | 4290 return value; |
| 4290 } | 4291 } |
| 4291 | 4292 |
| 4292 } // namespace compiler | 4293 } // namespace compiler |
| 4293 } // namespace internal | 4294 } // namespace internal |
| 4294 } // namespace v8 | 4295 } // namespace v8 |
| OLD | NEW |