| 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 3519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3530 UNREACHABLE(); | 3530 UNREACHABLE(); |
| 3531 } | 3531 } |
| 3532 UNREACHABLE(); | 3532 UNREACHABLE(); |
| 3533 return nullptr; | 3533 return nullptr; |
| 3534 } | 3534 } |
| 3535 | 3535 |
| 3536 | 3536 |
| 3537 Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key, | 3537 Node* AstGraphBuilder::BuildKeyedLoad(Node* object, Node* key, |
| 3538 const VectorSlotPair& feedback) { | 3538 const VectorSlotPair& feedback) { |
| 3539 const Operator* op = javascript()->LoadProperty(feedback); | 3539 const Operator* op = javascript()->LoadProperty(feedback); |
| 3540 Node* node = NewNode(op, object, key, GetFunctionClosure()); | 3540 Node* node = NewNode(op, object, key); |
| 3541 return node; | 3541 return node; |
| 3542 } | 3542 } |
| 3543 | 3543 |
| 3544 | 3544 |
| 3545 Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name, | 3545 Node* AstGraphBuilder::BuildNamedLoad(Node* object, Handle<Name> name, |
| 3546 const VectorSlotPair& feedback) { | 3546 const VectorSlotPair& feedback) { |
| 3547 const Operator* op = javascript()->LoadNamed(name, feedback); | 3547 const Operator* op = javascript()->LoadNamed(name, feedback); |
| 3548 Node* node = NewNode(op, object, GetFunctionClosure()); | 3548 Node* node = NewNode(op, object); |
| 3549 return node; | 3549 return node; |
| 3550 } | 3550 } |
| 3551 | 3551 |
| 3552 | 3552 |
| 3553 Node* AstGraphBuilder::BuildKeyedStore(Node* object, Node* key, Node* value, | 3553 Node* AstGraphBuilder::BuildKeyedStore(Node* object, Node* key, Node* value, |
| 3554 const VectorSlotPair& feedback) { | 3554 const VectorSlotPair& feedback) { |
| 3555 const Operator* op = javascript()->StoreProperty(language_mode(), feedback); | 3555 const Operator* op = javascript()->StoreProperty(language_mode(), feedback); |
| 3556 Node* node = NewNode(op, object, key, value, GetFunctionClosure()); | 3556 Node* node = NewNode(op, object, key, value); |
| 3557 return node; | 3557 return node; |
| 3558 } | 3558 } |
| 3559 | 3559 |
| 3560 | 3560 |
| 3561 Node* AstGraphBuilder::BuildNamedStore(Node* object, Handle<Name> name, | 3561 Node* AstGraphBuilder::BuildNamedStore(Node* object, Handle<Name> name, |
| 3562 Node* value, | 3562 Node* value, |
| 3563 const VectorSlotPair& feedback) { | 3563 const VectorSlotPair& feedback) { |
| 3564 const Operator* op = | 3564 const Operator* op = |
| 3565 javascript()->StoreNamed(language_mode(), name, feedback); | 3565 javascript()->StoreNamed(language_mode(), name, feedback); |
| 3566 Node* node = NewNode(op, object, value, GetFunctionClosure()); | 3566 Node* node = NewNode(op, object, value); |
| 3567 return node; | 3567 return node; |
| 3568 } | 3568 } |
| 3569 | 3569 |
| 3570 | 3570 |
| 3571 Node* AstGraphBuilder::BuildNamedSuperLoad(Node* receiver, Node* home_object, | 3571 Node* AstGraphBuilder::BuildNamedSuperLoad(Node* receiver, Node* home_object, |
| 3572 Handle<Name> name, | 3572 Handle<Name> name, |
| 3573 const VectorSlotPair& feedback) { | 3573 const VectorSlotPair& feedback) { |
| 3574 Node* name_node = jsgraph()->Constant(name); | 3574 Node* name_node = jsgraph()->Constant(name); |
| 3575 const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper); | 3575 const Operator* op = javascript()->CallRuntime(Runtime::kLoadFromSuper); |
| 3576 Node* node = NewNode(op, receiver, home_object, name_node); | 3576 Node* node = NewNode(op, receiver, home_object, name_node); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 3607 const Operator* op = javascript()->CallRuntime(function_id, 4); | 3607 const Operator* op = javascript()->CallRuntime(function_id, 4); |
| 3608 Node* node = NewNode(op, receiver, home_object, name_node, value); | 3608 Node* node = NewNode(op, receiver, home_object, name_node, value); |
| 3609 return node; | 3609 return node; |
| 3610 } | 3610 } |
| 3611 | 3611 |
| 3612 | 3612 |
| 3613 Node* AstGraphBuilder::BuildGlobalLoad(Handle<Name> name, | 3613 Node* AstGraphBuilder::BuildGlobalLoad(Handle<Name> name, |
| 3614 const VectorSlotPair& feedback, | 3614 const VectorSlotPair& feedback, |
| 3615 TypeofMode typeof_mode) { | 3615 TypeofMode typeof_mode) { |
| 3616 const Operator* op = javascript()->LoadGlobal(name, feedback, typeof_mode); | 3616 const Operator* op = javascript()->LoadGlobal(name, feedback, typeof_mode); |
| 3617 Node* node = NewNode(op, GetFunctionClosure()); | 3617 Node* node = NewNode(op); |
| 3618 return node; | 3618 return node; |
| 3619 } | 3619 } |
| 3620 | 3620 |
| 3621 | 3621 |
| 3622 Node* AstGraphBuilder::BuildGlobalStore(Handle<Name> name, Node* value, | 3622 Node* AstGraphBuilder::BuildGlobalStore(Handle<Name> name, Node* value, |
| 3623 const VectorSlotPair& feedback) { | 3623 const VectorSlotPair& feedback) { |
| 3624 const Operator* op = | 3624 const Operator* op = |
| 3625 javascript()->StoreGlobal(language_mode(), name, feedback); | 3625 javascript()->StoreGlobal(language_mode(), name, feedback); |
| 3626 Node* node = NewNode(op, value, GetFunctionClosure()); | 3626 Node* node = NewNode(op, value); |
| 3627 return node; | 3627 return node; |
| 3628 } | 3628 } |
| 3629 | 3629 |
| 3630 | 3630 |
| 3631 Node* AstGraphBuilder::BuildDynamicLoad(Handle<Name> name, | 3631 Node* AstGraphBuilder::BuildDynamicLoad(Handle<Name> name, |
| 3632 TypeofMode typeof_mode) { | 3632 TypeofMode typeof_mode) { |
| 3633 Node* name_node = jsgraph()->Constant(name); | 3633 Node* name_node = jsgraph()->Constant(name); |
| 3634 const Operator* op = | 3634 const Operator* op = |
| 3635 javascript()->CallRuntime(typeof_mode == TypeofMode::NOT_INSIDE_TYPEOF | 3635 javascript()->CallRuntime(typeof_mode == TypeofMode::NOT_INSIDE_TYPEOF |
| 3636 ? Runtime::kLoadLookupSlot | 3636 ? Runtime::kLoadLookupSlot |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4344 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, | 4344 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, |
| 4345 SourcePositionTable* source_positions, int inlining_id) | 4345 SourcePositionTable* source_positions, int inlining_id) |
| 4346 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, | 4346 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, |
| 4347 loop_assignment), | 4347 loop_assignment), |
| 4348 source_positions_(source_positions), | 4348 source_positions_(source_positions), |
| 4349 start_position_(info->shared_info()->start_position(), inlining_id) {} | 4349 start_position_(info->shared_info()->start_position(), inlining_id) {} |
| 4350 | 4350 |
| 4351 } // namespace compiler | 4351 } // namespace compiler |
| 4352 } // namespace internal | 4352 } // namespace internal |
| 4353 } // namespace v8 | 4353 } // namespace v8 |
| OLD | NEW |