| 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 2415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2426 } else { | 2426 } else { |
| 2427 DCHECK(variable->IsContextSlot()); | 2427 DCHECK(variable->IsContextSlot()); |
| 2428 int depth = current_scope()->ContextChainLength(variable->scope()); | 2428 int depth = current_scope()->ContextChainLength(variable->scope()); |
| 2429 bool immutable = variable->maybe_assigned() == kNotAssigned; | 2429 bool immutable = variable->maybe_assigned() == kNotAssigned; |
| 2430 const Operator* op = | 2430 const Operator* op = |
| 2431 javascript()->LoadContext(depth, variable->index(), immutable); | 2431 javascript()->LoadContext(depth, variable->index(), immutable); |
| 2432 receiver = NewNode(op, current_context()); | 2432 receiver = NewNode(op, current_context()); |
| 2433 } | 2433 } |
| 2434 } | 2434 } |
| 2435 Node* language = jsgraph()->Constant(language_mode()); | 2435 Node* language = jsgraph()->Constant(language_mode()); |
| 2436 Node* position = jsgraph()->Constant(info()->scope()->start_position()); | 2436 Node* position = jsgraph()->Constant(current_scope()->start_position()); |
| 2437 const Operator* op = | 2437 const Operator* op = |
| 2438 javascript()->CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); | 2438 javascript()->CallRuntime(Runtime::kResolvePossiblyDirectEval, 6); |
| 2439 Node* pair = | 2439 Node* pair = |
| 2440 NewNode(op, callee, source, function, receiver, language, position); | 2440 NewNode(op, callee, source, function, receiver, language, position); |
| 2441 PrepareFrameState(pair, expr->EvalOrLookupId(), | 2441 PrepareFrameState(pair, expr->EvalOrLookupId(), |
| 2442 OutputFrameStateCombine::PokeAt(arg_count + 1)); | 2442 OutputFrameStateCombine::PokeAt(arg_count + 1)); |
| 2443 Node* new_callee = NewNode(common()->Projection(0), pair); | 2443 Node* new_callee = NewNode(common()->Projection(0), pair); |
| 2444 Node* new_receiver = NewNode(common()->Projection(1), pair); | 2444 Node* new_receiver = NewNode(common()->Projection(1), pair); |
| 2445 | 2445 |
| 2446 // Patch callee and receiver on the environment. | 2446 // Patch callee and receiver on the environment. |
| (...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4055 // Phi does not exist yet, introduce one. | 4055 // Phi does not exist yet, introduce one. |
| 4056 value = NewPhi(inputs, value, control); | 4056 value = NewPhi(inputs, value, control); |
| 4057 value->ReplaceInput(inputs - 1, other); | 4057 value->ReplaceInput(inputs - 1, other); |
| 4058 } | 4058 } |
| 4059 return value; | 4059 return value; |
| 4060 } | 4060 } |
| 4061 | 4061 |
| 4062 } // namespace compiler | 4062 } // namespace compiler |
| 4063 } // namespace internal | 4063 } // namespace internal |
| 4064 } // namespace v8 | 4064 } // namespace v8 |
| OLD | NEW |