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/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/ast-loop-assignment-analyzer.h" | 9 #include "src/compiler/ast-loop-assignment-analyzer.h" |
10 #include "src/compiler/control-builders.h" | 10 #include "src/compiler/control-builders.h" |
(...skipping 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2897 break; | 2897 break; |
2898 case Token::IN: | 2898 case Token::IN: |
2899 op = javascript()->HasProperty(); | 2899 op = javascript()->HasProperty(); |
2900 break; | 2900 break; |
2901 default: | 2901 default: |
2902 op = nullptr; | 2902 op = nullptr; |
2903 UNREACHABLE(); | 2903 UNREACHABLE(); |
2904 } | 2904 } |
2905 VisitForValue(expr->left()); | 2905 VisitForValue(expr->left()); |
2906 VisitForValue(expr->right()); | 2906 VisitForValue(expr->right()); |
2907 FrameStateBeforeAndAfter states(this, expr->right()->id()); | |
2908 Node* right = environment()->Pop(); | 2907 Node* right = environment()->Pop(); |
2909 Node* left = environment()->Pop(); | 2908 Node* left = environment()->Pop(); |
2910 Node* value = NewNode(op, left, right); | 2909 Node* value = NewNode(op, left, right); |
2911 states.AddToNode(value, expr->id(), ast_context()->GetStateCombine()); | 2910 PrepareFrameState(value, expr->id(), ast_context()->GetStateCombine()); |
2912 ast_context()->ProduceValue(expr, value); | 2911 ast_context()->ProduceValue(expr, value); |
2913 } | 2912 } |
2914 | 2913 |
2915 | 2914 |
2916 void AstGraphBuilder::VisitSpread(Spread* expr) { | 2915 void AstGraphBuilder::VisitSpread(Spread* expr) { |
2917 // Handled entirely by the parser itself. | 2916 // Handled entirely by the parser itself. |
2918 UNREACHABLE(); | 2917 UNREACHABLE(); |
2919 } | 2918 } |
2920 | 2919 |
2921 | 2920 |
(...skipping 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4386 // Phi does not exist yet, introduce one. | 4385 // Phi does not exist yet, introduce one. |
4387 value = NewPhi(inputs, value, control); | 4386 value = NewPhi(inputs, value, control); |
4388 value->ReplaceInput(inputs - 1, other); | 4387 value->ReplaceInput(inputs - 1, other); |
4389 } | 4388 } |
4390 return value; | 4389 return value; |
4391 } | 4390 } |
4392 | 4391 |
4393 } // namespace compiler | 4392 } // namespace compiler |
4394 } // namespace internal | 4393 } // namespace internal |
4395 } // namespace v8 | 4394 } // namespace v8 |
OLD | NEW |