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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 const Operator* op = javascript()->StoreContext(0, variable->index()); | 409 const Operator* op = javascript()->StoreContext(0, variable->index()); |
410 NewNode(op, current_context(), value); | 410 NewNode(op, current_context(), value); |
411 break; | 411 break; |
412 } | 412 } |
413 case Variable::LOOKUP: | 413 case Variable::LOOKUP: |
414 UNIMPLEMENTED(); | 414 UNIMPLEMENTED(); |
415 } | 415 } |
416 } | 416 } |
417 | 417 |
418 | 418 |
| 419 void AstGraphBuilder::VisitClassDeclaration(ClassDeclaration* decl) { |
| 420 UNREACHABLE(); |
| 421 } |
| 422 |
| 423 |
419 void AstGraphBuilder::VisitModuleDeclaration(ModuleDeclaration* decl) { | 424 void AstGraphBuilder::VisitModuleDeclaration(ModuleDeclaration* decl) { |
420 UNREACHABLE(); | 425 UNREACHABLE(); |
421 } | 426 } |
422 | 427 |
423 | 428 |
424 void AstGraphBuilder::VisitImportDeclaration(ImportDeclaration* decl) { | 429 void AstGraphBuilder::VisitImportDeclaration(ImportDeclaration* decl) { |
425 UNREACHABLE(); | 430 UNREACHABLE(); |
426 } | 431 } |
427 | 432 |
428 | 433 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 // Create node to instantiate a new closure. | 810 // Create node to instantiate a new closure. |
806 Node* info = jsgraph()->Constant(shared_info); | 811 Node* info = jsgraph()->Constant(shared_info); |
807 Node* pretenure = expr->pretenure() ? jsgraph()->TrueConstant() | 812 Node* pretenure = expr->pretenure() ? jsgraph()->TrueConstant() |
808 : jsgraph()->FalseConstant(); | 813 : jsgraph()->FalseConstant(); |
809 const Operator* op = javascript()->Runtime(Runtime::kNewClosure, 3); | 814 const Operator* op = javascript()->Runtime(Runtime::kNewClosure, 3); |
810 Node* value = NewNode(op, context, info, pretenure); | 815 Node* value = NewNode(op, context, info, pretenure); |
811 ast_context()->ProduceValue(value); | 816 ast_context()->ProduceValue(value); |
812 } | 817 } |
813 | 818 |
814 | 819 |
| 820 void AstGraphBuilder::VisitClassLiteral(ClassLiteral* expr) { UNREACHABLE(); } |
| 821 |
| 822 |
815 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { | 823 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { |
816 UNREACHABLE(); | 824 UNREACHABLE(); |
817 } | 825 } |
818 | 826 |
819 | 827 |
820 void AstGraphBuilder::VisitConditional(Conditional* expr) { | 828 void AstGraphBuilder::VisitConditional(Conditional* expr) { |
821 IfBuilder compare_if(this); | 829 IfBuilder compare_if(this); |
822 VisitForTest(expr->condition()); | 830 VisitForTest(expr->condition()); |
823 Node* condition = environment()->Pop(); | 831 Node* condition = environment()->Pop(); |
824 compare_if.If(condition); | 832 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); | 2021 DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); |
2014 | 2022 |
2015 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); | 2023 Node* frame_state_node = environment()->Checkpoint(ast_id, combine); |
2016 node->ReplaceInput(frame_state_index, frame_state_node); | 2024 node->ReplaceInput(frame_state_index, frame_state_node); |
2017 } | 2025 } |
2018 } | 2026 } |
2019 | 2027 |
2020 } | 2028 } |
2021 } | 2029 } |
2022 } // namespace v8::internal::compiler | 2030 } // namespace v8::internal::compiler |
OLD | NEW |