| 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/control-builders.h" | 8 #include "src/compiler/control-builders.h" |
| 9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
| 10 #include "src/compiler/node-properties.h" | 10 #include "src/compiler/node-properties.h" |
| (...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1645 } else if (ast_context()->IsEffect()) { | 1645 } else if (ast_context()->IsEffect()) { |
| 1646 environment()->Pop(); | 1646 environment()->Pop(); |
| 1647 } | 1647 } |
| 1648 compare_if.End(); | 1648 compare_if.End(); |
| 1649 ast_context()->ReplaceValue(); | 1649 ast_context()->ReplaceValue(); |
| 1650 } | 1650 } |
| 1651 | 1651 |
| 1652 | 1652 |
| 1653 Node* AstGraphBuilder::ProcessArguments(Operator* op, int arity) { | 1653 Node* AstGraphBuilder::ProcessArguments(Operator* op, int arity) { |
| 1654 DCHECK(environment()->stack_height() >= arity); | 1654 DCHECK(environment()->stack_height() >= arity); |
| 1655 Node** all = info()->zone()->NewArray<Node*>(arity); // XXX: alloca? | 1655 Node** all = info()->zone()->NewArray<Node*>(arity); |
| 1656 for (int i = arity - 1; i >= 0; --i) { | 1656 for (int i = arity - 1; i >= 0; --i) { |
| 1657 all[i] = environment()->Pop(); | 1657 all[i] = environment()->Pop(); |
| 1658 } | 1658 } |
| 1659 Node* value = NewNode(op, arity, all); | 1659 Node* value = NewNode(op, arity, all); |
| 1660 return value; | 1660 return value; |
| 1661 } | 1661 } |
| 1662 | 1662 |
| 1663 | 1663 |
| 1664 Node* AstGraphBuilder::BuildLocalFunctionContext(Node* context, Node* closure) { | 1664 Node* AstGraphBuilder::BuildLocalFunctionContext(Node* context, Node* closure) { |
| 1665 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; | 1665 int heap_slots = info()->num_heap_slots() - Context::MIN_CONTEXT_SLOTS; |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2012 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); | 2012 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); |
| 2013 | 2013 |
| 2014 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); | 2014 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); |
| 2015 node->ReplaceInput(frame_state_index, frame_state_node); | 2015 node->ReplaceInput(frame_state_index, frame_state_node); |
| 2016 } | 2016 } |
| 2017 } | 2017 } |
| 2018 | 2018 |
| 2019 } | 2019 } |
| 2020 } | 2020 } |
| 2021 } // namespace v8::internal::compiler | 2021 } // namespace v8::internal::compiler |
| OLD | NEW |