| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/typing.h" | 5 #include "src/crankshaft/typing.h" |
| 6 | 6 |
| 7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/ast/variables.h" | 9 #include "src/ast/variables.h" |
| 10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 NarrowType(expr, bounds_->get(rhs)); | 462 NarrowType(expr, bounds_->get(rhs)); |
| 463 | 463 |
| 464 VariableProxy* proxy = expr->target()->AsVariableProxy(); | 464 VariableProxy* proxy = expr->target()->AsVariableProxy(); |
| 465 if (proxy != NULL && proxy->var()->IsStackAllocated()) { | 465 if (proxy != NULL && proxy->var()->IsStackAllocated()) { |
| 466 store_.Seq(variable_index(proxy->var()), Effect(bounds_->get(expr))); | 466 store_.Seq(variable_index(proxy->var()), Effect(bounds_->get(expr))); |
| 467 } | 467 } |
| 468 } | 468 } |
| 469 | 469 |
| 470 | 470 |
| 471 void AstTyper::VisitYield(Yield* expr) { | 471 void AstTyper::VisitYield(Yield* expr) { |
| 472 RECURSE(Visit(expr->generator_object())); | |
| 473 RECURSE(Visit(expr->expression())); | 472 RECURSE(Visit(expr->expression())); |
| 474 | 473 |
| 475 // We don't know anything about the result type. | 474 // We don't know anything about the result type. |
| 476 } | 475 } |
| 477 | 476 |
| 478 | 477 |
| 479 void AstTyper::VisitThrow(Throw* expr) { | 478 void AstTyper::VisitThrow(Throw* expr) { |
| 480 RECURSE(Visit(expr->exception())); | 479 RECURSE(Visit(expr->exception())); |
| 481 // TODO(rossberg): is it worth having a non-termination effect? | 480 // TODO(rossberg): is it worth having a non-termination effect? |
| 482 | 481 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 751 | 750 |
| 752 void AstTyper::VisitSpread(Spread* expr) { UNREACHABLE(); } | 751 void AstTyper::VisitSpread(Spread* expr) { UNREACHABLE(); } |
| 753 | 752 |
| 754 | 753 |
| 755 void AstTyper::VisitEmptyParentheses(EmptyParentheses* expr) { | 754 void AstTyper::VisitEmptyParentheses(EmptyParentheses* expr) { |
| 756 UNREACHABLE(); | 755 UNREACHABLE(); |
| 757 } | 756 } |
| 758 | 757 |
| 759 void AstTyper::VisitGetIterator(GetIterator* expr) { UNREACHABLE(); } | 758 void AstTyper::VisitGetIterator(GetIterator* expr) { UNREACHABLE(); } |
| 760 | 759 |
| 760 void AstTyper::VisitInternalVariable(InternalVariable* expr) { UNREACHABLE(); } |
| 761 |
| 761 void AstTyper::VisitThisFunction(ThisFunction* expr) {} | 762 void AstTyper::VisitThisFunction(ThisFunction* expr) {} |
| 762 | 763 |
| 763 | 764 |
| 764 void AstTyper::VisitSuperPropertyReference(SuperPropertyReference* expr) {} | 765 void AstTyper::VisitSuperPropertyReference(SuperPropertyReference* expr) {} |
| 765 | 766 |
| 766 | 767 |
| 767 void AstTyper::VisitSuperCallReference(SuperCallReference* expr) {} | 768 void AstTyper::VisitSuperCallReference(SuperCallReference* expr) {} |
| 768 | 769 |
| 769 | 770 |
| 770 void AstTyper::VisitRewritableExpression(RewritableExpression* expr) { | 771 void AstTyper::VisitRewritableExpression(RewritableExpression* expr) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 791 } | 792 } |
| 792 | 793 |
| 793 | 794 |
| 794 void AstTyper::VisitFunctionDeclaration(FunctionDeclaration* declaration) { | 795 void AstTyper::VisitFunctionDeclaration(FunctionDeclaration* declaration) { |
| 795 RECURSE(Visit(declaration->fun())); | 796 RECURSE(Visit(declaration->fun())); |
| 796 } | 797 } |
| 797 | 798 |
| 798 | 799 |
| 799 } // namespace internal | 800 } // namespace internal |
| 800 } // namespace v8 | 801 } // namespace v8 |
| OLD | NEW |