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

Side by Side Diff: src/compiler/typer.cc

Issue 1994503002: [turbofan] Turn common Guard operator into simplified TypeGuard. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « src/compiler/simplified-operator-reducer.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/typer.h" 5 #include "src/compiler/typer.h"
6 6
7 #include "src/base/flags.h" 7 #include "src/base/flags.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 } 692 }
693 return type; 693 return type;
694 } 694 }
695 695
696 696
697 Type* Typer::Visitor::TypeEffectPhi(Node* node) { 697 Type* Typer::Visitor::TypeEffectPhi(Node* node) {
698 UNREACHABLE(); 698 UNREACHABLE();
699 return nullptr; 699 return nullptr;
700 } 700 }
701 701
702 702 Type* Typer::Visitor::TypeTypeGuard(Node* node) {
703 Type* Typer::Visitor::TypeGuard(Node* node) {
704 Type* input_type = Operand(node, 0); 703 Type* input_type = Operand(node, 0);
705 Type* guard_type = OpParameter<Type*>(node); 704 Type* guard_type = TypeOf(node->op());
706 return Type::Intersect(input_type, guard_type, zone()); 705 return Type::Intersect(input_type, guard_type, zone());
707 } 706 }
708 707
709 Type* Typer::Visitor::TypeCheckPoint(Node* node) { 708 Type* Typer::Visitor::TypeCheckPoint(Node* node) {
710 UNREACHABLE(); 709 UNREACHABLE();
711 return nullptr; 710 return nullptr;
712 } 711 }
713 712
714 Type* Typer::Visitor::TypeBeginRegion(Node* node) { 713 Type* Typer::Visitor::TypeBeginRegion(Node* node) {
715 UNREACHABLE(); 714 UNREACHABLE();
(...skipping 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after
2577 } 2576 }
2578 if (Type::IsInteger(*value)) { 2577 if (Type::IsInteger(*value)) {
2579 return Type::Range(value->Number(), value->Number(), zone()); 2578 return Type::Range(value->Number(), value->Number(), zone());
2580 } 2579 }
2581 return Type::Constant(value, zone()); 2580 return Type::Constant(value, zone());
2582 } 2581 }
2583 2582
2584 } // namespace compiler 2583 } // namespace compiler
2585 } // namespace internal 2584 } // namespace internal
2586 } // namespace v8 2585 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator-reducer.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698