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

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

Issue 579723004: Introduce simplified BooleanToNumber operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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/graph-inl.h" 5 #include "src/compiler/graph-inl.h"
6 #include "src/compiler/js-operator.h" 6 #include "src/compiler/js-operator.h"
7 #include "src/compiler/node.h" 7 #include "src/compiler/node.h"
8 #include "src/compiler/node-properties-inl.h" 8 #include "src/compiler/node-properties-inl.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/simplified-operator.h" 10 #include "src/compiler/simplified-operator.h"
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 } 637 }
638 638
639 639
640 // Simplified operators. 640 // Simplified operators.
641 641
642 Bounds Typer::Visitor::TypeBooleanNot(Node* node) { 642 Bounds Typer::Visitor::TypeBooleanNot(Node* node) {
643 return Bounds(Type::Boolean(zone())); 643 return Bounds(Type::Boolean(zone()));
644 } 644 }
645 645
646 646
647 Bounds Typer::Visitor::TypeBooleanToNumber(Node* node) {
648 return Bounds(Type::Number(zone()));
649 }
650
651
647 Bounds Typer::Visitor::TypeNumberEqual(Node* node) { 652 Bounds Typer::Visitor::TypeNumberEqual(Node* node) {
648 return Bounds(Type::Boolean(zone())); 653 return Bounds(Type::Boolean(zone()));
649 } 654 }
650 655
651 656
652 Bounds Typer::Visitor::TypeNumberLessThan(Node* node) { 657 Bounds Typer::Visitor::TypeNumberLessThan(Node* node) {
653 return Bounds(Type::Boolean(zone())); 658 return Bounds(Type::Boolean(zone()));
654 } 659 }
655 660
656 661
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 } 889 }
885 890
886 891
887 void Typer::DecorateGraph(Graph* graph) { 892 void Typer::DecorateGraph(Graph* graph) {
888 graph->AddDecorator(new (zone()) TyperDecorator(this)); 893 graph->AddDecorator(new (zone()) TyperDecorator(this));
889 } 894 }
890 895
891 } 896 }
892 } 897 }
893 } // namespace v8::internal::compiler 898 } // namespace v8::internal::compiler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698