Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/typing-asm.cc

Issue 1399893002: [es7] implement |do| expressions proposal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix AST numbering issue + add simple TF impl Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/rewriter.cc ('K') | « src/typing.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/typing-asm.h" 7 #include "src/typing-asm.h"
8 8
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 return_type_ = save_return_type; 428 return_type_ = save_return_type;
429 IntersectResult(expr, type); 429 IntersectResult(expr, type);
430 } 430 }
431 431
432 432
433 void AsmTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { 433 void AsmTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) {
434 FAIL(expr, "function info literal encountered"); 434 FAIL(expr, "function info literal encountered");
435 } 435 }
436 436
437 437
438 void AsmTyper::VisitDoExpression(DoExpression* expr) {
439 RECURSE(VisitStatements(expr->statements()));
440 }
441
442
438 void AsmTyper::VisitConditional(Conditional* expr) { 443 void AsmTyper::VisitConditional(Conditional* expr) {
439 RECURSE(VisitWithExpectation(expr->condition(), cache_.kInt32, 444 RECURSE(VisitWithExpectation(expr->condition(), cache_.kInt32,
440 "condition expected to be integer")); 445 "condition expected to be integer"));
441 RECURSE(VisitWithExpectation( 446 RECURSE(VisitWithExpectation(
442 expr->then_expression(), expected_type_, 447 expr->then_expression(), expected_type_,
443 "conditional then branch type mismatch with enclosing expression")); 448 "conditional then branch type mismatch with enclosing expression"));
444 Type* then_type = computed_type_; 449 Type* then_type = computed_type_;
445 RECURSE(VisitWithExpectation( 450 RECURSE(VisitWithExpectation(
446 expr->else_expression(), expected_type_, 451 expr->else_expression(), expected_type_,
447 "conditional else branch type mismatch with enclosing expression")); 452 "conditional else branch type mismatch with enclosing expression"));
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 computed_type_->Print(); 1072 computed_type_->Print();
1068 PrintF("Expected type: "); 1073 PrintF("Expected type: ");
1069 expected_type_->Print(); 1074 expected_type_->Print();
1070 #endif 1075 #endif
1071 FAIL(expr, msg); 1076 FAIL(expr, msg);
1072 } 1077 }
1073 expected_type_ = save; 1078 expected_type_ = save;
1074 } 1079 }
1075 } // namespace internal 1080 } // namespace internal
1076 } // namespace v8 1081 } // namespace v8
OLDNEW
« src/rewriter.cc ('K') | « src/typing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698