| 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/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
| 9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
| 10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
| (...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2218 | 2218 |
| 2219 void AstGraphBuilder::VisitThrow(Throw* expr) { | 2219 void AstGraphBuilder::VisitThrow(Throw* expr) { |
| 2220 VisitForValue(expr->exception()); | 2220 VisitForValue(expr->exception()); |
| 2221 Node* exception = environment()->Pop(); | 2221 Node* exception = environment()->Pop(); |
| 2222 Node* value = BuildThrowError(exception, expr->id()); | 2222 Node* value = BuildThrowError(exception, expr->id()); |
| 2223 ast_context()->ProduceValue(value); | 2223 ast_context()->ProduceValue(value); |
| 2224 } | 2224 } |
| 2225 | 2225 |
| 2226 | 2226 |
| 2227 void AstGraphBuilder::VisitProperty(Property* expr) { | 2227 void AstGraphBuilder::VisitProperty(Property* expr) { |
| 2228 if (expr->obj()->IsSuperReference()) { | 2228 if (expr->obj()->IsSuperPropertyReference()) { |
| 2229 // TODO(turbofan): Implement super here. | 2229 // TODO(turbofan): Implement super here. |
| 2230 SetStackOverflow(); | 2230 SetStackOverflow(); |
| 2231 ast_context()->ProduceValue(jsgraph()->UndefinedConstant()); | 2231 ast_context()->ProduceValue(jsgraph()->UndefinedConstant()); |
| 2232 return; | 2232 return; |
| 2233 } | 2233 } |
| 2234 | 2234 |
| 2235 Node* value; | 2235 Node* value; |
| 2236 VectorSlotPair pair = CreateVectorSlotPair(expr->PropertyFeedbackSlot()); | 2236 VectorSlotPair pair = CreateVectorSlotPair(expr->PropertyFeedbackSlot()); |
| 2237 if (expr->key()->IsPropertyName()) { | 2237 if (expr->key()->IsPropertyName()) { |
| 2238 VisitForValue(expr->obj()); | 2238 VisitForValue(expr->obj()); |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2669 | 2669 |
| 2670 void AstGraphBuilder::VisitSpread(Spread* expr) { UNREACHABLE(); } | 2670 void AstGraphBuilder::VisitSpread(Spread* expr) { UNREACHABLE(); } |
| 2671 | 2671 |
| 2672 | 2672 |
| 2673 void AstGraphBuilder::VisitThisFunction(ThisFunction* expr) { | 2673 void AstGraphBuilder::VisitThisFunction(ThisFunction* expr) { |
| 2674 Node* value = GetFunctionClosure(); | 2674 Node* value = GetFunctionClosure(); |
| 2675 ast_context()->ProduceValue(value); | 2675 ast_context()->ProduceValue(value); |
| 2676 } | 2676 } |
| 2677 | 2677 |
| 2678 | 2678 |
| 2679 void AstGraphBuilder::VisitSuperReference(SuperReference* expr) { | 2679 void AstGraphBuilder::VisitSuperPropertyReference( |
| 2680 SuperPropertyReference* expr) { |
| 2680 // TODO(turbofan): Implement super here. | 2681 // TODO(turbofan): Implement super here. |
| 2681 SetStackOverflow(); | 2682 SetStackOverflow(); |
| 2682 ast_context()->ProduceValue(jsgraph()->UndefinedConstant()); | 2683 ast_context()->ProduceValue(jsgraph()->UndefinedConstant()); |
| 2684 } |
| 2685 |
| 2686 |
| 2687 void AstGraphBuilder::VisitSuperCallReference(SuperCallReference* expr) { |
| 2688 // TODO(turbofan): Implement super here. |
| 2689 SetStackOverflow(); |
| 2690 ast_context()->ProduceValue(jsgraph()->UndefinedConstant()); |
| 2683 } | 2691 } |
| 2684 | 2692 |
| 2685 | 2693 |
| 2686 void AstGraphBuilder::VisitCaseClause(CaseClause* expr) { UNREACHABLE(); } | 2694 void AstGraphBuilder::VisitCaseClause(CaseClause* expr) { UNREACHABLE(); } |
| 2687 | 2695 |
| 2688 | 2696 |
| 2689 void AstGraphBuilder::VisitDeclarations(ZoneList<Declaration*>* declarations) { | 2697 void AstGraphBuilder::VisitDeclarations(ZoneList<Declaration*>* declarations) { |
| 2690 DCHECK(globals()->empty()); | 2698 DCHECK(globals()->empty()); |
| 2691 AstVisitor::VisitDeclarations(declarations); | 2699 AstVisitor::VisitDeclarations(declarations); |
| 2692 if (globals()->empty()) return; | 2700 if (globals()->empty()) return; |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3797 // Phi does not exist yet, introduce one. | 3805 // Phi does not exist yet, introduce one. |
| 3798 value = NewPhi(inputs, value, control); | 3806 value = NewPhi(inputs, value, control); |
| 3799 value->ReplaceInput(inputs - 1, other); | 3807 value->ReplaceInput(inputs - 1, other); |
| 3800 } | 3808 } |
| 3801 return value; | 3809 return value; |
| 3802 } | 3810 } |
| 3803 | 3811 |
| 3804 } // namespace compiler | 3812 } // namespace compiler |
| 3805 } // namespace internal | 3813 } // namespace internal |
| 3806 } // namespace v8 | 3814 } // namespace v8 |
| OLD | NEW |