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

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

Issue 2177483002: [turbofan] Handle impossible types (Type::None()) in the backend. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix?? Created 4 years, 5 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 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 2154 matching lines...) Expand 10 before | Expand all | Expand 10 after
2165 } 2165 }
2166 2166
2167 Type* Typer::Visitor::TypeFloat64SilenceNaN(Node* node) { 2167 Type* Typer::Visitor::TypeFloat64SilenceNaN(Node* node) {
2168 return Type::UntaggedFloat64(); 2168 return Type::UntaggedFloat64();
2169 } 2169 }
2170 2170
2171 Type* Typer::Visitor::TypeChangeInt32ToInt64(Node* node) { 2171 Type* Typer::Visitor::TypeChangeInt32ToInt64(Node* node) {
2172 return Type::Internal(); 2172 return Type::Internal();
2173 } 2173 }
2174 2174
2175
2176 Type* Typer::Visitor::TypeChangeUint32ToFloat64(Node* node) { 2175 Type* Typer::Visitor::TypeChangeUint32ToFloat64(Node* node) {
2177 return Type::Intersect(Type::Unsigned32(), Type::UntaggedFloat64(), zone()); 2176 return Type::Intersect(Type::Unsigned32(), Type::UntaggedFloat64(), zone());
2178 } 2177 }
2179 2178
2180
2181 Type* Typer::Visitor::TypeChangeUint32ToUint64(Node* node) { 2179 Type* Typer::Visitor::TypeChangeUint32ToUint64(Node* node) {
2182 return Type::Internal(); 2180 return Type::Internal();
2183 } 2181 }
2184 2182
2183 Type* Typer::Visitor::TypeImpossibleToWord32(Node* node) {
2184 return Type::None();
2185 }
2186
2187 Type* Typer::Visitor::TypeImpossibleToWord64(Node* node) {
2188 return Type::None();
2189 }
2190
2191 Type* Typer::Visitor::TypeImpossibleToFloat32(Node* node) {
2192 return Type::None();
2193 }
2194
2195 Type* Typer::Visitor::TypeImpossibleToFloat64(Node* node) {
2196 return Type::None();
2197 }
2198
2199 Type* Typer::Visitor::TypeImpossibleToTagged(Node* node) {
2200 return Type::None();
2201 }
2202
2203 Type* Typer::Visitor::TypeImpossibleToBit(Node* node) { return Type::None(); }
2185 2204
2186 Type* Typer::Visitor::TypeTruncateFloat64ToFloat32(Node* node) { 2205 Type* Typer::Visitor::TypeTruncateFloat64ToFloat32(Node* node) {
2187 return Type::Intersect(Type::Number(), Type::UntaggedFloat32(), zone()); 2206 return Type::Intersect(Type::Number(), Type::UntaggedFloat32(), zone());
2188 } 2207 }
2189 2208
2190 Type* Typer::Visitor::TypeTruncateFloat64ToWord32(Node* node) { 2209 Type* Typer::Visitor::TypeTruncateFloat64ToWord32(Node* node) {
2191 return Type::Intersect(Type::Integral32(), Type::UntaggedIntegral32(), 2210 return Type::Intersect(Type::Integral32(), Type::UntaggedIntegral32(),
2192 zone()); 2211 zone());
2193 } 2212 }
2194 2213
2195
2196 Type* Typer::Visitor::TypeTruncateInt64ToInt32(Node* node) { 2214 Type* Typer::Visitor::TypeTruncateInt64ToInt32(Node* node) {
2197 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); 2215 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone());
2198 } 2216 }
2199 2217
2200 Type* Typer::Visitor::TypeRoundFloat64ToInt32(Node* node) { 2218 Type* Typer::Visitor::TypeRoundFloat64ToInt32(Node* node) {
2201 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); 2219 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone());
2202 } 2220 }
2203 2221
2204 Type* Typer::Visitor::TypeRoundInt32ToFloat32(Node* node) { 2222 Type* Typer::Visitor::TypeRoundInt32ToFloat32(Node* node) {
2205 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat32(), zone()); 2223 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat32(), zone());
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 } 2547 }
2530 if (Type::IsInteger(*value)) { 2548 if (Type::IsInteger(*value)) {
2531 return Type::Range(value->Number(), value->Number(), zone()); 2549 return Type::Range(value->Number(), value->Number(), zone());
2532 } 2550 }
2533 return Type::Constant(value, zone()); 2551 return Type::Constant(value, zone());
2534 } 2552 }
2535 2553
2536 } // namespace compiler 2554 } // namespace compiler
2537 } // namespace internal 2555 } // namespace internal
2538 } // namespace v8 2556 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698