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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2020 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); | 2026 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); |
2021 | 2027 |
2022 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); | 2028 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); |
2023 node->ReplaceInput(frame_state_index, frame_state_node); | 2029 node->ReplaceInput(frame_state_index, frame_state_node); |
2024 } | 2030 } |
2025 } | 2031 } |
2026 | 2032 |
2027 } | 2033 } |
2028 } | 2034 } |
2029 } // namespace v8::internal::compiler | 2035 } // namespace v8::internal::compiler |
OLD | NEW |