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

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

Issue 2082523002: [turbofan] Introduce CheckTaggedSigned and CheckTaggedPointer operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile Created 4 years, 6 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.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 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after
2001 Type* Typer::Visitor::TypeChangeBitToTagged(Node* node) { 2001 Type* Typer::Visitor::TypeChangeBitToTagged(Node* node) {
2002 Type* arg = Operand(node, 0); 2002 Type* arg = Operand(node, 0);
2003 return ChangeRepresentation(arg, Type::TaggedPointer(), zone()); 2003 return ChangeRepresentation(arg, Type::TaggedPointer(), zone());
2004 } 2004 }
2005 2005
2006 Type* Typer::Visitor::TypeCheckBounds(Node* node) { 2006 Type* Typer::Visitor::TypeCheckBounds(Node* node) {
2007 // TODO(bmeurer): We could do better here based on the limit. 2007 // TODO(bmeurer): We could do better here based on the limit.
2008 return Type::Unsigned31(); 2008 return Type::Unsigned31();
2009 } 2009 }
2010 2010
2011 Type* Typer::Visitor::TypeCheckTaggedPointer(Node* node) {
2012 Type* arg = Operand(node, 0);
2013 return Type::Intersect(arg, Type::TaggedPointer(), zone());
2014 }
2015
2016 Type* Typer::Visitor::TypeCheckTaggedSigned(Node* node) {
2017 Type* arg = Operand(node, 0);
2018 return Type::Intersect(arg, typer_->cache_.kSmi, zone());
2019 }
2020
2011 Type* Typer::Visitor::TypeCheckedUint32ToInt32(Node* node) { 2021 Type* Typer::Visitor::TypeCheckedUint32ToInt32(Node* node) {
2012 return Type::Signed32(); 2022 return Type::Signed32();
2013 } 2023 }
2014 2024
2015 Type* Typer::Visitor::TypeCheckedFloat64ToInt32(Node* node) { 2025 Type* Typer::Visitor::TypeCheckedFloat64ToInt32(Node* node) {
2016 return Type::Signed32(); 2026 return Type::Signed32();
2017 } 2027 }
2018 2028
2019 Type* Typer::Visitor::TypeCheckedTaggedToInt32(Node* node) { 2029 Type* Typer::Visitor::TypeCheckedTaggedToInt32(Node* node) {
2020 return Type::Signed32(); 2030 return Type::Signed32();
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
2784 } 2794 }
2785 if (Type::IsInteger(*value)) { 2795 if (Type::IsInteger(*value)) {
2786 return Type::Range(value->Number(), value->Number(), zone()); 2796 return Type::Range(value->Number(), value->Number(), zone());
2787 } 2797 }
2788 return Type::Constant(value, zone()); 2798 return Type::Constant(value, zone());
2789 } 2799 }
2790 2800
2791 } // namespace compiler 2801 } // namespace compiler
2792 } // namespace internal 2802 } // namespace internal
2793 } // namespace v8 2803 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698