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/typing.h" | 5 #include "src/typing.h" |
6 | 6 |
7 #include "src/frames.h" | 7 #include "src/frames.h" |
8 #include "src/frames-inl.h" | 8 #include "src/frames-inl.h" |
9 #include "src/ostreams.h" | 9 #include "src/ostreams.h" |
10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move | 10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 void AstTyper::VisitDebuggerStatement(DebuggerStatement* stmt) { | 345 void AstTyper::VisitDebuggerStatement(DebuggerStatement* stmt) { |
346 store_.Forget(); // May do whatever. | 346 store_.Forget(); // May do whatever. |
347 } | 347 } |
348 | 348 |
349 | 349 |
350 void AstTyper::VisitFunctionLiteral(FunctionLiteral* expr) { | 350 void AstTyper::VisitFunctionLiteral(FunctionLiteral* expr) { |
351 expr->InitializeSharedInfo(Handle<Code>(info_->closure()->shared()->code())); | 351 expr->InitializeSharedInfo(Handle<Code>(info_->closure()->shared()->code())); |
352 } | 352 } |
353 | 353 |
354 | 354 |
| 355 void AstTyper::VisitClassLiteral(ClassLiteral* expr) {} |
| 356 |
| 357 |
355 void AstTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { | 358 void AstTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { |
356 } | 359 } |
357 | 360 |
358 | 361 |
359 void AstTyper::VisitConditional(Conditional* expr) { | 362 void AstTyper::VisitConditional(Conditional* expr) { |
360 // Collect type feedback. | 363 // Collect type feedback. |
361 expr->condition()->RecordToBooleanTypeFeedback(oracle()); | 364 expr->condition()->RecordToBooleanTypeFeedback(oracle()); |
362 | 365 |
363 RECURSE(Visit(expr->condition())); | 366 RECURSE(Visit(expr->condition())); |
364 Effects then_effects = EnterEffects(); | 367 Effects then_effects = EnterEffects(); |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 | 739 |
737 void AstTyper::VisitVariableDeclaration(VariableDeclaration* declaration) { | 740 void AstTyper::VisitVariableDeclaration(VariableDeclaration* declaration) { |
738 } | 741 } |
739 | 742 |
740 | 743 |
741 void AstTyper::VisitFunctionDeclaration(FunctionDeclaration* declaration) { | 744 void AstTyper::VisitFunctionDeclaration(FunctionDeclaration* declaration) { |
742 RECURSE(Visit(declaration->fun())); | 745 RECURSE(Visit(declaration->fun())); |
743 } | 746 } |
744 | 747 |
745 | 748 |
| 749 void AstTyper::VisitClassDeclaration(ClassDeclaration* declaration) { |
| 750 RECURSE(Visit(declaration->classLiteral())); |
| 751 } |
| 752 |
| 753 |
746 void AstTyper::VisitModuleDeclaration(ModuleDeclaration* declaration) { | 754 void AstTyper::VisitModuleDeclaration(ModuleDeclaration* declaration) { |
747 RECURSE(Visit(declaration->module())); | 755 RECURSE(Visit(declaration->module())); |
748 } | 756 } |
749 | 757 |
750 | 758 |
751 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { | 759 void AstTyper::VisitImportDeclaration(ImportDeclaration* declaration) { |
752 RECURSE(Visit(declaration->module())); | 760 RECURSE(Visit(declaration->module())); |
753 } | 761 } |
754 | 762 |
755 | 763 |
(...skipping 18 matching lines...) Expand all Loading... |
774 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 782 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
775 } | 783 } |
776 | 784 |
777 | 785 |
778 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 786 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
779 RECURSE(Visit(stmt->body())); | 787 RECURSE(Visit(stmt->body())); |
780 } | 788 } |
781 | 789 |
782 | 790 |
783 } } // namespace v8::internal | 791 } } // namespace v8::internal |
OLD | NEW |