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/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 2371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2382 // Note that a property call requires the receiver to be wrapped into | 2382 // Note that a property call requires the receiver to be wrapped into |
2383 // an object for sloppy callees. Since the receiver is not the target of | 2383 // an object for sloppy callees. Since the receiver is not the target of |
2384 // the load, it could very well be null or undefined at this point. | 2384 // the load, it could very well be null or undefined at this point. |
2385 receiver_value = environment()->Pop(); | 2385 receiver_value = environment()->Pop(); |
2386 environment()->Drop(1); | 2386 environment()->Drop(1); |
2387 break; | 2387 break; |
2388 } | 2388 } |
2389 case Call::SUPER_CALL: | 2389 case Call::SUPER_CALL: |
2390 return VisitCallSuper(expr); | 2390 return VisitCallSuper(expr); |
2391 case Call::POSSIBLY_EVAL_CALL: | 2391 case Call::POSSIBLY_EVAL_CALL: |
| 2392 case Call::POSSIBLY_EVAL_THROUGH_WITH_CALL: |
2392 possibly_eval = true; | 2393 possibly_eval = true; |
2393 if (callee->AsVariableProxy()->var()->IsLookupSlot()) { | 2394 if (callee->AsVariableProxy()->var()->IsLookupSlot()) { |
2394 Variable* variable = callee->AsVariableProxy()->var(); | 2395 Variable* variable = callee->AsVariableProxy()->var(); |
2395 Node* name = jsgraph()->Constant(variable->name()); | 2396 Node* name = jsgraph()->Constant(variable->name()); |
2396 const Operator* op = | 2397 const Operator* op = |
2397 javascript()->CallRuntime(Runtime::kLoadLookupSlotForCall); | 2398 javascript()->CallRuntime(Runtime::kLoadLookupSlotForCall); |
2398 Node* pair = NewNode(op, name); | 2399 Node* pair = NewNode(op, name); |
2399 callee_value = NewNode(common()->Projection(0), pair); | 2400 callee_value = NewNode(common()->Projection(0), pair); |
2400 receiver_value = NewNode(common()->Projection(1), pair); | 2401 receiver_value = NewNode(common()->Projection(1), pair); |
2401 PrepareFrameState(pair, expr->LookupId(), | 2402 PrepareFrameState(pair, expr->LookupId(), |
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4359 // Phi does not exist yet, introduce one. | 4360 // Phi does not exist yet, introduce one. |
4360 value = NewPhi(inputs, value, control); | 4361 value = NewPhi(inputs, value, control); |
4361 value->ReplaceInput(inputs - 1, other); | 4362 value->ReplaceInput(inputs - 1, other); |
4362 } | 4363 } |
4363 return value; | 4364 return value; |
4364 } | 4365 } |
4365 | 4366 |
4366 } // namespace compiler | 4367 } // namespace compiler |
4367 } // namespace internal | 4368 } // namespace internal |
4368 } // namespace v8 | 4369 } // namespace v8 |
OLD | NEW |