| 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/compiler/ast-loop-assignment-analyzer.h" | 9 #include "src/compiler/ast-loop-assignment-analyzer.h" |
| 10 #include "src/compiler/control-builders.h" | 10 #include "src/compiler/control-builders.h" |
| (...skipping 2436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2447 int arg_count = args->length(); | 2447 int arg_count = args->length(); |
| 2448 | 2448 |
| 2449 // Extract callee and source string from the environment. | 2449 // Extract callee and source string from the environment. |
| 2450 Node* callee = environment()->Peek(arg_count + 1); | 2450 Node* callee = environment()->Peek(arg_count + 1); |
| 2451 Node* source = environment()->Peek(arg_count - 1); | 2451 Node* source = environment()->Peek(arg_count - 1); |
| 2452 | 2452 |
| 2453 // Create node to ask for help resolving potential eval call. This will | 2453 // Create node to ask for help resolving potential eval call. This will |
| 2454 // provide a fully resolved callee to patch into the environment. | 2454 // provide a fully resolved callee to patch into the environment. |
| 2455 Node* function = GetFunctionClosure(); | 2455 Node* function = GetFunctionClosure(); |
| 2456 Node* language = jsgraph()->Constant(language_mode()); | 2456 Node* language = jsgraph()->Constant(language_mode()); |
| 2457 Node* position = jsgraph()->Constant(current_scope()->start_position()); | 2457 Node* position = jsgraph()->Constant(expr->position()); |
| 2458 const Operator* op = | 2458 const Operator* op = |
| 2459 javascript()->CallRuntime(Runtime::kResolvePossiblyDirectEval); | 2459 javascript()->CallRuntime(Runtime::kResolvePossiblyDirectEval); |
| 2460 Node* new_callee = | 2460 Node* new_callee = |
| 2461 NewNode(op, callee, source, function, language, position); | 2461 NewNode(op, callee, source, function, language, position); |
| 2462 PrepareFrameState(new_callee, expr->EvalId(), | 2462 PrepareFrameState(new_callee, expr->EvalId(), |
| 2463 OutputFrameStateCombine::PokeAt(arg_count + 1)); | 2463 OutputFrameStateCombine::PokeAt(arg_count + 1)); |
| 2464 | 2464 |
| 2465 // Patch callee on the environment. | 2465 // Patch callee on the environment. |
| 2466 environment()->Poke(arg_count + 1, new_callee); | 2466 environment()->Poke(arg_count + 1, new_callee); |
| 2467 } | 2467 } |
| (...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4367 // Phi does not exist yet, introduce one. | 4367 // Phi does not exist yet, introduce one. |
| 4368 value = NewPhi(inputs, value, control); | 4368 value = NewPhi(inputs, value, control); |
| 4369 value->ReplaceInput(inputs - 1, other); | 4369 value->ReplaceInput(inputs - 1, other); |
| 4370 } | 4370 } |
| 4371 return value; | 4371 return value; |
| 4372 } | 4372 } |
| 4373 | 4373 |
| 4374 } // namespace compiler | 4374 } // namespace compiler |
| 4375 } // namespace internal | 4375 } // namespace internal |
| 4376 } // namespace v8 | 4376 } // namespace v8 |
| OLD | NEW |