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

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

Issue 1589363002: [turbofan] Add the RoundInt32ToFloat32 operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/raw-machine-assembler.h ('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 2182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 Type* Typer::Visitor::TypeTruncateFloat64ToInt32(Node* node) { 2193 Type* Typer::Visitor::TypeTruncateFloat64ToInt32(Node* node) {
2194 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); 2194 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone());
2195 } 2195 }
2196 2196
2197 2197
2198 Type* Typer::Visitor::TypeTruncateInt64ToInt32(Node* node) { 2198 Type* Typer::Visitor::TypeTruncateInt64ToInt32(Node* node) {
2199 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); 2199 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone());
2200 } 2200 }
2201 2201
2202 2202
2203 Type* Typer::Visitor::TypeRoundInt32ToFloat32(Node* node) {
2204 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat32(), zone());
2205 }
2206
2207
2203 Type* Typer::Visitor::TypeRoundInt64ToFloat32(Node* node) { 2208 Type* Typer::Visitor::TypeRoundInt64ToFloat32(Node* node) {
2204 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat32(), zone()); 2209 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat32(), zone());
2205 } 2210 }
2206 2211
2207 2212
2208 Type* Typer::Visitor::TypeRoundInt64ToFloat64(Node* node) { 2213 Type* Typer::Visitor::TypeRoundInt64ToFloat64(Node* node) {
2209 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat64(), zone()); 2214 return Type::Intersect(Type::PlainNumber(), Type::UntaggedFloat64(), zone());
2210 } 2215 }
2211 2216
2212 2217
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 } 2436 }
2432 if (Type::IsInteger(*value)) { 2437 if (Type::IsInteger(*value)) {
2433 return Type::Range(value->Number(), value->Number(), zone()); 2438 return Type::Range(value->Number(), value->Number(), zone());
2434 } 2439 }
2435 return Type::Constant(value, zone()); 2440 return Type::Constant(value, zone());
2436 } 2441 }
2437 2442
2438 } // namespace compiler 2443 } // namespace compiler
2439 } // namespace internal 2444 } // namespace internal
2440 } // namespace v8 2445 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.h ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698