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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 // Create node to instantiate a new closure. | 805 // Create node to instantiate a new closure. |
806 Node* info = jsgraph()->Constant(shared_info); | 806 Node* info = jsgraph()->Constant(shared_info); |
807 Node* pretenure = expr->pretenure() ? jsgraph()->TrueConstant() | 807 Node* pretenure = expr->pretenure() ? jsgraph()->TrueConstant() |
808 : jsgraph()->FalseConstant(); | 808 : jsgraph()->FalseConstant(); |
809 const Operator* op = javascript()->Runtime(Runtime::kNewClosure, 3); | 809 const Operator* op = javascript()->Runtime(Runtime::kNewClosure, 3); |
810 Node* value = NewNode(op, context, info, pretenure); | 810 Node* value = NewNode(op, context, info, pretenure); |
811 ast_context()->ProduceValue(value); | 811 ast_context()->ProduceValue(value); |
812 } | 812 } |
813 | 813 |
814 | 814 |
| 815 void AstGraphBuilder::VisitClassLiteral(ClassLiteral* expr) { |
| 816 // TODO(arv): Implement. |
| 817 UNREACHABLE(); |
| 818 } |
| 819 |
| 820 |
815 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { | 821 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { |
816 UNREACHABLE(); | 822 UNREACHABLE(); |
817 } | 823 } |
818 | 824 |
819 | 825 |
820 void AstGraphBuilder::VisitConditional(Conditional* expr) { | 826 void AstGraphBuilder::VisitConditional(Conditional* expr) { |
821 IfBuilder compare_if(this); | 827 IfBuilder compare_if(this); |
822 VisitForTest(expr->condition()); | 828 VisitForTest(expr->condition()); |
823 Node* condition = environment()->Pop(); | 829 Node* condition = environment()->Pop(); |
824 compare_if.If(condition); | 830 compare_if.If(condition); |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2013 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); | 2019 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); |
2014 | 2020 |
2015 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); | 2021 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); |
2016 node->ReplaceInput(frame_state_index, frame_state_node); | 2022 node->ReplaceInput(frame_state_index, frame_state_node); |
2017 } | 2023 } |
2018 } | 2024 } |
2019 | 2025 |
2020 } | 2026 } |
2021 } | 2027 } |
2022 } // namespace v8::internal::compiler | 2028 } // namespace v8::internal::compiler |
OLD | NEW |