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

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: Disable CrankShaft 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
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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 return_type_ = save_return_type; 429 return_type_ = save_return_type;
430 IntersectResult(expr, type); 430 IntersectResult(expr, type);
431 } 431 }
432 432
433 433
434 void AsmTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { 434 void AsmTyper::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) {
435 FAIL(expr, "function info literal encountered"); 435 FAIL(expr, "function info literal encountered");
436 } 436 }
437 437
438 438
439 void AsmTyper::VisitDoExpression(DoExpression* expr) {
440 FAIL(expr, "do-expression encountered");
441 }
442
443
439 void AsmTyper::VisitConditional(Conditional* expr) { 444 void AsmTyper::VisitConditional(Conditional* expr) {
440 RECURSE(VisitWithExpectation(expr->condition(), cache_.kInt32, 445 RECURSE(VisitWithExpectation(expr->condition(), cache_.kInt32,
441 "condition expected to be integer")); 446 "condition expected to be integer"));
442 RECURSE(VisitWithExpectation( 447 RECURSE(VisitWithExpectation(
443 expr->then_expression(), expected_type_, 448 expr->then_expression(), expected_type_,
444 "conditional then branch type mismatch with enclosing expression")); 449 "conditional then branch type mismatch with enclosing expression"));
445 Type* then_type = computed_type_; 450 Type* then_type = computed_type_;
446 RECURSE(VisitWithExpectation( 451 RECURSE(VisitWithExpectation(
447 expr->else_expression(), expected_type_, 452 expr->else_expression(), expected_type_,
448 "conditional else branch type mismatch with enclosing expression")); 453 "conditional else branch type mismatch with enclosing expression"));
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 computed_type_->Print(); 1073 computed_type_->Print();
1069 PrintF("Expected type: "); 1074 PrintF("Expected type: ");
1070 expected_type_->Print(); 1075 expected_type_->Print();
1071 #endif 1076 #endif
1072 FAIL(expr, msg); 1077 FAIL(expr, msg);
1073 } 1078 }
1074 expected_type_ = save; 1079 expected_type_ = save;
1075 } 1080 }
1076 } // namespace internal 1081 } // namespace internal
1077 } // namespace v8 1082 } // namespace v8
OLDNEW
« src/ast.h ('K') | « src/rewriter.cc ('k') | test/mjsunit/harmony/do-expressions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698