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

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

Issue 1843983002: [wasm] Fixed float-to-int conversion tests. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2191 Type* Typer::Visitor::TypeChangeFloat64ToInt32(Node* node) { 2191 Type* Typer::Visitor::TypeChangeFloat64ToInt32(Node* node) {
2192 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); 2192 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone());
2193 } 2193 }
2194 2194
2195 2195
2196 Type* Typer::Visitor::TypeChangeFloat64ToUint32(Node* node) { 2196 Type* Typer::Visitor::TypeChangeFloat64ToUint32(Node* node) {
2197 return Type::Intersect(Type::Unsigned32(), Type::UntaggedIntegral32(), 2197 return Type::Intersect(Type::Unsigned32(), Type::UntaggedIntegral32(),
2198 zone()); 2198 zone());
2199 } 2199 }
2200 2200
2201 Type* Typer::Visitor::TypeTruncateFloat64ToUint32(Node* node) {
2202 return Type::Intersect(Type::Unsigned32(), Type::UntaggedIntegral32(),
2203 zone());
2204 }
2201 2205
2202 Type* Typer::Visitor::TypeTruncateFloat32ToInt32(Node* node) { 2206 Type* Typer::Visitor::TypeTruncateFloat32ToInt32(Node* node) {
2203 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone()); 2207 return Type::Intersect(Type::Signed32(), Type::UntaggedIntegral32(), zone());
2204 } 2208 }
2205 2209
2206 2210
2207 Type* Typer::Visitor::TypeTruncateFloat32ToUint32(Node* node) { 2211 Type* Typer::Visitor::TypeTruncateFloat32ToUint32(Node* node) {
2208 return Type::Intersect(Type::Unsigned32(), Type::UntaggedIntegral32(), 2212 return Type::Intersect(Type::Unsigned32(), Type::UntaggedIntegral32(),
2209 zone()); 2213 zone());
2210 } 2214 }
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 } 2524 }
2521 if (Type::IsInteger(*value)) { 2525 if (Type::IsInteger(*value)) {
2522 return Type::Range(value->Number(), value->Number(), zone()); 2526 return Type::Range(value->Number(), value->Number(), zone());
2523 } 2527 }
2524 return Type::Constant(value, zone()); 2528 return Type::Constant(value, zone());
2525 } 2529 }
2526 2530
2527 } // namespace compiler 2531 } // namespace compiler
2528 } // namespace internal 2532 } // namespace internal
2529 } // namespace v8 2533 } // 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