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

Unified Diff: test/cctest/compiler/test-representation-change.cc

Issue 461653002: Assume signed for converting to word32/float64 unless use or output is explicitly unsigned. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: test/cctest/compiler/test-representation-change.cc
diff --git a/test/cctest/compiler/test-representation-change.cc b/test/cctest/compiler/test-representation-change.cc
index d28cf4b4b82001c1473a3149cf85bd5a68bc4d00..092a5f7d90cab204aa9fe1a055240f87d382b0f4 100644
--- a/test/cctest/compiler/test-representation-change.cc
+++ b/test/cctest/compiler/test-representation-change.cc
@@ -192,18 +192,11 @@ TEST(SingleChanges) {
TEST(SignednessInWord32) {
RepresentationChangerTester r;
- // TODO(titzer): these are currently type errors because the output type is
- // not specified. Maybe the RepresentationChanger should assume anything to or
- // from {rWord32} is {tInt32}, i.e. signed, if not it is explicitly otherwise?
- r.CheckTypeError(rTagged, rWord32 | tInt32);
- r.CheckTypeError(rTagged, rWord32 | tUint32);
- r.CheckTypeError(rWord32, rFloat64);
- r.CheckTypeError(rFloat64, rWord32);
-
- // CheckChange(IrOpcode::kChangeTaggedToInt32, rTagged, rWord32 | tInt32);
- // CheckChange(IrOpcode::kChangeTaggedToUint32, rTagged, rWord32 | tUint32);
- // CheckChange(IrOpcode::kChangeInt32ToFloat64, rWord32, rFloat64);
- // CheckChange(IrOpcode::kChangeFloat64ToInt32, rFloat64, rWord32);
+ // TODO(titzer): assume that uses of a word32 without a sign mean tInt32.
+ CheckChange(IrOpcode::kChangeTaggedToInt32, rTagged, rWord32 | tInt32);
+ CheckChange(IrOpcode::kChangeTaggedToUint32, rTagged, rWord32 | tUint32);
+ CheckChange(IrOpcode::kChangeInt32ToFloat64, rWord32, rFloat64);
+ CheckChange(IrOpcode::kChangeFloat64ToInt32, rFloat64, rWord32);
}
« src/compiler/representation-change.h ('K') | « src/compiler/representation-change.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698